Geant4  10.02.p01
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)
 
ptwXYPoints * ptwXY_createFromFunction (int n, double *xs, ptwXY_createFromFunction_callback func, void *argList, double accuracy, int checkForRoots, int biSectionMax, nfu_status *status)
 
ptwXYPoints * ptwXY_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)
 
ptwXYPoints * ptwXY_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 143 of file ptwXY_misc.cc.

References ptwXY_applyFunction2(), ptwXY_simpleCoalescePoints(), and ptwXY_update_biSectionMax().

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 172 of file ptwXY_misc.cc.

References DBL_EPSILON, ptwXY_applyFunctionZeroCrossing(), ptwXY_interpolatePoint(), and ptwXY_setValueAtX().

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 198 of file ptwXY_misc.cc.

References ptwXY_interpolatePoint(), and ptwXY_setValueAtX().

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.

References DBL_EPSILON, eps, n, ptwXY_createFromFunctionBisect(), ptwXY_createFromFunctionZeroCrossing(), ptwXY_free(), ptwXY_new(), ptwXY_setValueAtX_overrideIfClose(), and ptwXY_simpleCoalescePoints().

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.

References 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.

References DBL_EPSILON, ptwXY_interpolatePoint(), ptwXY_setValueAtX_overrideIfClose(), and x.

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.

References ptwXY_setValueAtX_overrideIfClose(), and x.

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 230 of file ptwXY_misc.cc.

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

+ Here is the call graph for this function:

void ptwXY_showInteralStructure ( ptwXYPoints *  ptwXY,
FILE *  f,
int  printPointersAsNull 
)

Definition at line 247 of file ptwXY_misc.cc.

References n, ptwXY_getNonOverflowLength(), and ptwXY_getPointAtIndex().

+ Here is the call graph for this function:

void ptwXY_simplePrint ( ptwXYPoints *  ptwXY,
char *  format 
)

Definition at line 292 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 279 of file ptwXY_misc.cc.

References ptwXY_getPointAtIndex().

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.

References G4Log().

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: