34 const char *
GetName()
const {
return fName.
Data(); }
35 const char *
GetBody()
const {
return fBody.
Data(); }
40 : fName(name),fBody(body),fNargs(numArgs),fFound(false),fFuncCall(true) {}
42 : fName(name),fBody(
""),fNargs(0),fFound(false),fFuncCall(false){}
66 const char *
GetName()
const {
return fName.
Data(); }
68 Int_t GetArrayPos()
const {
return fArrayPos; }
71 : fName(name), fValue(value), fArrayPos(pos),fFound(false) {}
74 return fName < rhv.
fName;
90 std::vector<Double_t> fClingVariables;
91 std::vector<Double_t> fClingParameters;
94 Bool_t fAllParametersSetted;
98 std::string fSavedInputFormula;
103 void InputFormulaIntoCling();
104 Bool_t PrepareEvalMethod();
106 void HandlePolN(
TString &formula);
107 void HandleParametrizedFunctions(
TString &formula);
108 void HandleParamRanges(
TString &formula);
109 void HandleFunctionArguments(
TString &formula);
110 void HandleExponentiation(
TString &formula);
111 void HandleLinear(
TString &formula);
112 Bool_t InitLambdaExpression(
const char * formula);
114 void ReplaceAllNames(
TString &formula, std::map<TString, TString> &substitutions);
115 void FillParametrizedFunctions(std::map<std::pair<TString, Int_t>, std::pair<TString, TString>> &functions);
116 void FillVecFunctionsShurtCuts();
117 void ReInitializeEvalMethod();
121 std::list<TFormulaFunction> fFuncs;
122 std::map<TString,TFormulaVariable> fVars;
123 std::map<TString,Int_t,TFormulaParamOrder> fParams;
124 std::map<TString,Double_t> fConsts;
125 std::map<TString,TString> fFunctionsShortcuts;
130 std::vector<TObject*> fLinearParts;
131 Bool_t fVectorized =
false;
134 static Bool_t IsOperator(
const char c);
135 static Bool_t IsBracket(
const char c);
136 static Bool_t IsFunctionNameChar(
const char c);
137 static Bool_t IsScientificNotation(
const TString & formula,
int ipos);
138 static Bool_t IsHexadecimal(
const TString & formula,
int ipos);
139 static Bool_t IsAParameterName(
const TString & formula,
int ipos);
140 void ExtractFunctors(
TString &formula);
141 void PreProcessFormula(
TString &formula);
142 void ProcessFormula(
TString &formula);
147 void SetPredefinedParamNames();
150 #ifdef R__HAS_VECCORE 157 kNotGlobal =
BIT(10),
158 kNormalized =
BIT(14),
165 TFormula(
const char *
name,
const char * formula =
"",
bool addToGlobList =
true,
bool vectorize =
false);
166 TFormula(
const char *
name,
const char * formula,
int ndim,
int npar,
bool addToGlobList =
true);
170 void AddParameter(
const TString &
name,
Double_t value = 0) { DoAddParameter(name,value,
true); }
172 void AddVariables(
const TString *vars,
const Int_t size);
173 Int_t Compile(
const char *expression=
"");
175 virtual void Clear(
Option_t * option=
"");
184 T EvalPar(
const T *
x,
const Double_t *params = 0)
const {
185 return EvalParVec(x, params);
187 #ifdef R__HAS_VECCORE 192 Int_t GetNdim()
const {
return fNdim;}
193 Int_t GetNpar()
const {
return fNpar;}
194 Int_t GetNumber()
const {
return fNumber; }
195 const char * GetParName(
Int_t ipar)
const;
196 Int_t GetParNumber(
const char *
name)
const;
202 Int_t GetVarNumber(
const char *
name)
const;
204 Bool_t IsValid()
const {
return fReadyToExecute && fClingInitialized; }
205 Bool_t IsVectorized()
const {
return fVectorized; }
206 Bool_t IsLinear()
const {
return TestBit(kLinear); }
216 void SetParName(
Int_t ipar,
const char *
name);
217 void SetParNames(
const char *name0=
"p0",
const char *name1=
"p1",
const char 218 *name2=
"p2",
const char *name3=
"p3",
const char 219 *name4=
"p4",
const char *name5=
"p5",
const char *name6=
"p6",
const char *name7=
"p7",
const char 220 *name8=
"p8",
const char *name9=
"p9",
const char *name10=
"p10");
222 void SetVariables(
const std::pair<TString,Double_t> *vars,
const Int_t size);
223 void SetVectorized(
Bool_t vectorized);
static double p3(double t, double a, double b, double c, double d)
TRObject operator()(const T1 &t1) const
void SetParameters(TFitEditor::FuncParams_t &pars, TF1 *func)
Restore the parameters from pars into the function.
#define ClassDef(name, id)
The TNamed class is the base class for all named ROOT classes.
static double p2(double t, double a, double b, double c)
void(* Generic_t)(void *, int, void **, void *)
Method or function calling interface.
void GetParameters(TFitEditor::FuncParams_t &pars, TF1 *func)
Stores the parameters of the given function into pars.
static double p1(double t, double a, double b)
void Copy(void *source, void *dest)
void Print(std::ostream &os, const OptionType &opt)
Binding & operator=(OUT(*fun)(void))
Mother of all ROOT objects.
you should not use this method at all Int_t Int_t z
you should not use this method at all Int_t Int_t Double_t Double_t Double_t Int_t Double_t Double_t Double_t Double_t b
const char * Data() const