15#include <sys/syscall.h>
52 DECLARE_FUNCTION_1P(fabs)
53 DECLARE_FUNCTION_1P(PL)
54 DECLARE_FUNCTION_1P(CT)
55 DECLARE_FUNCTION_2P(FTX)
56 DECLARE_FUNCTION_2P(VE)
57 DECLARE_FUNCTION_2P(VEO)
58 DECLARE_FUNCTION_2P(VEO2)
59 DECLARE_FUNCTION_2P(CV)
60 DECLARE_FUNCTION_1P(WRA)
96 virtual vector<exmap>
x2y(
const ex &xpol) =0;
97 vector<exmap>
x2y(
const lst &xpols);
99 static bool VerifySD(vector<exmap> vmap,
bool quick =
true);
108 vector<exmap>
x2y(
const ex &xpol)
override;
109 static vector<vector<int>>
RunQHull(
const matrix &pts);
111 vector<matrix> ZeroFaces(
const matrix &pts);
112 matrix NormalVectors(
const vector<matrix> &zfs);
113 matrix DualCone(
const matrix &pts);
114 vector<matrix> SimplexCones(matrix pts);
168 static int Wrapper(
unsigned int xdim,
size_t npts,
const qREAL *x,
void *fdata,
unsigned int ydim,
qREAL *y);
172 virtual ex
Integrate(
size_t n=0)
override;
198 int inDQMP(
qREAL const *x);
206 static int Wrapper(
unsigned int xdim,
size_t npts,
const mpREAL *x,
void *fdata,
unsigned int ydim,
mpREAL *y);
208 virtual ex
Integrate(
size_t n=0)
override;
217 ex mp2ex(
const mpREAL & num);
220 bool use_last =
false;
227 int inDQMP(
qREAL const *x);
237 virtual ex
Integrate(
size_t n=0)
override;
242 ex mp2ex(
const mpREAL & num);
253 virtual ex
Integrate(
size_t n=0)
override;
261 ex mp2ex(
const mpREAL & num);
264 typedef long double dREAL;
292 dREAL UpperBound[50];
293 dREAL LowerBound[50];
302 GINAC_DECLARE_PRINT_CONTEXT(
CppFormat, print_csrc_cl_N)
304 CppFormat(ostream &os,
const string & s =
"L",
unsigned opt = 0);
324 static _init CppFormat_init;
326 static void print_integer(
const CppFormat & c,
const cln::cl_I & x);
327 static void print_real(
const CppFormat & c,
const cln::cl_R & x);
328 static void print_numeric(
const numeric & p,
const CppFormat & c,
unsigned level);
332 GINAC_DECLARE_PRINT_CONTEXT(
ExFormat, print_dflt)
334 ExFormat(ostream &os,
const string & s =
"L",
unsigned opt = 0);
352 static _init ExFormat_init;
353 static void print_integer(
const ExFormat & c,
const cln::cl_I & x);
354 static void print_real(
const ExFormat & c,
const cln::cl_R & x);
355 static void print_numeric(
const numeric & p,
const ExFormat & c,
unsigned level);
390 static void Projectivize(ex &fe,
const ex delta,
const ex xsum=0);
391 static void Scalelize(ex &fe,
const lst xs,
const ex cy);
392 static void Scalelize(ex &fe,
const ex xi,
const ex cy);
393 static exvector
Binarize(ex
const fe, ex
const eqn);
394 static void Binarize(ex
const fe, ex
const eqn, exvector & ovec);
395 static bool isLinearizable(
const ex ft,
const ex delta, lst & xcs);
396 static void Linearize(
const lst xcs, ex & fe, ex & ft);
397 static bool isPartilizable(
const ex ft,
const ex delta, lst &xcs,
int mode=0);
398 static void Partilize(
const lst xcs,
const lst delta,
const ex fe, exvector & ret_lst);
400 static exvector
Evaluate(
const ex & fe);
402 static exvector
Apply(
const exvector & fe_vec,
const ex & ft=0);
403 inline static exvector
Apply(
const ex & fe,
const ex & ft=0) {
405 fe_vec.push_back(fe);
406 return Apply(fe_vec, ft);
442 lst
BisectionPoints = lst { ex(1)/13, ex(1)/19, ex(1)/29, ex(1)/59, ex(1)/41, ex(1)/37, ex(1)/43, ex(1)/53 };
476 bool IsBad(ex f, vector<exmap> vmap);
479 void Contours(
const string & key =
"",
const string & pkey =
"");
480 void Integrates(
const string & key=
"",
const string & pkey=
"",
int kid=0);
489 static bool VerifySD(vector<exmap> vmap,
bool quick =
true);
495 static ex
PExpand(ex xpol,
bool delta=
true);
496 static int PRank(matrix m);
502 exvector DS(
const ex po_ex);
503 lst Normalize(
const ex &input);
505 bool KillPowerD(ex fe,
int kpi);
506 bool KillPower(ex fe,
int kpi,
int bits);
508 void CompileMatDet();
509 vector<lst> ciResult;
520 ex
Parse(ex expr,
bool reset=
true);
523 vector<pair<int, ex>>
os();
525 map<ex, ex, ex_is_less> ex_var_map;
527 vector<pair<int, ex>> o_ex_vec;
536 const vector<pair<int,ex>> &
vs();
538 ex
Parse(ex expr,
bool reset);
539 map<ex, int, ex_is_less> exn;
543 vector<pair<int,ex>> on_ex_vec;
class to manipulate with Cheng-Wu theorem
static bool isPartilizable(const ex ft, const ex delta, lst &xcs, int mode=0)
isPartilize w.r.t. F-term, generized to isLinearizable
static bool isLinearizable(const ex ft, const ex delta, lst &xcs)
Linearize w.r.t. F-term.
static exvector Apply(const exvector &fe_vec, const ex &ft=0)
ChengWu-rized on the vector of fe, note that 1st element of the output, which needs to be droped,...
static exvector Binarize(ex const fe, ex const eqn)
Binarize the input fe, w.r.t. the linear eqn.
static exvector Apply(const ex &fe, const ex &ft=0)
static void Projectivize(ex &fe, const ex delta, const ex xsum=0)
to Projectivize the input fe, the fe will be updated
static void Partilize(const lst xcs, const lst delta, const ex fe, exvector &ret_lst)
Partilize function, generized to Linearize.
static void Scalelize(ex &fe, const lst xs, const ex cy)
to Scalelize the input fe, the fe will be updated
static bool isProjective(const ex fe, const ex delta)
to check the input fe is Projective or NOT w.r.t. delta
static exvector Evaluate(const ex &fe)
ChengWu Internal, make sure ft in the first term, ONLY appear in ChengWu.cpp.
static void Linearize(const lst xcs, ex &fe, ex &ft)
Linearize w.r.t. xcs_in.
static exvector WickRotation(const exvector &fe_vec)
WickRotation, just check WRA exist or NOT to see successful or NOT. Still Experimental.
static IntegratorBase * Integrator
static MinimizeBase * miner
static dREAL IntError(int nvars, dREAL *las, dREAL *n1, dREAL *n2)
numerical integrator using HCubatureMP
static int Wrapper(unsigned int xdim, size_t npts, const mpREAL *x, void *fdata, unsigned int ydim, mpREAL *y)
static void DefaultPrintHooker(mpREAL *, mpREAL *, size_t *, void *)
virtual ex Integrate(size_t n=0) override
void(* PrintHookerType)(mpREAL *, mpREAL *, size_t *, void *)
PrintHookerType PrintHooker
numerical integrator using HCubature
virtual ex Integrate(size_t n=0) override
static void DefaultPrintHooker(qREAL *, qREAL *, size_t *, void *)
PrintHookerType PrintHooker
static int Wrapper(unsigned int xdim, size_t npts, const qREAL *x, void *fdata, unsigned int ydim, qREAL *y)
void(* PrintHookerType)(qREAL *, qREAL *, size_t *, void *)
class to minimize a function using HookeJeeves
virtual void Minimize(int nvars, FunctionType func, dREAL *ip) override
virtual dREAL FindMinimum(int nvars, FunctionType func, dREAL *PL=NULL, dREAL *las=NULL, dREAL *UB=NULL, dREAL *LB=NULL, dREAL *IP=NULL, bool compare0=false, int TryPTS=0, int SavePTS=0) override
virtual void ForceStop() override
base for numerical integrator
qREAL(* FT_Type)(const qREAL xx[], const qREAL pl[])
int(* SDD_Type)(const unsigned int xn, const dREAL x[], const unsigned int yn, dREAL y[], const dREAL pl[], const dREAL las[])
int(* SDQ_Type)(const unsigned int xn, const qREAL x[], const unsigned int yn, qREAL y[], const qREAL pl[], const qREAL las[])
virtual ~IntegratorBase()
virtual ex Integrate(size_t n=0)=0
int(* SDMP_Type)(const unsigned int xn, const mpREAL x[], const unsigned int yn, mpREAL y[], const mpREAL pl[], const mpREAL las[])
const mpREAL * mpParameter
base for class to minimize a function
virtual void Minimize(int nvars, FunctionType func, dREAL *ip)=0
virtual dREAL FindMinimum(int nvars, FunctionType func, dREAL *PL=NULL, dREAL *las=NULL, dREAL *UB=NULL, dREAL *LB=NULL, dREAL *IP=NULL, bool compare0=false, int TryPTS=0, int SavePTS=0)=0
dREAL(* FunctionType)(int nvars, dREAL *x, dREAL *pl, dREAL *las)
virtual void ForceStop()=0
numerical integrator using TanhSinhMP
static void DefaultPrintHooker(mpREAL *, mpREAL *, size_t *, void *)
static int Wrapper(unsigned yn, mpREAL *y, mpREAL *e, unsigned xdim, const mpREAL *x, void *fdata)
virtual ex Integrate(size_t n=0) override
void(* PrintHookerType)(mpREAL *, mpREAL *, size_t *, void *)
PrintHookerType PrintHooker
static bool VerifySD(vector< exmap > vmap, bool quick=true)
Verify the Sector Decompostion is valid.
virtual vector< exmap > x2y(const ex &xpol)=0
static ex XMonomials(const ex &expr)
XMonomials.
SecDec by geometric method.
vector< exmap > x2y(const ex &xpol) override
static vector< vector< int > > RunQHull(const matrix &pts)
SecDec the main class to use Sector Decompostion method.
void KillPowers(int bits=1+2)
Kill Powers will call KillPowerD or KillPower.
void VEPrint(bool endlQ=true)
bool IsBad(ex f, vector< exmap > vmap)
Check the x-END.
map< int, numeric > Parameter
static bool VerifySD(vector< exmap > vmap, bool quick=true)
static ex PExpand(ex xpol, bool delta=true)
PExpand from asy2.1.1.m.
void Contours(const string &key="", const string &pkey="")
Contours, note that here we need to provide the specific Parameter.
IntegratorBase * Integrator
exvector AutoEnd(ex po_ex)
Auto BiSection.
void Initialize(FeynmanParameter fpi)
static lst XRefined_lst(ex const &ft)
static int PRank(matrix m)
PRank from FIESTA.
static ex XRefined(ex const &ft)
static ex PrefactorFIESTA(int nLoop)
void Integrates(const string &key="", const string &pkey="", int kid=0)
Contours, note that here we need to provide the specific Parameter.
static ex ContinuousWRA(ex expr_in, int nc=15)
ContinuousWRA, note that here we need to provide the specific Parameter.
void ReIntegrates(const string &key, const string &pkey, qREAL err)
Contours, note that here we need to provide the specific Parameter.
void Evaluate(FeynmanParameter fpi, const string &key="")
void BiSection(ex xi, ex x0)
void CIPrepares(const string &key="")
Prepare for the Contours and Integrates calls .so will be generated, for more detailed exported funct...
numerical integrator using TanhSinhMP
static void DefaultPrintHooker(mpREAL *, mpREAL *, size_t *, void *)
PrintHookerType PrintHooker
void(* PrintHookerType)(mpREAL *, mpREAL *, size_t *, void *)
virtual ex Integrate(size_t n=0) override
static int Wrapper(unsigned ydim, mpREAL *y, mpREAL *e, unsigned xdim, const mpREAL *x, void *fdata)
class for Common SubExpression Parser
ex Parse(ex expr, bool reset=true)
vector< pair< int, ex > > os()
const vector< pair< int, ex > > & vs()
namespace for Numerical integration with Sector Decomposition method
ex FactorOutX(const ex expr)
exvector get_z_from(ex pol)
exvector get_xy_from(ex pol)
ex xyz_pow_simplify(const ex expr_in)
ex exp_simplify(const ex expr_in)
int x_free_index(ex expr)
complex< dREAL > dCOMPLEX
complex< mpREAL > mpCOMPLEX
exvector get_pl_from(ex pol)
exvector get_y_from(ex pol)
exvector get_x_from(ex pol)
int y_free_index(ex expr)
int epsRank(ex expr_in, ex epi)
ex Factor(const ex expr_in)
ex pow_simplify(const ex expr_in)
wrap parameters for loop integrals
wrap parameters for generic parameter integrals