Log of /trunk/hist/hist/src/TF2.cxx
Parent Directory
Revision
47952 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Mon Dec 10 18:57:10 2012 UTC (2 years, 1 month ago) by
rdm
File length: 35782 byte(s)
Diff to
previous 47641
More CINT removal cleanups:
- configure: remove enable_cling and hascling as we always have cling.
- remove many R__HAS_CLING ifdef's from the code.
Revision
47641 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Tue Nov 27 09:59:40 2012 UTC (2 years, 1 month ago) by
moneta
File length: 38558 byte(s)
Diff to
previous 47480
Fix integration classes to use both a relative or n absolute accuracy
as requested in https://savannah.cern.ch/bugs/?70853
Improve TF1::Integral to add the precision parameter.
Add a TF1::IntegralOneDim where one can specify both epsrel and epsabs and it returns also the error
Clean up the TF1::Integral class to fix some ambiguities
Remove the possibility to pass vector of parameters in Tf1::Integral
remove obsolate file minuit2/src/FitterUtil.cxx
Revision
47480 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Tue Nov 20 15:06:44 2012 UTC (2 years, 2 months ago) by
axel
File length: 38557 byte(s)
Diff to
previous 46310
From Gabriel:
Hide CINT interfaces (void* function pointers) from ROOT-with-cling; they were using Getp2f2funcname() and are not needed anymore.
Revision
46310 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Thu Oct 4 10:16:59 2012 UTC (2 years, 3 months ago) by
moneta
File length: 38483 byte(s)
Diff to
previous 44507
Re-implement GetMinimum of TF2 and TF3 using the Minimizer class
- Add also GetMinimum/GetMaximum and TF2::GetMaximumXY and TF3::GetMaximumXYZ
- The functions TF2::GetMinimumXY and TF3::GetMinimumXYZ return now the minimum of the function
Revision
44507 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Mon Jun 4 12:30:41 2012 UTC (2 years, 7 months ago) by
axel
File length: 36055 byte(s)
Diff to
previous 44213
Remove
using namespace std;
from Riostream.h, which has huge consequences for all of ROOT.
Riostream.h is now a simple wrapper for fstream, iostream, iomanip for backward compatibility; Riosfwd.h simply wraps iosfwd.
Because of templates and their inline functions, Riostream.h needed to be included in headers, too (e.g. TParameter.h), which violated the assumption that Riostream.h is not exposing its using namespace std to headers.
ROOT now requires R__ANSISTREAM, R__SSTREAM, which does not change the set of supported compilers.
Without "using namespace std", several identifiers are now prefixed by std::; e.g. roofit/* source files now have a using namespace std to keep their coding style.
TFile::MakeProject() now generates "using namespace std" to convert the CINT-style class names into C++ ones.
Revision
44213 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Thu May 10 09:08:22 2012 UTC (2 years, 8 months ago) by
moneta
File length: 35950 byte(s)
Diff to
previous 37914
apply several fixes found by Coverity
In particular fix assignment operators (Copy) in TH1 and TGraph classes for memory leaks
Revision
27600 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Wed Feb 25 08:17:22 2009 UTC (5 years, 10 months ago) by
brun
File length: 35824 byte(s)
Diff to
previous 26166
From Matthew Strait:
* Fix spelling and grammar errors
* Fold long lines so they don't spill off the right side
* Add spaces for readability
* Standardize notation and style within sections.
Revision
17729 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Tue Feb 6 15:00:56 2007 UTC (7 years, 11 months ago) by
brun
Original Path:
trunk/hist/src/TF2.cxx
File length: 32050 byte(s)
Diff to
previous 15672
In the Streamer functions replace the lines like
TPad::Class()->ReadBuffer(b, this, v, R__s, R__c);
TPad::Class()->WriteBuffer(b,this);
by
b.ReadClassBuffer(TPad::Class(), this, v, R__s, R__c);
b.WriteClassBuffer(TPad::Class(),this);
Revision
15672 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Mon Jul 3 16:10:46 2006 UTC (8 years, 6 months ago) by
brun
Original Path:
trunk/hist/src/TF2.cxx
File length: 32043 byte(s)
Diff to
previous 15082
from Axel:
Change the signature of SavePrimitive from
void SavePrimitive(ofstream &out, Option_t *option);
to
void SavePrimitive(ostream &out, Option_t *option = "");
With this change one can do, eg
myhist.SavePrimitive(std::cout);
WARNING: do rm -f tree/src/*.o
Revision
14336 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Mon Mar 20 21:43:44 2006 UTC (8 years, 10 months ago) by
pcanal
Original Path:
trunk/hist/src/TF2.cxx
File length: 31987 byte(s)
Diff to
previous 14080
Reduce direct dependencies on TClass.h, TROOT.h and TStreamerInfo.h.
Warning: This means that some file that relied on the indirect
inclusion of these header file might now fail to compile with
an error message mention that gROOT is no known or that TClass,
TROOT or TStreamerInfo is incompletely defined. Simply add the
proper include directive.
Revision
14080 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Wed Feb 22 14:23:21 2006 UTC (8 years, 11 months ago) by
brun
Original Path:
trunk/hist/src/TF2.cxx
File length: 31970 byte(s)
Diff to
previous 13987
Add a new feature to the TF1, TF2 constructors accepting a string formula.
// if formula has the form "fffffff;xxxx;yyyy", it is assumed that
// the formula string is "fffffff" and "xxxx" and "yyyy" are the
// titles for the X and Y axis respectively.
Revision
13298 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Mon Nov 21 09:47:20 2005 UTC (9 years, 2 months ago) by
brun
Original Path:
trunk/hist/src/TF2.cxx
File length: 31910 byte(s)
Diff to
previous 12431
From Anna:
Implement new functions in TF2 and TF3 to find the minimum of a function.
void TF2::GetMinimumXY(Double_t &x, Double_t &y)
{
// return the X and Y values corresponding to the minimum value of the function
// To find the minimum on a range, first set this range via the SetRange function
// Method:
// First, a grid search is performed to find the initial estimate of the
// minimum location. The range of the function is divided into fNpx and fNpy
// sub-ranges. If the function is "good"(or "bad"), these values can be changed
// by SetNpx and SetNpy functions
// Then, Minuit minimization is used with starting values found by the grid search
void TF3::GetMinimumXYZ(Double_t &x, Double_t &y, Double_t &z)
{
// Return the X, Y and Z values corresponding to the minimum value of the function
// on its range. To find the minimum on a subrange, use the SetRange() function first.
// Method:
// First, a grid search is performed to find the initial estimate of the
// minimum location. The range of the function is divided
// into fNpx,fNpy and fNpz sub-ranges. If the function is "good"(or "bad"),
// these values can be changed by SetNpx(), SetNpy() and SetNpz() functions.
// Then, Minuit minimization is used with starting values found by the grid search
Revision
12431 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Wed Aug 3 17:40:34 2005 UTC (9 years, 5 months ago) by
pcanal
Original Path:
trunk/hist/src/TF2.cxx
File length: 29049 byte(s)
Diff to
previous 10019
Add support for the creation of TF1, TF2 and TF3 object from function with
the signature
double (*)(const double*,const double*);
from compiled code. So far only double (*)(double*,double*) was supported
Revision
10019 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Mon Sep 13 16:39:12 2004 UTC (10 years, 4 months ago) by
brun
Original Path:
trunk/hist/src/TF2.cxx
File length: 28217 byte(s)
Diff to
previous 9760
From Ilka:
code for saving any user
specified color via color widgets in a macro. Any color different from
the standard root colors is saved via hex rgb string. Up to now colors
were save via the index and if this index > 228 the running macro causes
SegV.
A new static method SaveColor() is added in TColor class.
Revision
9760 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Mon Aug 16 09:31:13 2004 UTC (10 years, 5 months ago) by
brun
Original Path:
trunk/hist/src/TF2.cxx
File length: 27702 byte(s)
Diff to
previous 7667
Modify TF1::IntegraMultiple to add all the functionality from the original
CERNLIB routine radmul. To be back compatible, two prototypes
for TF1::IntegralMultiple are defined. The old interface call the new one
Double_t TF1::IntegralMultiple(Int_t n, const Double_t *a, const Double_t *b, Int_t minpts, Int_t maxpts, Double_t eps, Double_t &relerr,Int_t &nfnevl, Int_t &ifail)
// input parameters
// ================
// n : Number of dimensions [2,15]
// a,b : One-dimensional arrays of length >= N . On entry A[i], and B[i],
// contain the lower and upper limits of integration, respectively.
// minpts: Minimum number of function evaluations requested. Must not exceed maxpts.
// if minpts < 1 minpts is set to 2^n +2*n*(n+1) +1
// maxpts: Maximum number of function evaluations to be allowed.
// maxpts >= 2^n +2*n*(n+1) +1
// if maxpts<minpts, maxpts is set to 10*minpts
// eps : Specified relative accuracy.
//
// output parameter
// ================
// relerr : Contains, on exit, an estimation of the relative accuracy of the result.
// nfnevl : number of function evaluations performed.
// ifail :
// 0 Normal exit. . At least minpts and at most maxpts calls to the function were performed.
// 1 maxpts is too small for the specified accuracy eps.
// The result and relerr contain the values obtainable for the
// specified value of maxpts.
// 3 n<2 or n>15
Revision
7113 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Wed Aug 20 07:00:47 2003 UTC (11 years, 5 months ago) by
brun
Original Path:
trunk/hist/src/TF2.cxx
File length: 27402 byte(s)
Diff to
previous 7058
Add new functions Moment, CentralMoment, Mean, Variance.
From an original code by Gene Van Buren
In TF1
======
virtual Double_t Moment(Double_t n, Double_t a, Double_t b, const Double_t *params=0, Double_t epsilon=0.000001);
virtual Double_t CentralMoment(Double_t n, Double_t a, Double_t b, const Double_t *params=0, Double_t epsilon=0.000001);
virtual Double_t Mean(Double_t a, Double_t b, const Double_t *params=0, Double_t epsilon=0.000001) {return Moment(1,a,b,params,epsilon);}
virtual Double_t Variance(Double_t a, Double_t b, const Double_t *params=0, Double_t epsilon=0.000001) {return CentralMoment(2,a,b,params,epsilon);}
in TF2
======
virtual Double_t Moment2(Double_t nx, Double_t ax, Double_t bx, Double_t ny, Double_t ay, Double_t by, Double_t epsilon=0.000001);
virtual Double_t CentralMoment2(Double_t nx, Double_t ax, Double_t bx, Double_t ny, Double_t ay, Double_t by, Double_t epsilon=0.000001);
virtual Double_t Mean2X(Double_t ax, Double_t bx, Double_t ay, Double_t by, Double_t epsilon=0.000001) {return Moment2(1,ax,bx,0,ay,by,epsilon);}
virtual Double_t Mean2Y(Double_t ax, Double_t bx, Double_t ay, Double_t by, Double_t epsilon=0.000001) {return Moment2(0,ax,bx,1,ay,by,epsilon);}
virtual Double_t Variance2X(Double_t ax, Double_t bx, Double_t ay, Double_t by, Double_t epsilon=0.000001) {return CentralMoment2(2,ax,bx,0,ay,by,epsilon);}
virtual Double_t Variance2Y(Double_t ax, Double_t bx, Double_t ay, Double_t by, Double_t epsilon=0.000001) {return CentralMoment2(0,ax,bx,2,ay,by,epsilon);}
virtual Double_t Covariance2XY(Double_t ax, Double_t bx, Double_t ay, Double_t by, Double_t epsilon=0.000001) {return CentralMoment2(1,ax,bx,1,ay,by,epsilon);}
in TF3
=====
virtual Double_t Moment3(Double_t nx, Double_t ax, Double_t bx, Double_t ny, Double_t ay, Double_t by, Double_t nz, Double_t az, Double_t bz, Double_t epsilon=0.000001);
virtual Double_t CentralMoment3(Double_t nx, Double_t ax, Double_t bx, Double_t ny, Double_t ay, Double_t by, Double_t nz, Double_t az, Double_t bz, Double_t epsilon=0.000001);
virtual Double_t Mean3X(Double_t ax, Double_t bx, Double_t ay, Double_t by, Double_t az, Double_t bz, Double_t epsilon=0.000001) {return Moment3(1,ax,bx,0,ay,by,0,az,bz,epsilon);}
virtual Double_t Mean3Y(Double_t ax, Double_t bx, Double_t ay, Double_t by, Double_t az, Double_t bz, Double_t epsilon=0.000001) {return Moment3(0,ax,bx,1,ay,by,0,az,bz,epsilon);}
virtual Double_t Mean3Z(Double_t ax, Double_t bx, Double_t ay, Double_t by, Double_t az, Double_t bz, Double_t epsilon=0.000001) {return Moment3(0,ax,bx,0,ay,by,1,az,bz,epsilon);}
virtual Double_t Variance3X(Double_t ax, Double_t bx, Double_t ay, Double_t by, Double_t az, Double_t bz, Double_t epsilon=0.000001) {return CentralMoment3(2,ax,bx,0,ay,by,0,az,bz,epsilon);}
virtual Double_t Variance3Y(Double_t ax, Double_t bx, Double_t ay, Double_t by, Double_t az, Double_t bz, Double_t epsilon=0.000001) {return CentralMoment3(0,ax,bx,2,ay,by,0,az,bz,epsilon);}
virtual Double_t Variance3Z(Double_t ax, Double_t bx, Double_t ay, Double_t by, Double_t az, Double_t bz, Double_t epsilon=0.000001) {return CentralMoment3(0,ax,bx,0,ay,by,2,az,bz,epsilon);}
virtual Double_t Covariance3XY(Double_t ax, Double_t bx, Double_t ay, Double_t by, Double_t az, Double_t bz, Double_t epsilon=0.000001) {return CentralMoment3(1,ax,bx,1,ay,by,0,az,bz,epsilon);}
virtual Double_t Covariance3XZ(Double_t ax, Double_t bx, Double_t ay, Double_t by, Double_t az, Double_t bz, Double_t epsilon=0.000001) {return CentralMoment3(1,ax,bx,0,ay,by,1,az,bz,epsilon);}
virtual Double_t Covariance3YZ(Double_t ax, Double_t bx, Double_t ay, Double_t by, Double_t az, Double_t bz, Double_t epsilon=0.000001) {return CentralMoment3(0,ax,bx,1,ay,by,1,az,bz,epsilon);}
Revision
6805 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Mon Jun 30 15:45:52 2003 UTC (11 years, 6 months ago) by
brun
Original Path:
trunk/hist/src/TF2.cxx
File length: 24882 byte(s)
Diff to
previous 6472
From Philippe:
The following patch implements TTree variable alias.
To use them:
mytree->SetAlias("mult","fPx*fPy");
mytree->Draw("mult");
Note that the aliases have been added to the TTree object so that they can be persistent (with the tree) if you choose.
Also note that the alias are not checked for validity until they are used in a Draw or Scan command.
Existing alias are silently replaced.
The new functions are:
TTree::SetAlias
TTree::GetAlias
TChain::GetAlias
TTree::GetListOfAliases
This patch also adds operator= for TFormula, TF1, TF2, TF3 (it calls the respective Copy member functions). It makes TTreeFormula::operator= private (Copy has not been implemented yet).
Also some of the TFormula and TTreeFormula codes (those stored in fOper) has been aliased to enums (this renders the code is little bit more readable and searchable).
TFormula and TTreeFormula have been updated to handle strings in a more flexible (and for TTreeFormula to be able to return them).
Revision
5735 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Wed Dec 4 10:38:32 2002 UTC (12 years, 1 month ago) by
brun
Original Path:
trunk/hist/src/TF2.cxx
File length: 23599 byte(s)
Diff to
previous 5518
Make all DrawCopy functions const
Add new function in TH1
TH1 *TH1::DrawNormalized(Option_t *option, Double_t norm) const
// Draw a normalized copy of this histogram.
//
// A clone of this histogram is normalized to norm and drawn with option.
// A pointer to the normalized histogram is returned.
// The contents of the histogram copy are scaled such that the new
// sum of weights (excluding under and overflow) is equal to norm.
// Note that the returned normalized histogram is not added to the list
// of histograms in the current directory in memory.
// It is the user's responsability to delete this histogram.
// The kCanDelete bit is set for the returned object. If a pad containing
// this copy is cleared, the histogram will be automatically deleted.
//
// See Draw for the list of options
Revision
2598 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Thu Jul 19 17:12:25 2001 UTC (13 years, 6 months ago) by
brun
Original Path:
trunk/hist/src/TF2.cxx
File length: 23325 byte(s)
Diff to
previous 1717
When a TF2 was created with an interpreted or compiled function,
it was not possible to save the TF2 object in a file and read it
in a separate program because TF2 does not save the code of the
interpreted function. Only TF2s created with inline expressions
could be paint in a separate session.
In TF1, we already had the logic to save an array fSave with
the function values created at fNpx points. TF2 has been modified
to provide the same functionality. One can save a TF2 and draw it
again in a new session.
To implement this feature, the signature of the function TF1::Save
has been modified to be general for 1,2 and 3-d functions.
The classes TH1 and TGraph where TF1::Save was called have been
modified accordingly.
Revision
1205 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Wed Dec 13 15:13:57 2000 UTC (14 years, 1 month ago) by
brun
Original Path:
trunk/hist/src/TF2.cxx
File length: 18364 byte(s)
Diff to
previous 985
W A R N I N G !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
==================================================================
A very long list of changes in this pre-release of version 3.00.
We have modified the signature of many functions (in particular TObject)
to introduce more constness in the system.
You must change your code if your class derives from TObject and uses
one of the modified functions such as ls, Print, Compare, Hash, etc.
The modified functions in TObject have the following signature:
virtual TObject *Clone() const;
virtual Int_t Compare(const TObject *obj) const;
virtual void Delete(Option_t *option=""); // *MENU*
virtual void DrawClass() const; // *MENU*
virtual void DrawClone(Option_t *option="") const; // *MENU*
virtual void Dump() const; // *MENU*
virtual TObject *FindObject(const TObject *obj) const;
virtual char *GetObjectInfo(Int_t px, Int_t py) const;
virtual ULong_t Hash() const;
virtual void Inspect() const; // *MENU*
virtual Bool_t IsEqual(const TObject *obj) const;
virtual void ls(Option_t *option="") const;
virtual void Print(Option_t *option="") const;
A similar operation has been done with classes such as TH1, TVirtualPad,
TTree, etc.
Revision
136 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Tue Jun 13 10:37:48 2000 UTC (14 years, 7 months ago) by
brun
Original Path:
trunk/hist/src/TF2.cxx
File length: 18357 byte(s)
Diff to
previous 3
TF2 members fYmin, fYmax upgraded to Double_t.
The following functions have a new signature:
TF2(const char *name, const char *formula, Double_t xmin=0, Double_t xmax=1, Double_t ymin=0, Double_t ymax=1);
TF2(const char *name, void *fcn, Double_t xmin=0, Double_t xmax=1, Double_t ymin=0, Double_t ymax=1, Int_t npar=0);
TF2(const char *name, Double_t (*fcn)(Double_t *, Double_t *), Double_t xmin=0, Double_t xmax=1, Double_t ymin=0, Double_t ymax=1, Int_t npar=0);
virtual void DrawF2(const char *formula, Double_t xmin, Double_t xmax, Double_t ymin, Double_t ymax, Option_t *option="");
virtual Int_t GetContour(Double_t *levels=0);
virtual Double_t GetContourLevel(Int_t level);
Double_t GetRandom();
virtual void GetRandom2(Double_t &xrandom, Double_t &yrandom);
virtual void GetRange(Double_t &xmin, Double_t &ymin, Double_t &xmax, Double_t &ymax);
virtual Double_t GetYmin() {return fYmin;}
virtual Double_t GetYmax() {return fYmax;}
virtual void SetContour(Int_t nlevels=20, Double_t *levels=0);
virtual void SetContourLevel(Int_t level, Double_t value);
virtual void SetRange(Double_t xmin, Double_t ymin, Double_t xmax, Double_t ymax); // *MENU*
TF2::Streamer modified to support new schema.
This form allows you to request diffs between any two revisions of this file.
For each of the two "sides" of the diff,
enter a numeric revision.