ECCE @ EIC Software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
ptwXY_misc.cc File Reference
#include <stdio.h>
#include <stdlib.h>
#include <cmath>
#include <float.h>
#include "ptwXY.h"
+ Include dependency graph for ptwXY_misc.cc:

Go to the source code of this file.

Functions

static nfu_status ptwXY_createFromFunctionBisect (ptwXYPoints *ptwXY, double x1, double y1, double x2, double y2, ptwXY_createFromFunction_callback func, void *argList, int level, int checkForRoots, double eps)
 
static nfu_status ptwXY_createFromFunctionZeroCrossing (ptwXYPoints *ptwXY, double x1, double y1, double x2, double y2, ptwXY_createFromFunction_callback func, void *argList, double eps)
 
static nfu_status ptwXY_applyFunction2 (ptwXYPoints *ptwXY1, double y1, double y2, ptwXYPoint *p1, ptwXYPoint *p2, ptwXY_applyFunction_callback func, void *argList, int level, int checkForRoots)
 
static nfu_status ptwXY_applyFunctionZeroCrossing (ptwXYPoints *ptwXY1, double y1, double y2, ptwXYPoint *p1, ptwXYPoint *p2, ptwXY_applyFunction_callback func, void *argList)
 
void ptwXY_update_biSectionMax (ptwXYPoints *ptwXY1, double oldLength)
 
ptwXYPointsptwXY_createFromFunction (int n, double *xs, ptwXY_createFromFunction_callback func, void *argList, double accuracy, int checkForRoots, int biSectionMax, nfu_status *status)
 
ptwXYPointsptwXY_createFromFunction2 (ptwXPoints *xs, ptwXY_createFromFunction_callback func, void *argList, double accuracy, int checkForRoots, int biSectionMax, nfu_status *status)
 
nfu_status ptwXY_applyFunction (ptwXYPoints *ptwXY1, ptwXY_applyFunction_callback func, void *argList, int checkForRoots)
 
ptwXYPointsptwXY_fromString (char const *str, ptwXY_interpolation interpolation, ptwXY_interpolationOtherInfo const *interpolationOtherInfo, double biSectionMax, double accuracy, char **endCharacter, nfu_status *status)
 
void ptwXY_showInteralStructure (ptwXYPoints *ptwXY, FILE *f, int printPointersAsNull)
 
void ptwXY_simpleWrite (ptwXYPoints *ptwXY, FILE *f, char *format)
 
void ptwXY_simplePrint (ptwXYPoints *ptwXY, char *format)
 

Function Documentation

nfu_status ptwXY_applyFunction ( ptwXYPoints ptwXY1,
ptwXY_applyFunction_callback  func,
void argList,
int  checkForRoots 
)

Definition at line 146 of file ptwXY_misc.cc.

View newest version in sPHENIX GitHub at line 146 of file ptwXY_misc.cc

References ptwXYPoints_s::biSectionMax, func, ptwXYPoints_s::interpolation, ptwXYPoints_s::length, nfu_invalidInterpolation, nfu_Okay, nfu_otherInterpolation, ptwXYPoints_s::points, ptwXY_applyFunction2(), ptwXY_interpolationFlat, ptwXY_interpolationOther, ptwXY_simpleCoalescePoints(), ptwXY_update_biSectionMax(), ptwXYPoints_s::status, ptwXYPoint_s::y, y1, and y2.

Referenced by ptwXY_pow().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static nfu_status ptwXY_applyFunction2 ( ptwXYPoints ptwXY1,
double  y1,
double  y2,
ptwXYPoint p1,
ptwXYPoint p2,
ptwXY_applyFunction_callback  func,
void argList,
int  level,
int  checkForRoots 
)
static

Definition at line 175 of file ptwXY_misc.cc.

View newest version in sPHENIX GitHub at line 175 of file ptwXY_misc.cc

References ptwXYPoints_s::accuracy, ptwXYPoints_s::biSectionMax, ClosestAllowXFactor, DBL_EPSILON, func, ptwXYPoints_s::interpolation, nfu_Okay, ptwXY_applyFunctionZeroCrossing(), ptwXY_interpolatePoint(), ptwXY_setValueAtX(), ptwXYPoint_s::x, ptwXYPoint_s::y, and y.

Referenced by ptwXY_applyFunction().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static nfu_status ptwXY_applyFunctionZeroCrossing ( ptwXYPoints ptwXY1,
double  y1,
double  y2,
ptwXYPoint p1,
ptwXYPoint p2,
ptwXY_applyFunction_callback  func,
void argList 
)
static

Definition at line 201 of file ptwXY_misc.cc.

View newest version in sPHENIX GitHub at line 201 of file ptwXY_misc.cc

References func, ptwXYPoints_s::interpolation, nfu_badInput, nfu_Okay, ptwXY_interpolatePoint(), ptwXY_setValueAtX(), ptwXYPoint_s::x, x1, x2, ptwXYPoint_s::y, and y.

