Geant4  v4-10.4-release
 모두 클래스 네임스페이스들 파일들 함수 변수 타입정의 열거형 타입 열거형 멤버 Friends 매크로 그룹들 페이지들
ptwXY.h
이 파일의 문서화 페이지로 가기
1 /*
2 # <<BEGIN-copyright>>
3 # <<END-copyright>>
4 */
5 
6 #ifndef ptwXY_h_included
7 #define ptwXY_h_included
8 
9 #include <stdio.h>
10 #include <stdint.h>
11 
12 #include <nf_utilities.h>
13 #include <ptwX.h>
14 
15 #if defined __cplusplus
16  extern "C" {
17  namespace GIDI {
18 #endif
19 
20 #define ptwXY_minimumSize 10 /* This must be > 0 otherwise some logic will fail. */
21 #define ptwXY_minimumOverflowSize 4 /* This must be > 0 otherwise some logic will fail. */
22 #define ptwXY_maxBiSectionMax 20
23 #define ptwXY_minAccuracy 1e-14
24 #define ptwXY_sectionSubdivideMax 1 << 16
25 #define ClosestAllowXFactor 10
26 
29 
30 /* The next macro are used in the routine ptwXY_union. */
31 #define ptwXY_union_fill 1 /* If filling, union is filled with y value of first ptw. */
32 #define ptwXY_union_trim 2 /* If trimming, union in only over common domain of ptw1 and ptw2. */
33 #define ptwXY_union_mergeClosePoints 4 /* If true, union calls ptwXY_mergeClosePoints with eps = 4 * DBL_EPSILON. */
37 
38 /*
39 * The function ptwXY_getPointsAroundX determines where an x fits into a ptwXY instance. It returns/sets the following.
40 *
41 * if ( some point's x == x )
42 * lessThanEqualXPoint is set to point's information (prior, next, index, x, y),
43 * greaterThanXPoint is set to a overflowHeader,
44 * return( ptwXY_lessEqualGreaterX_equal ).
45 * else if ( x < first point's x )
46 * lessThanEqualXPoint is set to overflowHeader,
47 * greaterThanXPoint is set to first point's information,
48 * and greaterThanXPoint.prior points to the overflow which will be before the new point when the new point is inserted into overflowPoints.
49 * else if ( x > last point's x )
50 * lessThanEqualXPoint is set to last point's information
51 * greaterThanXPoint is set to a overflowHeader point
52 * and lessThanEqualXPoint.prior points to the overflow which will be before new point when the new point is inserted into overflowPoints.
53 * else
54 * lessThanEqualXPoint is set to point's information for closes point with point's x <= x
55 * greaterThanXPoint is set to point's information for closes point with point's x > x
56 */
59 
60 typedef
61  struct ptwXYPoint_s {
62  double x, y;
63  } ptwXYPoint;
64 
65 typedef nfu_status (*ptwXY_createFromFunction_callback)( double x, double *y, void *argList );
66 typedef nfu_status (*ptwXY_applyFunction_callback)( ptwXYPoint *point, void *argList );
67 typedef nfu_status (*ptwXY_getValue_callback)( void *argList, double x, double *y, double x1, double y1, double x2, double y2 );
68 
69 typedef struct {
70  char const *interpolationString;
72  void *argList;
74 
75 typedef
76  struct ptwXYOverflowPoint_s {
79  int64_t index; /* For overflowHeader set to -1. */
82 
83 typedef
84  struct ptwXYPoints_s {
89  int userFlag;
90  double biSectionMax;
91  double accuracy;
93  int64_t length;
94  int64_t allocatedSize;
95  int64_t overflowLength;
101  } ptwXYPoints;
102 
103 /*
104 * Routines in ptwXY_core.c
105 */
106 ptwXYPoints *ptwXY_new( ptwXY_interpolation interpolation, ptwXY_interpolationOtherInfo const *interpolationOtherInfo, double biSectionMax,
107  double accuracy, int64_t primarySize, int64_t secondarySize, nfu_status *status, int userFlag );
108 nfu_status ptwXY_setup( ptwXYPoints *ptwXY, ptwXY_interpolation interpolation, ptwXY_interpolationOtherInfo const *interpolationOtherInfo,
109  double biSectionMax, double accuracy, int64_t primarySize, int64_t secondarySize, int userFlag );
110 ptwXYPoints *ptwXY_create( ptwXY_interpolation interpolation, ptwXY_interpolationOtherInfo const *interpolationOtherInfo,
111  double biSectionMax, double accuracy, int64_t primarySize, int64_t secondarySize, int64_t length, double const *xy,
112  nfu_status *status, int userFlag );
113 ptwXYPoints *ptwXY_createFrom_Xs_Ys( ptwXY_interpolation interpolation, ptwXY_interpolationOtherInfo const *interpolationOtherInfo,
114  double biSectionMax, double accuracy, int64_t primarySize, int64_t secondarySize, int64_t length, double const *Xs,
115  double const *Ys, nfu_status *status, int userFlag );
116 
118 ptwXYPoints *ptwXY_clone( ptwXYPoints *ptwXY, nfu_status *status );
120 ptwXYPoints *ptwXY_slice( ptwXYPoints *ptwXY, int64_t index1, int64_t index2, int64_t secondarySize, nfu_status *status );
121 ptwXYPoints *ptwXY_xSlice( ptwXYPoints *ptwXY, double xMin, double xMax, int64_t secondarySize, int fill, nfu_status *status );
122 ptwXYPoints *ptwXY_xMinSlice( ptwXYPoints *ptwXY, double xMin, int64_t secondarySize, int fill, nfu_status *status );
123 ptwXYPoints *ptwXY_xMaxSlice( ptwXYPoints *ptwXY, double xMax, int64_t secondarySize, int fill, nfu_status *status );
124 
126 char const *ptwXY_getInterpolationString( ptwXYPoints *ptwXY );
128 int ptwXY_getUserFlag( ptwXYPoints *ptwXY );
129 void ptwXY_setUserFlag( ptwXYPoints *ptwXY, int userFlag );
130 double ptwXY_getAccuracy( ptwXYPoints *ptwXY );
131 double ptwXY_setAccuracy( ptwXYPoints *ptwXY, double accuracy );
132 double ptwXY_getBiSectionMax( ptwXYPoints *ptwXY );
133 double ptwXY_setBiSectionMax( ptwXYPoints *ptwXY, double biSectionMax );
134 
135 nfu_status ptwXY_reallocatePoints( ptwXYPoints *ptwXY, int64_t size, int forceSmallerResize );
137 nfu_status ptwXY_coalescePoints( ptwXYPoints *ptwXY, int64_t size, ptwXYPoint *newPoint, int forceSmallerResize );
139 
143 
144 int64_t ptwXY_length( ptwXYPoints *ptwXY );
145 int64_t ptwXY_getNonOverflowLength( ptwXYPoints const *ptwXY );
146 
147 nfu_status ptwXY_setXYData( ptwXYPoints *ptwXY, int64_t length, double const *xy );
148 nfu_status ptwXY_setXYDataFromXsAndYs( ptwXYPoints *ptwXY, int64_t length, double const *x, double const *y );
149 nfu_status ptwXY_deletePoints( ptwXYPoints *ptwXY, int64_t i1, int64_t i2 );
150 ptwXYPoint *ptwXY_getPointAtIndex( ptwXYPoints *ptwXY, int64_t index );
151 ptwXYPoint *ptwXY_getPointAtIndex_Unsafely( ptwXYPoints *ptwXY, int64_t index );
152 nfu_status ptwXY_getXYPairAtIndex( ptwXYPoints *ptwXY, int64_t index, double *x, double *y );
153 ptwXY_lessEqualGreaterX ptwXY_getPointsAroundX( ptwXYPoints *ptwXY, double x, ptwXYOverflowPoint *lessThanEqualXPoint, ptwXYOverflowPoint *greaterThanXPoint );
155  ptwXYOverflowPoint *greaterThanXPoint, double eps, int *closeIsEqual, ptwXYPoint **closePoint );
156 nfu_status ptwXY_getValueAtX( ptwXYPoints *ptwXY, double x, double *y );
157 nfu_status ptwXY_setValueAtX( ptwXYPoints *ptwXY, double x, double y );
158 nfu_status ptwXY_setValueAtX_overrideIfClose( ptwXYPoints *ptwXY, double x, double y, double eps, int override );
159 nfu_status ptwXY_mergeFromXsAndYs( ptwXYPoints *ptwXY, int length, double *xs, double *ys );
160 nfu_status ptwXY_mergeFromXYs( ptwXYPoints *ptwXY, int length, double *xys );
161 nfu_status ptwXY_appendXY( ptwXYPoints *ptwXY, double x, double y );
162 nfu_status ptwXY_setXYPairAtIndex( ptwXYPoints *ptwXY, int64_t index, double x, double y );
163 
164 nfu_status ptwXY_getSlopeAtX( ptwXYPoints *ptwXY, double x, const char side, double *slope );
165 
166 double ptwXY_getXMinAndFrom( ptwXYPoints *ptwXY, ptwXY_dataFrom *dataFrom );
167 double ptwXY_getXMin( ptwXYPoints *ptwXY );
168 double ptwXY_getXMaxAndFrom( ptwXYPoints *ptwXY, ptwXY_dataFrom *dataFrom );
169 double ptwXY_getXMax( ptwXYPoints *ptwXY );
170 double ptwXY_getYMin( ptwXYPoints *ptwXY );
171 double ptwXY_getYMax( ptwXYPoints *ptwXY );
172 
173 /*
174 * Methods in ptwXY_methods.c
175 */
176 nfu_status ptwXY_clip( ptwXYPoints *ptwXY1, double yMin, double yMax );
177 nfu_status ptwXY_thicken( ptwXYPoints *ptwXY1, int sectionSubdivideMax, double dxMax, double fxMax );
178 ptwXYPoints *ptwXY_thin( ptwXYPoints *ptwXY1, double accuracy, nfu_status *status );
180 
181 ptwXYPoints *ptwXY_union( ptwXYPoints *ptwXY1, ptwXYPoints *ptwXY2, nfu_status *status, int unionOptions );
182 
183 nfu_status ptwXY_scaleOffsetXAndY( ptwXYPoints *ptwXY, double xScale, double xOffset, double yScale, double yOffset );
184 
185 /*
186 * Functions in ptwXY_unitaryOperators.c
187 */
190 
191 /*
192 * Functions in ptwXY_binaryOperators.c
193 */
194 nfu_status ptwXY_slopeOffset( ptwXYPoints *ptwXY, double slope, double offset );
195 nfu_status ptwXY_add_double( ptwXYPoints *ptwXY, double value );
198 nfu_status ptwXY_mul_double( ptwXYPoints *ptwXY, double value );
201 nfu_status ptwXY_mod( ptwXYPoints *ptwXY, double m, int pythonMod );
202 
203 ptwXYPoints *ptwXY_binary_ptwXY( ptwXYPoints *ptwXY1, ptwXYPoints *ptwXY2, double v1, double v2, double v1v2, nfu_status *status );
204 ptwXYPoints *ptwXY_add_ptwXY( ptwXYPoints *ptwXY1, ptwXYPoints *ptwXY2, nfu_status *status );
205 ptwXYPoints *ptwXY_sub_ptwXY( ptwXYPoints *ptwXY1, ptwXYPoints *ptwXY2, nfu_status *status );
206 ptwXYPoints *ptwXY_mul_ptwXY( ptwXYPoints *ptwXY1, ptwXYPoints *ptwXY2, nfu_status *status );
207 ptwXYPoints *ptwXY_mul2_ptwXY( ptwXYPoints *ptwXY1, ptwXYPoints *ptwXY2, nfu_status *status );
208 ptwXYPoints *ptwXY_div_ptwXY( ptwXYPoints *ptwXY1, ptwXYPoints *ptwXY2, nfu_status *status, int safeDivide );
209 
210 /*
211 * Functions in ptwXY_functions.c
212 */
213 nfu_status ptwXY_pow( ptwXYPoints *ptwXY, double p );
214 nfu_status ptwXY_exp( ptwXYPoints *ptwXY, double a );
215 ptwXYPoints *ptwXY_convolution( ptwXYPoints *ptwXY1, ptwXYPoints *ptwXY2, nfu_status *status, int mode );
216 
217 /*
218 * Functions in ptwXY_interpolation.c
219 */
220 nfu_status ptwXY_interpolatePoint( ptwXY_interpolation interpolation, double x, double *y, double x1, double y1, double x2, double y2 );
221 ptwXYPoints *ptwXY_flatInterpolationToLinear( ptwXYPoints *ptwXY, double lowerEps, double upperEps, nfu_status *status );
222 ptwXYPoints *ptwXY_toOtherInterpolation( ptwXYPoints *ptwXY, ptwXY_interpolation interpolation, double accuracy, nfu_status *status );
223 ptwXYPoints *ptwXY_unitbaseInterpolate( double w, double w1, ptwXYPoints *ptwXY1, double w2, ptwXYPoints *ptwXY2, nfu_status *status );
225 ptwXYPoints *ptwXY_fromUnitbase( ptwXYPoints *ptwXY, double xMin, double xMax, nfu_status *status );
226 
227 /*
228 * Functions in ptwXY_convenient.c
229 */
231 nfu_status ptwXY_dullEdges( ptwXYPoints *ptwXY, double lowerEps, double upperEps, int positiveXOnly );
235 nfu_status ptwXY_tweakDomainsToMutualify( ptwXYPoints *ptwXY1, ptwXYPoints *ptwXY2, int epsilonFactor, double epsilon );
236 nfu_status ptwXY_mutualifyDomains( ptwXYPoints *ptwXY1, double lowerEps1, double upperEps1, int positiveXOnly1,
237  ptwXYPoints *ptwXY2, double lowerEps2, double upperEps2, int positiveXOnly2 );
238 nfu_status ptwXY_copyToC_XY( ptwXYPoints *ptwXY, int64_t index1, int64_t index2, int64_t allocatedSize, int64_t *numberOfPoints, double *xy );
239 nfu_status ptwXY_valueTo_ptwXAndY( ptwXYPoints *ptwXY, double **xs, double **ys );
240 ptwXYPoints *ptwXY_valueTo_ptwXY( double x1, double x2, double y, nfu_status *status );
241 ptwXYPoints *ptwXY_createGaussianCenteredSigma1( double accuracy, nfu_status *status );
242 ptwXYPoints *ptwXY_createGaussian( double accuracy, double xCenter, double sigma, double amplitude, double xMin, double xMax,
243  double dullEps, nfu_status *status );
244 
245 /*
246 * Functions in ptwXY_misc.c
247 */
248 void ptwXY_update_biSectionMax( ptwXYPoints *ptwXY1, double oldLength );
249 ptwXYPoints *ptwXY_createFromFunction( int n, double *xs, ptwXY_createFromFunction_callback func, void *argList, double accuracy, int checkForRoots,
250  int biSectionMax, nfu_status *status );
251 ptwXYPoints *ptwXY_createFromFunction2( ptwXPoints *xs, ptwXY_createFromFunction_callback func, void *argList, double accuracy, int checkForRoots,
252  int biSectionMax, nfu_status *status );
253 nfu_status ptwXY_applyFunction( ptwXYPoints *ptwXY1, ptwXY_applyFunction_callback func, void *argList, int checkForRoots );
254 ptwXYPoints *ptwXY_fromString( char const *str, ptwXY_interpolation interpolation, ptwXY_interpolationOtherInfo const *interpolationOtherInfo,
255  double biSectionMax, double accuracy, char **endCharacter, nfu_status *status );
256 
257 void ptwXY_showInteralStructure( ptwXYPoints *ptwXY, FILE *f, int printPointersAsNull );
258 void ptwXY_simpleWrite( ptwXYPoints *ptwXY, FILE *f, char *format );
259 void ptwXY_simplePrint( ptwXYPoints *ptwXY, char *format );
260 
261 /*
262 * Functions in ptwXY_integration.c
263 */
264 nfu_status ptwXY_f_integrate( ptwXY_interpolation interpolation, double x1, double y1, double x2, double y2, double *value );
265 double ptwXY_integrate( ptwXYPoints *ptwXY, double xMin, double xMax, nfu_status *status );
266 double ptwXY_integrateDomain( ptwXYPoints *ptwXY, nfu_status *status );
269 double ptwXY_integrateWithWeight_x( ptwXYPoints *ptwXY, double xMin, double xMax, nfu_status *status );
271 double ptwXY_integrateWithWeight_sqrt_x( ptwXYPoints *ptwXY, double xMin, double xMax, nfu_status *status );
272 ptwXPoints *ptwXY_groupOneFunction( ptwXYPoints *ptwXY, ptwXPoints *groupBoundaries, ptwXY_group_normType normType, ptwXPoints *ptwX_norm, nfu_status *status );
273 ptwXPoints *ptwXY_groupTwoFunctions( ptwXYPoints *ptwXY1, ptwXYPoints *ptwXY2, ptwXPoints *groupBoundaries, ptwXY_group_normType normType,
274  ptwXPoints *ptwX_norm, nfu_status *status );
275 ptwXPoints *ptwXY_groupThreeFunctions( ptwXYPoints *ptwXY1, ptwXYPoints *ptwXY2, ptwXYPoints *ptwXY3, ptwXPoints *groupBoundaries,
276  ptwXY_group_normType normType, ptwXPoints *ptwX_norm, nfu_status *status );
279  double xMin, double xMax, int degree, int recursionLimit, double tolerance, nfu_status *status );
280 
281 #if defined __cplusplus
282  }
283  }
284 #endif
285 
286 #endif /* End of ptwXY_h_included. */
Float_t x
Definition: compare.C:6
nfu_status ptwXY_release(ptwXYPoints *ptwXY)
Definition: ptwXY_core.cc:549
nfu_status ptwXY_getSlopeAtX(ptwXYPoints *ptwXY, double x, const char side, double *slope)
Definition: ptwXY_core.cc:1139
nfu_status ptwXY_sub_fromDouble(ptwXYPoints *ptwXY, double value)
ptwXYPoints * ptwXY_flatInterpolationToLinear(ptwXYPoints *ptwXY, double lowerEps, double upperEps, nfu_status *status)
ptwXYOverflowPoint * overflowPoints
Definition: ptwXY.h:100
enum ptwXY_dataFrom_e ptwXY_dataFrom
ptwXYPoints * ptwXY_xSlice(ptwXYPoints *ptwXY, double xMin, double xMax, int64_t secondarySize, int fill, nfu_status *status)
Definition: ptwXY_core.cc:274
ptwXYPoint * points
Definition: ptwXY.h:99
ptwXYPoints * ptwXY_new(ptwXY_interpolation interpolation, ptwXY_interpolationOtherInfo const *interpolationOtherInfo, double biSectionMax, double accuracy, int64_t primarySize, int64_t secondarySize, nfu_status *status, int userFlag)
Definition: ptwXY_core.cc:29
double accuracy
Definition: ptwXY.h:91
std::vector< ExP01TrackerHit * > a
Definition: ExP01Classes.hh:33
ptwXYPoints * ptwXY_createFrom_Xs_Ys(ptwXY_interpolation interpolation, ptwXY_interpolationOtherInfo const *interpolationOtherInfo, double biSectionMax, double accuracy, int64_t primarySize, int64_t secondarySize, int64_t length, double const *Xs, double const *Ys, nfu_status *status, int userFlag)
Definition: ptwXY_core.cc:126
ptwXYPoints * ptwXY_createFromFunction(int n, double *xs, ptwXY_createFromFunction_callback func, void *argList, double accuracy, int checkForRoots, int biSectionMax, nfu_status *status)
Definition: ptwXY_misc.cc:40
nfu_status ptwXY_slopeOffset(ptwXYPoints *ptwXY, double slope, double offset)
void ptwXY_showInteralStructure(ptwXYPoints *ptwXY, FILE *f, int printPointersAsNull)
Definition: ptwXY_misc.cc:253
Float_t y1[n_points_granero]
Definition: compare.C:5
double ptwXY_getAccuracy(ptwXYPoints *ptwXY)
Definition: ptwXY_core.cc:372
ptwXYPoints * ptwXY_clone(ptwXYPoints *ptwXY, nfu_status *status)
Definition: ptwXY_core.cc:208
int64_t ptwXY_length(ptwXYPoints *ptwXY)
Definition: ptwXY_core.cc:583
enum ptwXY_interpolation_e ptwXY_interpolation
int ptwXY_getUserFlag(ptwXYPoints *ptwXY)
Definition: ptwXY_core.cc:358
nfu_status ptwXY_dullEdges(ptwXYPoints *ptwXY, double lowerEps, double upperEps, int positiveXOnly)
ptwXY_lessEqualGreaterX ptwXY_getPointsAroundX(ptwXYPoints *ptwXY, double x, ptwXYOverflowPoint *lessThanEqualXPoint, ptwXYOverflowPoint *greaterThanXPoint)
Definition: ptwXY_core.cc:710
double ptwXY_setBiSectionMax(ptwXYPoints *ptwXY, double biSectionMax)
Definition: ptwXY_core.cc:397
int64_t ptwXY_getNonOverflowLength(ptwXYPoints const *ptwXY)
Definition: ptwXY_core.cc:590
ptwXY_group_normType_e
Definition: ptwXY.h:28
Float_t x1[n_points_granero]
Definition: compare.C:5
double ptwXY_getXMax(ptwXYPoints *ptwXY)
Definition: ptwXY_core.cc:1239
void ptwXY_simpleWrite(ptwXYPoints *ptwXY, FILE *f, char *format)
Definition: ptwXY_misc.cc:285
nfu_status ptwXY_copyToC_XY(ptwXYPoints *ptwXY, int64_t index1, int64_t index2, int64_t allocatedSize, int64_t *numberOfPoints, double *xy)
ptwXPoints * ptwXY_groupThreeFunctions(ptwXYPoints *ptwXY1, ptwXYPoints *ptwXY2, ptwXYPoints *ptwXY3, ptwXPoints *groupBoundaries, ptwXY_group_normType normType, ptwXPoints *ptwX_norm, nfu_status *status)
Float_t y
Definition: compare.C:6
nfu_status(* ptwXY_createFromFunction_callback)(double x, double *y, void *argList)
Definition: ptwXY.h:65
const char * p
Definition: xmltok.h:285
char const * ptwXY_getInterpolationString(ptwXYPoints *ptwXY)
Definition: ptwXY_core.cc:344
nfu_status ptwXY_f_integrate(ptwXY_interpolation interpolation, double x1, double y1, double x2, double y2, double *value)
nfu_status ptwXY_setXYDataFromXsAndYs(ptwXYPoints *ptwXY, int64_t length, double const *x, double const *y)
Definition: ptwXY_core.cc:631
ptwXYPoints * ptwXY_createGaussianCenteredSigma1(double accuracy, nfu_status *status)
ptwXY_lessEqualGreaterX_e
Definition: ptwXY.h:57
ptwXYPoints * ptwXY_sub_ptwXY(ptwXYPoints *ptwXY1, ptwXYPoints *ptwXY2, nfu_status *status)
enum ptwXY_group_normType_e ptwXY_group_normType
double ptwXY_integrate(ptwXYPoints *ptwXY, double xMin, double xMax, nfu_status *status)
enum ptwXY_sigma_e ptwXY_sigma
struct ptwXYOverflowPoint_s ptwXYOverflowPoint
double y
Definition: ptwXY.h:62
ptwXPoints * ptwXY_runningIntegral(ptwXYPoints *ptwXY, nfu_status *status)
nfu_status ptwXY_neg(ptwXYPoints *ptwXY)
ptwXYPoints * ptwXY_mul2_ptwXY(ptwXYPoints *ptwXY1, ptwXYPoints *ptwXY2, nfu_status *status)
struct ptwXYOverflowPoint_s * next
Definition: ptwXY.h:78
double ptwXY_getXMaxAndFrom(ptwXYPoints *ptwXY, ptwXY_dataFrom *dataFrom)
Definition: ptwXY_core.cc:1215
nfu_status ptwXY_setXYData(ptwXYPoints *ptwXY, int64_t length, double const *xy)
Definition: ptwXY_core.cc:597
ptwXY_sigma_e
Definition: ptwXY.h:34
nfu_status ptwXY_clear(ptwXYPoints *ptwXY)
Definition: ptwXY_core.cc:536
double ptwXY_integrateWithWeight_x(ptwXYPoints *ptwXY, double xMin, double xMax, nfu_status *status)
ptwXY_sigma typeY
Definition: ptwXY.h:86
nfu_status ptwXY_mutualifyDomains(ptwXYPoints *ptwXY1, double lowerEps1, double upperEps1, int positiveXOnly1, ptwXYPoints *ptwXY2, double lowerEps2, double upperEps2, int positiveXOnly2)
double ptwXY_integrateDomainWithWeight_x(ptwXYPoints *ptwXY, nfu_status *status)
ptwXPoints * ptwXY_groupTwoFunctions(ptwXYPoints *ptwXY1, ptwXYPoints *ptwXY2, ptwXPoints *groupBoundaries, ptwXY_group_normType normType, ptwXPoints *ptwX_norm, nfu_status *status)
nfu_status ptwXY_valueTo_ptwXAndY(ptwXYPoints *ptwXY, double **xs, double **ys)
Float_t y2[n_points_geant4]
Definition: compare.C:26
nfu_status ptwXY_coalescePoints(ptwXYPoints *ptwXY, int64_t size, ptwXYPoint *newPoint, int forceSmallerResize)
Definition: ptwXY_core.cc:469
int64_t overflowLength
Definition: ptwXY.h:95
nfu_status ptwXY_copy(ptwXYPoints *dest, ptwXYPoints *src)
Definition: ptwXY_core.cc:148
double minFractional_dx
Definition: ptwXY.h:92
nfu_status ptwXY_applyFunction(ptwXYPoints *ptwXY1, ptwXY_applyFunction_callback func, void *argList, int checkForRoots)
Definition: ptwXY_misc.cc:146
nfu_status ptwXY_clip(ptwXYPoints *ptwXY1, double yMin, double yMax)
nfu_status ptwXY_mergeFromXYs(ptwXYPoints *ptwXY, int length, double *xys)
Definition: ptwXY_core.cc:973
double ptwXY_integrateDomain(ptwXYPoints *ptwXY, nfu_status *status)
static constexpr double m
Definition: G4SIunits.hh:129
ptwXYPoints * ptwXY_div_ptwXY(ptwXYPoints *ptwXY1, ptwXYPoints *ptwXY2, nfu_status *status, int safeDivide)
double biSectionMax
Definition: ptwXY.h:90
nfu_status ptwXY_trim(ptwXYPoints *ptwXY)
nfu_status ptwXY_add_double(ptwXYPoints *ptwXY, double value)
int64_t allocatedSize
Definition: ptwXY.h:94
int userFlag
Definition: ptwXY.h:89
ptwXYPoints * ptwXY_fromString(char const *str, ptwXY_interpolation interpolation, ptwXY_interpolationOtherInfo const *interpolationOtherInfo, double biSectionMax, double accuracy, char **endCharacter, nfu_status *status)
Definition: ptwXY_misc.cc:236
ptwXYPoints * ptwXY_xMaxSlice(ptwXYPoints *ptwXY, double xMax, int64_t secondarySize, int fill, nfu_status *status)
Definition: ptwXY_core.cc:326
double ptwXY_integrateWithFunction(ptwXYPoints *ptwXY, ptwXY_createFromFunction_callback func, void *argList, double xMin, double xMax, int degree, int recursionLimit, double tolerance, nfu_status *status)
ptwXYPoints * ptwXY_union(ptwXYPoints *ptwXY1, ptwXYPoints *ptwXY2, nfu_status *status, int unionOptions)
ptwXYPoints * ptwXY_fromUnitbase(ptwXYPoints *ptwXY, double xMin, double xMax, nfu_status *status)
const XML_Char int const XML_Char * value
Definition: expat.h:331
ptwXYPoints * ptwXY_valueTo_ptwXY(double x1, double x2, double y, nfu_status *status)
struct ptwXYPoint_s ptwXYPoint
nfu_status ptwXY_mul_double(ptwXYPoints *ptwXY, double value)
nfu_status ptwXY_setValueAtX_overrideIfClose(ptwXYPoints *ptwXY, double x, double y, double eps, int override)
Definition: ptwXY_core.cc:883
nfu_status ptwXY_pow(ptwXYPoints *ptwXY, double p)
double ptwXY_getBiSectionMax(ptwXYPoints *ptwXY)
Definition: ptwXY_core.cc:390
ptwXY_lessEqualGreaterX ptwXY_getPointsAroundX_closeIsEqual(ptwXYPoints *ptwXY, double x, ptwXYOverflowPoint *lessThanEqualXPoint, ptwXYOverflowPoint *greaterThanXPoint, double eps, int *closeIsEqual, ptwXYPoint **closePoint)
Definition: ptwXY_core.cc:720
ptwXPoints * ptwXY_getXArray(ptwXYPoints *ptwXY, nfu_status *status)
ptwXY_interpolationOtherInfo interpolationOtherInfo
Definition: ptwXY.h:88
nfu_status ptwXY_reallocatePoints(ptwXYPoints *ptwXY, int64_t size, int forceSmallerResize)
Definition: ptwXY_core.cc:410
enum nfu_status_e nfu_status
nfu_status ptwXY_areDomainsMutual(ptwXYPoints *ptwXY1, ptwXYPoints *ptwXY2)
nfu_status ptwXY_getValueAtX(ptwXYPoints *ptwXY, double x, double *y)
Definition: ptwXY_core.cc:844
char const * interpolationString
Definition: ptwXY.h:70
nfu_status ptwXY_mergeClosePoints(ptwXYPoints *ptwXY, double epsilon)
nfu_status ptwXY_exp(ptwXYPoints *ptwXY, double a)
ptwXY_interpolation_e
Definition: ptwXY.h:35
ptwXYPoints * ptwXY_intersectionWith_ptwX(ptwXYPoints *ptwXY, ptwXPoints *ptwX, nfu_status *status)
ptwXYPoints * ptwXY_slice(ptwXYPoints *ptwXY, int64_t index1, int64_t index2, int64_t secondarySize, nfu_status *status)
Definition: ptwXY_core.cc:248
double ptwXY_getXMinAndFrom(ptwXYPoints *ptwXY, ptwXY_dataFrom *dataFrom)
Definition: ptwXY_core.cc:1182
ptwXY_interpolation interpolation
Definition: ptwXY.h:87
ptwXYPoints * ptwXY_cloneToInterpolation(ptwXYPoints *ptwXY, ptwXY_interpolation interpolationTo, nfu_status *status)
Definition: ptwXY_core.cc:215
nfu_status ptwXY_mod(ptwXYPoints *ptwXY, double m, int pythonMod)
nfu_status ptwXY_mergeFromXsAndYs(ptwXYPoints *ptwXY, int length, double *xs, double *ys)
Definition: ptwXY_core.cc:966
ptwXYPoint point
Definition: ptwXY.h:80
double epsilon(double density, double temperature)
ptwXYPoint * ptwXY_getPointAtIndex(ptwXYPoints *ptwXY, int64_t index)
Definition: ptwXY_core.cc:675
void ptwXY_simplePrint(ptwXYPoints *ptwXY, char *format)
Definition: ptwXY_misc.cc:298
int64_t mallocFailedSize
Definition: ptwXY.h:97
ptwXY_dataFrom_e
Definition: ptwXY.h:27
nfu_status(* ptwXY_applyFunction_callback)(ptwXYPoint *point, void *argList)
Definition: ptwXY.h:66
void ptwXY_update_biSectionMax(ptwXYPoints *ptwXY1, double oldLength)
Definition: ptwXY_misc.cc:31
nfu_status ptwXY_setXYPairAtIndex(ptwXYPoints *ptwXY, int64_t index, double x, double y)
Definition: ptwXY_core.cc:1098
nfu_status(* ptwXY_getValue_callback)(void *argList, double x, double *y, double x1, double y1, double x2, double y2)
Definition: ptwXY.h:67
nfu_status ptwXY_div_doubleFrom(ptwXYPoints *ptwXY, double value)
ptwXYPoint * ptwXY_getPointAtIndex_Unsafely(ptwXYPoints *ptwXY, int64_t index)
Definition: ptwXY_core.cc:684
double ptwXY_getYMin(ptwXYPoints *ptwXY)
Definition: ptwXY_core.cc:1248
ptwXYPoints * ptwXY_createFromFunction2(ptwXPoints *xs, ptwXY_createFromFunction_callback func, void *argList, double accuracy, int checkForRoots, int biSectionMax, nfu_status *status)
Definition: ptwXY_misc.cc:89
nfu_status ptwXY_appendXY(ptwXYPoints *ptwXY, double x, double y)
Definition: ptwXY_core.cc:1062
nfu_status ptwXY_getXYPairAtIndex(ptwXYPoints *ptwXY, int64_t index, double *x, double *y)
Definition: ptwXY_core.cc:698
ptwXYPoints * ptwXY_thin(ptwXYPoints *ptwXY1, double accuracy, nfu_status *status)
int64_t index
Definition: ptwXY.h:79
ptwXYPoints * ptwXY_toOtherInterpolation(ptwXYPoints *ptwXY, ptwXY_interpolation interpolation, double accuracy, nfu_status *status)
ptwXYPoints * ptwXY_free(ptwXYPoints *ptwXY)
Definition: ptwXY_core.cc:574
double ptwXY_getYMax(ptwXYPoints *ptwXY)
Definition: ptwXY_core.cc:1269
ptwXYPoints * ptwXY_create(ptwXY_interpolation interpolation, ptwXY_interpolationOtherInfo const *interpolationOtherInfo, double biSectionMax, double accuracy, int64_t primarySize, int64_t secondarySize, int64_t length, double const *xy, nfu_status *status, int userFlag)
Definition: ptwXY_core.cc:108
nfu_status ptwXY_reallocateOverflowPoints(ptwXYPoints *ptwXY, int64_t size)
Definition: ptwXY_core.cc:439
ptwXPoints * ptwXY_groupOneFunction(ptwXYPoints *ptwXY, ptwXPoints *groupBoundaries, ptwXY_group_normType normType, ptwXPoints *ptwX_norm, nfu_status *status)
nfu_status ptwXY_simpleCoalescePoints(ptwXYPoints *ptwXY)
Definition: ptwXY_core.cc:529
ptwXYPoints * ptwXY_unitbaseInterpolate(double w, double w1, ptwXYPoints *ptwXY1, double w2, ptwXYPoints *ptwXY2, nfu_status *status)
static constexpr double degree
Definition: G4SIunits.hh:144
ptwXYPoints * ptwXY_toUnitbase(ptwXYPoints *ptwXY, nfu_status *status)
ptwXYPoints * ptwXY_add_ptwXY(ptwXYPoints *ptwXY1, ptwXYPoints *ptwXY2, nfu_status *status)
double ptwXY_integrateWithWeight_sqrt_x(ptwXYPoints *ptwXY, double xMin, double xMax, nfu_status *status)
nfu_status ptwXY_setup(ptwXYPoints *ptwXY, ptwXY_interpolation interpolation, ptwXY_interpolationOtherInfo const *interpolationOtherInfo, double biSectionMax, double accuracy, int64_t primarySize, int64_t secondarySize, int userFlag)
Definition: ptwXY_core.cc:46
ptwXYPoints * ptwXY_binary_ptwXY(ptwXYPoints *ptwXY1, ptwXYPoints *ptwXY2, double v1, double v2, double v1v2, nfu_status *status)
enum ptwXY_lessEqualGreaterX_e ptwXY_lessEqualGreaterX
ptwXYPoints * ptwXY_xMinSlice(ptwXYPoints *ptwXY, double xMin, int64_t secondarySize, int fill, nfu_status *status)
Definition: ptwXY_core.cc:315
Char_t n[5]
nfu_status ptwXY_normalize(ptwXYPoints *ptwXY1)
nfu_status status
Definition: ptwXY.h:85
static const G4double eps
struct ptwXYOverflowPoint_s * prior
Definition: ptwXY.h:77
void ptwXY_setUserFlag(ptwXYPoints *ptwXY, int userFlag)
Definition: ptwXY_core.cc:365
ptwXY_getValue_callback getValueFunc
Definition: ptwXY.h:71
nfu_status ptwXY_thicken(ptwXYPoints *ptwXY1, int sectionSubdivideMax, double dxMax, double fxMax)
int64_t overflowAllocatedSize
Definition: ptwXY.h:96
ptwXYPoints * ptwXY_createGaussian(double accuracy, double xCenter, double sigma, double amplitude, double xMin, double xMax, double dullEps, nfu_status *status)
struct ptwXYPoints_s ptwXYPoints
Float_t x2[n_points_geant4]
Definition: compare.C:26
nfu_status ptwXY_interpolatePoint(ptwXY_interpolation interpolation, double x, double *y, double x1, double y1, double x2, double y2)
nfu_status ptwXY_deletePoints(ptwXYPoints *ptwXY, int64_t i1, int64_t i2)
Definition: ptwXY_core.cc:660
double ptwXY_getXMin(ptwXYPoints *ptwXY)
Definition: ptwXY_core.cc:1206
nfu_status ptwXY_tweakDomainsToMutualify(ptwXYPoints *ptwXY1, ptwXYPoints *ptwXY2, int epsilonFactor, double epsilon)
nfu_status ptwXY_sub_doubleFrom(ptwXYPoints *ptwXY, double value)
nfu_status ptwXY_setValueAtX(ptwXYPoints *ptwXY, double x, double y)
Definition: ptwXY_core.cc:876
nfu_status ptwXY_abs(ptwXYPoints *ptwXY)
ptwXYPoints * ptwXY_convolution(ptwXYPoints *ptwXY1, ptwXYPoints *ptwXY2, nfu_status *status, int mode)
nfu_status ptwXY_scaleOffsetXAndY(ptwXYPoints *ptwXY, double xScale, double xOffset, double yScale, double yOffset)
ptwXY_interpolation ptwXY_getInterpolation(ptwXYPoints *ptwXY)
Definition: ptwXY_core.cc:337
nfu_status ptwXY_getStatus(ptwXYPoints *ptwXY)
Definition: ptwXY_core.cc:351
double ptwXY_integrateDomainWithWeight_sqrt_x(ptwXYPoints *ptwXY, nfu_status *status)
double ptwXY_setAccuracy(ptwXYPoints *ptwXY, double accuracy)
Definition: ptwXY_core.cc:379
ptwXYPoints * ptwXY_mul_ptwXY(ptwXYPoints *ptwXY1, ptwXYPoints *ptwXY2, nfu_status *status)
int64_t length
Definition: ptwXY.h:93
nfu_status ptwXY_div_fromDouble(ptwXYPoints *ptwXY, double value)
ptwXYOverflowPoint overflowHeader
Definition: ptwXY.h:98