Referenced by ptwXY_applyFunction2().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ptwXYPoints* ptwXY_createFromFunction ( int  n,
double *  xs,
ptwXY_createFromFunction_callback  func,
void argList,
double  accuracy,
int  checkForRoots,
int  biSectionMax,
nfu_status status 
)

Definition at line 40 of file ptwXY_misc.cc.

View newest version in sPHENIX GitHub at line 40 of file ptwXY_misc.cc

References ClosestAllowXFactor, DBL_EPSILON, eps, check_license::err(), func, ptwXYPoints_s::length, n, nfu_Okay, nfu_tooFewPoints, nfu_XNotAscending, ptwXYPoints_s::points, ptwXY_createFromFunctionBisect(), ptwXY_createFromFunctionZeroCrossing(), ptwXY_free(), ptwXY_interpolationLinLin, ptwXY_new(), ptwXY_setValueAtX_overrideIfClose(), ptwXY_simpleCoalescePoints(), ptwXYPoint_s::x, x1, x2, ptwXYPoint_s::y, y1, and y2.

Referenced by MCGIDI_energy_parseMadlandNixFromTOM(), MCGIDI_energy_parseNBodyPhaseSpaceFromTOM(), nf_Legendre_to_ptwXY(), and ptwXY_createFromFunction2().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ptwXYPoints* ptwXY_createFromFunction2 ( ptwXPoints xs,
ptwXY_createFromFunction_callback  func,
void argList,
double  accuracy,
int  checkForRoots,
int  biSectionMax,
nfu_status status 
)

Definition at line 89 of file ptwXY_misc.cc.

View newest version in sPHENIX GitHub at line 89 of file ptwXY_misc.cc

References ptwXPoints_s::length, ptwXPoints_s::points, and ptwXY_createFromFunction().

+ Here is the call graph for this function:

static nfu_status ptwXY_createFromFunctionBisect ( ptwXYPoints ptwXY,
double  x1,
double  y1,
double  x2,
double  y2,
ptwXY_createFromFunction_callback  func,
void argList,
int  level,
int  checkForRoots,
double  eps 
)
static

Definition at line 97 of file ptwXY_misc.cc.

View newest version in sPHENIX GitHub at line 97 of file ptwXY_misc.cc

References ptwXYPoints_s::accuracy, ptwXYPoints_s::biSectionMax, ClosestAllowXFactor, DBL_EPSILON, f, func, ptwXYPoints_s::interpolation, nfu_Okay, ptwXY_interpolatePoint(), ptwXY_setValueAtX_overrideIfClose(), x, x2, and y.

Referenced by ptwXY_createFromFunction().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static nfu_status ptwXY_createFromFunctionZeroCrossing ( ptwXYPoints ptwXY,
double  x1,
double  y1,
double  x2,
double  y2,
ptwXY_createFromFunction_callback  func,
void argList,
double  eps 
)
static

Definition at line 116 of file ptwXY_misc.cc.

View newest version in sPHENIX GitHub at line 116 of file ptwXY_misc.cc

References func, nfu_badInput, nfu_Okay, ptwXY_setValueAtX_overrideIfClose(), x, x1, x2, and y.

Referenced by ptwXY_createFromFunction().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ptwXYPoints* ptwXY_fromString ( char const *  str,
ptwXY_interpolation  interpolation,
ptwXY_interpolationOtherInfo const *  interpolationOtherInfo,
double  biSectionMax,
double  accuracy,
char **  endCharacter,
nfu_status status 
)

Definition at line 236 of file ptwXY_misc.cc.

View newest version in sPHENIX GitHub at line 236 of file ptwXY_misc.cc

References nfu_free(), nfu_oddNumberOfValues, nfu_Okay, nfu_stringToListOfDoubles(), and ptwXY_create().

+ Here is the call graph for this function:

void ptwXY_simplePrint ( ptwXYPoints ptwXY,
char *  format 
)

Definition at line 298 of file ptwXY_misc.cc.

View newest version in sPHENIX GitHub at line 298 of file ptwXY_misc.cc

References ptwXY_simpleWrite().

+ Here is the call graph for this function:

void ptwXY_simpleWrite ( ptwXYPoints ptwXY,
FILE *  f,
char *  format 
)

Definition at line 285 of file ptwXY_misc.cc.

View newest version in sPHENIX GitHub at line 285 of file ptwXY_misc.cc

References ptwXYPoints_s::length, ptwXY_getPointAtIndex(), ptwXYPoint_s::x, and ptwXYPoint_s::y.

Referenced by ptwXY_simplePrint().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void ptwXY_update_biSectionMax ( ptwXYPoints ptwXY1,
double  oldLength 
)

Definition at line 31 of file ptwXY_misc.cc.

View newest version in sPHENIX GitHub at line 31 of file ptwXY_misc.cc

References ptwXYPoints_s::biSectionMax, G4Log(), ptwXYPoints_s::length, and ptwXY_maxBiSectionMax.

Referenced by ptwXY_applyFunction(), ptwXY_div_ptwXY(), and ptwXY_mul2_ptwXY().

+ Here is the call graph for this function:

+ Here is the caller graph for this function: