Geant4 Cross Reference

Cross-Referencing   Geant4
Geant4/processes/hadronic/models/lend/include/ptwXY.h

Version: [ ReleaseNotes ] [ 1.0 ] [ 1.1 ] [ 2.0 ] [ 3.0 ] [ 3.1 ] [ 3.2 ] [ 4.0 ] [ 4.0.p1 ] [ 4.0.p2 ] [ 4.1 ] [ 4.1.p1 ] [ 5.0 ] [ 5.0.p1 ] [ 5.1 ] [ 5.1.p1 ] [ 5.2 ] [ 5.2.p1 ] [ 5.2.p2 ] [ 6.0 ] [ 6.0.p1 ] [ 6.1 ] [ 6.2 ] [ 6.2.p1 ] [ 6.2.p2 ] [ 7.0 ] [ 7.0.p1 ] [ 7.1 ] [ 7.1.p1 ] [ 8.0 ] [ 8.0.p1 ] [ 8.1 ] [ 8.1.p1 ] [ 8.1.p2 ] [ 8.2 ] [ 8.2.p1 ] [ 8.3 ] [ 8.3.p1 ] [ 8.3.p2 ] [ 9.0 ] [ 9.0.p1 ] [ 9.0.p2 ] [ 9.1 ] [ 9.1.p1 ] [ 9.1.p2 ] [ 9.1.p3 ] [ 9.2 ] [ 9.2.p1 ] [ 9.2.p2 ] [ 9.2.p3 ] [ 9.2.p4 ] [ 9.3 ] [ 9.3.p1 ] [ 9.3.p2 ] [ 9.4 ] [ 9.4.p1 ] [ 9.4.p2 ] [ 9.4.p3 ] [ 9.4.p4 ] [ 9.5 ] [ 9.5.p1 ] [ 9.5.p2 ] [ 9.6 ] [ 9.6.p1 ] [ 9.6.p2 ] [ 9.6.p3 ] [ 9.6.p4 ] [ 10.0 ] [ 10.0.p1 ] [ 10.0.p2 ] [ 10.0.p3 ] [ 10.0.p4 ] [ 10.1 ] [ 10.1.p1 ] [ 10.1.p2 ] [ 10.1.p3 ] [ 10.2 ] [ 10.2.p1 ] [ 10.2.p2 ] [ 10.2.p3 ] [ 10.3 ] [ 10.3.p1 ] [ 10.3.p2 ] [ 10.3.p3 ] [ 10.4 ] [ 10.4.p1 ] [ 10.4.p2 ] [ 10.4.p3 ] [ 10.5 ] [ 10.5.p1 ] [ 10.6 ] [ 10.6.p1 ] [ 10.6.p2 ] [ 10.6.p3 ] [ 10.7 ] [ 10.7.p1 ] [ 10.7.p2 ] [ 10.7.p3 ] [ 10.7.p4 ] [ 11.0 ] [ 11.0.p1 ] [ 11.0.p2 ] [ 11.0.p3, ] [ 11.0.p4 ] [ 11.1 ] [ 11.1.1 ] [ 11.1.2 ] [ 11.1.3 ] [ 11.2 ] [ 11.2.1 ] [ 11.2.2 ] [ 11.3.0 ]

Diff markup

Differences between /processes/hadronic/models/lend/include/ptwXY.h (Version 11.3.0) and /processes/hadronic/models/lend/include/ptwXY.h (Version 10.3.p2)


  1 /*                                                  1 /*
  2 # <<BEGIN-copyright>>                               2 # <<BEGIN-copyright>>
  3 # <<END-copyright>>                                 3 # <<END-copyright>>
  4 */                                                  4 */
  5                                                     5 
  6 #ifndef ptwXY_h_included                            6 #ifndef ptwXY_h_included
  7 #define ptwXY_h_included                            7 #define ptwXY_h_included
  8                                                     8 
  9 #include <stdio.h>                                  9 #include <stdio.h>
 10 #include <stdint.h>                                10 #include <stdint.h>
 11                                                    11 
 12 #include <nf_utilities.h>                          12 #include <nf_utilities.h>
 13 #include <ptwX.h>                                  13 #include <ptwX.h>
 14                                                    14 
 15 #if defined __cplusplus                            15 #if defined __cplusplus
 16     extern "C" {                                   16     extern "C" {
 17     namespace GIDI {                               17     namespace GIDI {
 18 #endif                                             18 #endif
 19                                                    19 
 20 #define ptwXY_minimumSize 10            /* Thi     20 #define ptwXY_minimumSize 10            /* This must be > 0 otherwise some logic will fail. */
 21 #define ptwXY_minimumOverflowSize 4     /* Thi     21 #define ptwXY_minimumOverflowSize 4     /* This must be > 0 otherwise some logic will fail. */
 22 #define ptwXY_maxBiSectionMax 20                   22 #define ptwXY_maxBiSectionMax 20
 23 #define ptwXY_minAccuracy 1e-14                    23 #define ptwXY_minAccuracy 1e-14
 24 #define ptwXY_sectionSubdivideMax 1 << 16          24 #define ptwXY_sectionSubdivideMax 1 << 16
 25 #define ClosestAllowXFactor 10                     25 #define ClosestAllowXFactor 10
 26                                                    26 
 27 typedef enum ptwXY_dataFrom_e { ptwXY_dataFrom     27 typedef enum ptwXY_dataFrom_e { ptwXY_dataFrom_Unknown, ptwXY_dataFrom_Points, ptwXY_dataFrom_Overflow } ptwXY_dataFrom;
 28 typedef enum ptwXY_group_normType_e { ptwXY_gr     28 typedef enum ptwXY_group_normType_e { ptwXY_group_normType_none, ptwXY_group_normType_dx, ptwXY_group_normType_norm } ptwXY_group_normType;
 29                                                    29 
 30 /* The next macro are used in the routine ptwX     30 /* The next macro are used in the routine ptwXY_union. */
 31 #define ptwXY_union_fill 1              /* If      31 #define ptwXY_union_fill 1              /* If filling, union is filled with y value of first ptw. */
 32 #define ptwXY_union_trim 2              /* If      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      33 #define ptwXY_union_mergeClosePoints 4  /* If true, union calls ptwXY_mergeClosePoints with eps = 4 * DBL_EPSILON. */
 34 typedef enum ptwXY_sigma_e { ptwXY_sigma_none,     34 typedef enum ptwXY_sigma_e { ptwXY_sigma_none, ptwXY_sigma_plusMinus, ptwXY_sigma_Minus, ptwXY_sigma_plus } ptwXY_sigma;
 35 typedef enum ptwXY_interpolation_e { ptwXY_int     35 typedef enum ptwXY_interpolation_e { ptwXY_interpolationLinLin, ptwXY_interpolationLinLog, ptwXY_interpolationLogLin, ptwXY_interpolationLogLog,
 36     ptwXY_interpolationFlat, ptwXY_interpolati     36     ptwXY_interpolationFlat, ptwXY_interpolationOther } ptwXY_interpolation;
 37                                                    37 
 38 /*                                                 38 /*
 39 *  The function ptwXY_getPointsAroundX determi     39 *  The function ptwXY_getPointsAroundX determines where an x fits into a ptwXY instance. It returns/sets the following.
 40 *                                                  40 *
 41 *  if ( some point's x == x )                      41 *  if ( some point's x == x )
 42 *      lessThanEqualXPoint is set to point's i     42 *      lessThanEqualXPoint is set to point's information (prior, next, index, x, y),
 43 *      greaterThanXPoint is set to a overflowH     43 *      greaterThanXPoint is set to a overflowHeader,
 44 *      return( ptwXY_lessEqualGreaterX_equal )     44 *      return( ptwXY_lessEqualGreaterX_equal ).
 45 *   else if ( x < first point's x )                45 *   else if ( x < first point's x )
 46 *       lessThanEqualXPoint is set to overflow     46 *       lessThanEqualXPoint is set to overflowHeader,
 47 *       greaterThanXPoint is set to first poin     47 *       greaterThanXPoint is set to first point's information,
 48 *       and greaterThanXPoint.prior points to      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 )                 49 *   else if ( x > last point's x )
 50 *       lessThanEqualXPoint is set to last poi     50 *       lessThanEqualXPoint is set to last point's information
 51 *       greaterThanXPoint is set to a overflow     51 *       greaterThanXPoint is set to a overflowHeader point
 52 *       and lessThanEqualXPoint.prior points t     52 *       and lessThanEqualXPoint.prior points to the overflow which will be before new point when the new point is inserted into overflowPoints.
 53 *   else                                           53 *   else
 54 *       lessThanEqualXPoint is set to point's      54 *       lessThanEqualXPoint is set to point's information for closes point with point's x <= x
 55 *       greaterThanXPoint is set to point's in     55 *       greaterThanXPoint is set to point's information for closes point with point's x > x
 56 */                                                 56 */
 57 typedef enum ptwXY_lessEqualGreaterX_e { ptwXY     57 typedef enum ptwXY_lessEqualGreaterX_e { ptwXY_lessEqualGreaterX_empty, ptwXY_lessEqualGreaterX_lessThan, ptwXY_lessEqualGreaterX_equal,
 58     ptwXY_lessEqualGreaterX_between, ptwXY_les     58     ptwXY_lessEqualGreaterX_between, ptwXY_lessEqualGreaterX_greater } ptwXY_lessEqualGreaterX;
 59                                                    59 
 60 typedef                                            60 typedef
 61     struct ptwXYPoint_s {                          61     struct ptwXYPoint_s {
 62         double x, y;                               62         double x, y;
 63     } ptwXYPoint;                                  63     } ptwXYPoint;
 64                                                    64 
 65 typedef nfu_status (*ptwXY_createFromFunction_     65 typedef nfu_status (*ptwXY_createFromFunction_callback)( double x, double *y, void *argList );
 66 typedef nfu_status (*ptwXY_applyFunction_callb     66 typedef nfu_status (*ptwXY_applyFunction_callback)( ptwXYPoint *point, void *argList );
 67 typedef nfu_status (*ptwXY_getValue_callback)(     67 typedef nfu_status (*ptwXY_getValue_callback)( void *argList, double x, double *y, double x1, double y1, double x2, double y2 );
 68                                                    68 
 69 typedef struct {                                   69 typedef struct {
 70     char const *interpolationString;               70     char const *interpolationString;
 71     ptwXY_getValue_callback getValueFunc;          71     ptwXY_getValue_callback getValueFunc;
 72     void *argList;                                 72     void *argList;
 73 } ptwXY_interpolationOtherInfo;                    73 } ptwXY_interpolationOtherInfo;
 74                                                    74 
 75 typedef                                            75 typedef
 76     struct ptwXYOverflowPoint_s {                  76     struct ptwXYOverflowPoint_s {
 77         struct ptwXYOverflowPoint_s *prior;        77         struct ptwXYOverflowPoint_s *prior;
 78         struct ptwXYOverflowPoint_s *next;         78         struct ptwXYOverflowPoint_s *next;
 79         int64_t index;                             79         int64_t index;                             /* For overflowHeader set to -1. */
 80         ptwXYPoint point;                          80         ptwXYPoint point;
 81     } ptwXYOverflowPoint;                          81     } ptwXYOverflowPoint;
 82                                                    82 
 83 typedef                                            83 typedef
 84     struct ptwXYPoints_s {                         84     struct ptwXYPoints_s {
 85         nfu_status status;                         85         nfu_status status;
 86         ptwXY_sigma typeX, typeY;                  86         ptwXY_sigma typeX, typeY;
 87         ptwXY_interpolation interpolation;         87         ptwXY_interpolation interpolation;
 88         ptwXY_interpolationOtherInfo interpola     88         ptwXY_interpolationOtherInfo interpolationOtherInfo;
 89         int userFlag;                              89         int userFlag;
 90         double biSectionMax;                       90         double biSectionMax;
 91         double accuracy;                           91         double accuracy;
 92         double minFractional_dx;                   92         double minFractional_dx;
 93         int64_t length;                            93         int64_t length;
 94         int64_t allocatedSize;                     94         int64_t allocatedSize;
 95         int64_t overflowLength;                    95         int64_t overflowLength;
 96         int64_t overflowAllocatedSize;             96         int64_t overflowAllocatedSize;
 97         int64_t mallocFailedSize;                  97         int64_t mallocFailedSize;
 98         ptwXYOverflowPoint overflowHeader;         98         ptwXYOverflowPoint overflowHeader;
 99         ptwXYPoint *points;                        99         ptwXYPoint *points;
100         ptwXYOverflowPoint *overflowPoints;       100         ptwXYOverflowPoint *overflowPoints;
101     } ptwXYPoints;                                101     } ptwXYPoints;
102                                                   102 
103 /*                                                103 /*
104 * Routines in ptwXY_core.c                        104 * Routines in ptwXY_core.c
105 */                                                105 */
106 ptwXYPoints *ptwXY_new( ptwXY_interpolation in    106 ptwXYPoints *ptwXY_new( ptwXY_interpolation interpolation, ptwXY_interpolationOtherInfo const *interpolationOtherInfo, double biSectionMax,
107     double accuracy, int64_t primarySize, int6    107     double accuracy, int64_t primarySize, int64_t secondarySize, nfu_status *status, int userFlag );
108 nfu_status ptwXY_setup( ptwXYPoints *ptwXY, pt    108 nfu_status ptwXY_setup( ptwXYPoints *ptwXY, ptwXY_interpolation interpolation, ptwXY_interpolationOtherInfo const *interpolationOtherInfo, 
109     double biSectionMax, double accuracy, int6    109     double biSectionMax, double accuracy, int64_t primarySize, int64_t secondarySize, int userFlag );
110 ptwXYPoints *ptwXY_create( ptwXY_interpolation    110 ptwXYPoints *ptwXY_create( ptwXY_interpolation interpolation, ptwXY_interpolationOtherInfo const *interpolationOtherInfo, 
111     double biSectionMax, double accuracy, int6    111     double biSectionMax, double accuracy, int64_t primarySize, int64_t secondarySize, int64_t length, double const *xy, 
112     nfu_status *status, int userFlag );           112     nfu_status *status, int userFlag );
113 ptwXYPoints *ptwXY_createFrom_Xs_Ys( ptwXY_int    113 ptwXYPoints *ptwXY_createFrom_Xs_Ys( ptwXY_interpolation interpolation, ptwXY_interpolationOtherInfo const *interpolationOtherInfo, 
114     double biSectionMax, double accuracy, int6    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     115     double const *Ys, nfu_status *status, int userFlag );
116                                                   116 
117 nfu_status ptwXY_copy( ptwXYPoints *dest, ptwX    117 nfu_status ptwXY_copy( ptwXYPoints *dest, ptwXYPoints *src );
118 ptwXYPoints *ptwXY_clone( ptwXYPoints *ptwXY,     118 ptwXYPoints *ptwXY_clone( ptwXYPoints *ptwXY, nfu_status *status );
119 ptwXYPoints *ptwXY_cloneToInterpolation( ptwXY    119 ptwXYPoints *ptwXY_cloneToInterpolation( ptwXYPoints *ptwXY, ptwXY_interpolation interpolationTo, nfu_status *status );
120 ptwXYPoints *ptwXY_slice( ptwXYPoints *ptwXY,     120 ptwXYPoints *ptwXY_slice( ptwXYPoints *ptwXY, int64_t index1, int64_t index2, int64_t secondarySize, nfu_status *status );
121 ptwXYPoints *ptwXY_xSlice( ptwXYPoints *ptwXY,    121 ptwXYPoints *ptwXY_xSlice( ptwXYPoints *ptwXY, double xMin, double xMax, int64_t secondarySize, int fill, nfu_status *status );
122 ptwXYPoints *ptwXY_xMinSlice( ptwXYPoints *ptw    122 ptwXYPoints *ptwXY_xMinSlice( ptwXYPoints *ptwXY, double xMin, int64_t secondarySize, int fill, nfu_status *status );
123 ptwXYPoints *ptwXY_xMaxSlice( ptwXYPoints *ptw    123 ptwXYPoints *ptwXY_xMaxSlice( ptwXYPoints *ptwXY, double xMax, int64_t secondarySize, int fill, nfu_status *status );
124                                                   124 
125 ptwXY_interpolation ptwXY_getInterpolation( pt    125 ptwXY_interpolation ptwXY_getInterpolation( ptwXYPoints *ptwXY );
126 char const *ptwXY_getInterpolationString( ptwX    126 char const *ptwXY_getInterpolationString( ptwXYPoints *ptwXY );
127 nfu_status ptwXY_getStatus( ptwXYPoints *ptwXY    127 nfu_status ptwXY_getStatus( ptwXYPoints *ptwXY );
128 int ptwXY_getUserFlag( ptwXYPoints *ptwXY );      128 int ptwXY_getUserFlag( ptwXYPoints *ptwXY );
129 void ptwXY_setUserFlag( ptwXYPoints *ptwXY, in    129 void ptwXY_setUserFlag( ptwXYPoints *ptwXY, int userFlag );
130 double ptwXY_getAccuracy( ptwXYPoints *ptwXY )    130 double ptwXY_getAccuracy( ptwXYPoints *ptwXY );
131 double ptwXY_setAccuracy( ptwXYPoints *ptwXY,     131 double ptwXY_setAccuracy( ptwXYPoints *ptwXY, double accuracy );
132 double ptwXY_getBiSectionMax( ptwXYPoints *ptw    132 double ptwXY_getBiSectionMax( ptwXYPoints *ptwXY );
133 double ptwXY_setBiSectionMax( ptwXYPoints *ptw    133 double ptwXY_setBiSectionMax( ptwXYPoints *ptwXY, double biSectionMax );
134                                                   134 
135 nfu_status ptwXY_reallocatePoints( ptwXYPoints    135 nfu_status ptwXY_reallocatePoints( ptwXYPoints *ptwXY, int64_t size, int forceSmallerResize );
136 nfu_status ptwXY_reallocateOverflowPoints( ptw    136 nfu_status ptwXY_reallocateOverflowPoints( ptwXYPoints *ptwXY, int64_t size );
137 nfu_status ptwXY_coalescePoints( ptwXYPoints *    137 nfu_status ptwXY_coalescePoints( ptwXYPoints *ptwXY, int64_t size, ptwXYPoint *newPoint, int forceSmallerResize );
138 nfu_status ptwXY_simpleCoalescePoints( ptwXYPo    138 nfu_status ptwXY_simpleCoalescePoints( ptwXYPoints *ptwXY );
139                                                   139 
140 nfu_status ptwXY_clear( ptwXYPoints *ptwXY );     140 nfu_status ptwXY_clear( ptwXYPoints *ptwXY );
141 nfu_status ptwXY_release( ptwXYPoints *ptwXY )    141 nfu_status ptwXY_release( ptwXYPoints *ptwXY );
142 ptwXYPoints *ptwXY_free( ptwXYPoints *ptwXY );    142 ptwXYPoints *ptwXY_free( ptwXYPoints *ptwXY );
143                                                   143 
144 int64_t ptwXY_length( ptwXYPoints *ptwXY );       144 int64_t ptwXY_length( ptwXYPoints *ptwXY );
145 int64_t ptwXY_getNonOverflowLength( ptwXYPoint    145 int64_t ptwXY_getNonOverflowLength( ptwXYPoints const *ptwXY );
146                                                   146 
147 nfu_status ptwXY_setXYData( ptwXYPoints *ptwXY    147 nfu_status ptwXY_setXYData( ptwXYPoints *ptwXY, int64_t length, double const *xy );
148 nfu_status ptwXY_setXYDataFromXsAndYs( ptwXYPo    148 nfu_status ptwXY_setXYDataFromXsAndYs( ptwXYPoints *ptwXY, int64_t length, double const *x, double const *y );
149 nfu_status ptwXY_deletePoints( ptwXYPoints *pt    149 nfu_status ptwXY_deletePoints( ptwXYPoints *ptwXY, int64_t i1, int64_t i2 );
150 ptwXYPoint *ptwXY_getPointAtIndex( ptwXYPoints    150 ptwXYPoint *ptwXY_getPointAtIndex( ptwXYPoints *ptwXY, int64_t index );
151 ptwXYPoint *ptwXY_getPointAtIndex_Unsafely( pt    151 ptwXYPoint *ptwXY_getPointAtIndex_Unsafely( ptwXYPoints *ptwXY, int64_t index );
152 nfu_status ptwXY_getXYPairAtIndex( ptwXYPoints    152 nfu_status ptwXY_getXYPairAtIndex( ptwXYPoints *ptwXY, int64_t index, double *x, double *y );
153 ptwXY_lessEqualGreaterX ptwXY_getPointsAroundX    153 ptwXY_lessEqualGreaterX ptwXY_getPointsAroundX( ptwXYPoints *ptwXY, double x, ptwXYOverflowPoint *lessThanEqualXPoint, ptwXYOverflowPoint *greaterThanXPoint );
154 ptwXY_lessEqualGreaterX ptwXY_getPointsAroundX    154 ptwXY_lessEqualGreaterX ptwXY_getPointsAroundX_closeIsEqual( ptwXYPoints *ptwXY, double x, ptwXYOverflowPoint *lessThanEqualXPoint,
155         ptwXYOverflowPoint *greaterThanXPoint,    155         ptwXYOverflowPoint *greaterThanXPoint, double eps, int *closeIsEqual, ptwXYPoint **closePoint );
156 nfu_status ptwXY_getValueAtX( ptwXYPoints *ptw    156 nfu_status ptwXY_getValueAtX( ptwXYPoints *ptwXY, double x, double *y );
157 nfu_status ptwXY_setValueAtX( ptwXYPoints *ptw    157 nfu_status ptwXY_setValueAtX( ptwXYPoints *ptwXY, double x, double y );
158 nfu_status ptwXY_setValueAtX_overrideIfClose(     158 nfu_status ptwXY_setValueAtX_overrideIfClose( ptwXYPoints *ptwXY, double x, double y, double eps, int override );
159 nfu_status ptwXY_mergeFromXsAndYs( ptwXYPoints    159 nfu_status ptwXY_mergeFromXsAndYs( ptwXYPoints *ptwXY, int length, double *xs, double *ys );
160 nfu_status ptwXY_mergeFromXYs( ptwXYPoints *pt    160 nfu_status ptwXY_mergeFromXYs( ptwXYPoints *ptwXY, int length, double *xys );
161 nfu_status ptwXY_appendXY( ptwXYPoints *ptwXY,    161 nfu_status ptwXY_appendXY( ptwXYPoints *ptwXY, double x, double y );
162 nfu_status ptwXY_setXYPairAtIndex( ptwXYPoints    162 nfu_status ptwXY_setXYPairAtIndex( ptwXYPoints *ptwXY, int64_t index, double x, double y );
163                                                   163 
164 nfu_status ptwXY_getSlopeAtX( ptwXYPoints *ptw    164 nfu_status ptwXY_getSlopeAtX( ptwXYPoints *ptwXY, double x, const char side, double *slope );
165                                                   165 
166 double ptwXY_getXMinAndFrom( ptwXYPoints *ptwX    166 double ptwXY_getXMinAndFrom( ptwXYPoints *ptwXY, ptwXY_dataFrom *dataFrom );
167 double ptwXY_getXMin( ptwXYPoints *ptwXY );       167 double ptwXY_getXMin( ptwXYPoints *ptwXY );
168 double ptwXY_getXMaxAndFrom( ptwXYPoints *ptwX    168 double ptwXY_getXMaxAndFrom( ptwXYPoints *ptwXY, ptwXY_dataFrom *dataFrom );
169 double ptwXY_getXMax( ptwXYPoints *ptwXY );       169 double ptwXY_getXMax( ptwXYPoints *ptwXY );
170 double ptwXY_getYMin( ptwXYPoints *ptwXY );       170 double ptwXY_getYMin( ptwXYPoints *ptwXY );
171 double ptwXY_getYMax( ptwXYPoints *ptwXY );       171 double ptwXY_getYMax( ptwXYPoints *ptwXY );
172                                                   172 
173 /*                                                173 /* 
174 * Methods in ptwXY_methods.c                      174 * Methods in ptwXY_methods.c 
175 */                                                175 */
176 nfu_status ptwXY_clip( ptwXYPoints *ptwXY1, do    176 nfu_status ptwXY_clip( ptwXYPoints *ptwXY1, double yMin, double yMax );
177 nfu_status ptwXY_thicken( ptwXYPoints *ptwXY1,    177 nfu_status ptwXY_thicken( ptwXYPoints *ptwXY1, int sectionSubdivideMax, double dxMax, double fxMax );
178 ptwXYPoints *ptwXY_thin( ptwXYPoints *ptwXY1,     178 ptwXYPoints *ptwXY_thin( ptwXYPoints *ptwXY1, double accuracy, nfu_status *status );
179 nfu_status ptwXY_trim( ptwXYPoints *ptwXY );      179 nfu_status ptwXY_trim( ptwXYPoints *ptwXY );
180                                                   180 
181 ptwXYPoints *ptwXY_union( ptwXYPoints *ptwXY1,    181 ptwXYPoints *ptwXY_union( ptwXYPoints *ptwXY1, ptwXYPoints *ptwXY2, nfu_status *status, int unionOptions );
182                                                   182 
183 nfu_status ptwXY_scaleOffsetXAndY( ptwXYPoints    183 nfu_status ptwXY_scaleOffsetXAndY( ptwXYPoints *ptwXY, double xScale, double xOffset, double yScale, double yOffset );
184                                                   184 
185 /*                                                185 /*
186 * Functions in ptwXY_unitaryOperators.c           186 * Functions in ptwXY_unitaryOperators.c
187 */                                                187 */
188 nfu_status ptwXY_abs( ptwXYPoints *ptwXY );       188 nfu_status ptwXY_abs( ptwXYPoints *ptwXY );
189 nfu_status ptwXY_neg( ptwXYPoints *ptwXY );       189 nfu_status ptwXY_neg( ptwXYPoints *ptwXY );
190                                                   190 
191 /*                                                191 /*
192 * Functions in ptwXY_binaryOperators.c            192 * Functions in ptwXY_binaryOperators.c
193 */                                                193 */
194 nfu_status ptwXY_slopeOffset( ptwXYPoints *ptw    194 nfu_status ptwXY_slopeOffset( ptwXYPoints *ptwXY, double slope, double offset );
195 nfu_status ptwXY_add_double( ptwXYPoints *ptwX    195 nfu_status ptwXY_add_double( ptwXYPoints *ptwXY, double value );
196 nfu_status ptwXY_sub_doubleFrom( ptwXYPoints *    196 nfu_status ptwXY_sub_doubleFrom( ptwXYPoints *ptwXY, double value );
197 nfu_status ptwXY_sub_fromDouble( ptwXYPoints *    197 nfu_status ptwXY_sub_fromDouble( ptwXYPoints *ptwXY, double value );
198 nfu_status ptwXY_mul_double( ptwXYPoints *ptwX    198 nfu_status ptwXY_mul_double( ptwXYPoints *ptwXY, double value );
199 nfu_status ptwXY_div_doubleFrom( ptwXYPoints *    199 nfu_status ptwXY_div_doubleFrom( ptwXYPoints *ptwXY, double value );
200 nfu_status ptwXY_div_fromDouble( ptwXYPoints *    200 nfu_status ptwXY_div_fromDouble( ptwXYPoints *ptwXY, double value );
201 nfu_status ptwXY_mod( ptwXYPoints *ptwXY, doub    201 nfu_status ptwXY_mod( ptwXYPoints *ptwXY, double m, int pythonMod );
202                                                   202 
203 ptwXYPoints *ptwXY_binary_ptwXY( ptwXYPoints *    203 ptwXYPoints *ptwXY_binary_ptwXY( ptwXYPoints *ptwXY1, ptwXYPoints *ptwXY2, double v1, double v2, double v1v2, nfu_status *status );
204 ptwXYPoints *ptwXY_add_ptwXY( ptwXYPoints *ptw    204 ptwXYPoints *ptwXY_add_ptwXY( ptwXYPoints *ptwXY1, ptwXYPoints *ptwXY2, nfu_status *status );
205 ptwXYPoints *ptwXY_sub_ptwXY( ptwXYPoints *ptw    205 ptwXYPoints *ptwXY_sub_ptwXY( ptwXYPoints *ptwXY1, ptwXYPoints *ptwXY2, nfu_status *status );
206 ptwXYPoints *ptwXY_mul_ptwXY( ptwXYPoints *ptw    206 ptwXYPoints *ptwXY_mul_ptwXY( ptwXYPoints *ptwXY1, ptwXYPoints *ptwXY2, nfu_status *status );
207 ptwXYPoints *ptwXY_mul2_ptwXY( ptwXYPoints *pt    207 ptwXYPoints *ptwXY_mul2_ptwXY( ptwXYPoints *ptwXY1, ptwXYPoints *ptwXY2, nfu_status *status );
208 ptwXYPoints *ptwXY_div_ptwXY( ptwXYPoints *ptw    208 ptwXYPoints *ptwXY_div_ptwXY( ptwXYPoints *ptwXY1, ptwXYPoints *ptwXY2, nfu_status *status, int safeDivide );
209                                                   209 
210 /*                                                210 /* 
211 * Functions in ptwXY_functions.c                  211 * Functions in ptwXY_functions.c 
212 */                                                212 */
213 nfu_status ptwXY_pow( ptwXYPoints *ptwXY, doub    213 nfu_status ptwXY_pow( ptwXYPoints *ptwXY, double p );
214 nfu_status ptwXY_exp( ptwXYPoints *ptwXY, doub    214 nfu_status ptwXY_exp( ptwXYPoints *ptwXY, double a );
215 ptwXYPoints *ptwXY_convolution( ptwXYPoints *p    215 ptwXYPoints *ptwXY_convolution( ptwXYPoints *ptwXY1, ptwXYPoints *ptwXY2, nfu_status *status, int mode );
216                                                   216 
217 /*                                                217 /*
218 * Functions in ptwXY_interpolation.c              218 * Functions in ptwXY_interpolation.c
219 */                                                219 */
220 nfu_status ptwXY_interpolatePoint( ptwXY_inter    220 nfu_status ptwXY_interpolatePoint( ptwXY_interpolation interpolation, double x, double *y, double x1, double y1, double x2, double y2 );
221 ptwXYPoints *ptwXY_flatInterpolationToLinear(     221 ptwXYPoints *ptwXY_flatInterpolationToLinear( ptwXYPoints *ptwXY, double lowerEps, double upperEps, nfu_status *status );
222 ptwXYPoints *ptwXY_toOtherInterpolation( ptwXY    222 ptwXYPoints *ptwXY_toOtherInterpolation( ptwXYPoints *ptwXY, ptwXY_interpolation interpolation, double accuracy, nfu_status *status );
223 ptwXYPoints *ptwXY_unitbaseInterpolate( double    223 ptwXYPoints *ptwXY_unitbaseInterpolate( double w, double w1, ptwXYPoints *ptwXY1, double w2, ptwXYPoints *ptwXY2, nfu_status *status );
224 ptwXYPoints *ptwXY_toUnitbase( ptwXYPoints *pt    224 ptwXYPoints *ptwXY_toUnitbase( ptwXYPoints *ptwXY, nfu_status *status );
225 ptwXYPoints *ptwXY_fromUnitbase( ptwXYPoints *    225 ptwXYPoints *ptwXY_fromUnitbase( ptwXYPoints *ptwXY, double xMin, double xMax, nfu_status *status );
226                                                   226 
227 /*                                                227 /* 
228 * Functions in ptwXY_convenient.c                 228 * Functions in ptwXY_convenient.c 
229 */                                                229 */
230 ptwXPoints *ptwXY_getXArray( ptwXYPoints *ptwX    230 ptwXPoints *ptwXY_getXArray( ptwXYPoints *ptwXY, nfu_status *status );
231 nfu_status ptwXY_dullEdges( ptwXYPoints *ptwXY    231 nfu_status ptwXY_dullEdges( ptwXYPoints *ptwXY, double lowerEps, double upperEps, int positiveXOnly );
232 nfu_status ptwXY_mergeClosePoints( ptwXYPoints    232 nfu_status ptwXY_mergeClosePoints( ptwXYPoints *ptwXY, double epsilon );
233 ptwXYPoints *ptwXY_intersectionWith_ptwX( ptwX    233 ptwXYPoints *ptwXY_intersectionWith_ptwX( ptwXYPoints *ptwXY, ptwXPoints *ptwX, nfu_status *status );
234 nfu_status ptwXY_areDomainsMutual( ptwXYPoints    234 nfu_status ptwXY_areDomainsMutual( ptwXYPoints *ptwXY1, ptwXYPoints *ptwXY2 );
235 nfu_status ptwXY_tweakDomainsToMutualify( ptwX    235 nfu_status ptwXY_tweakDomainsToMutualify( ptwXYPoints *ptwXY1, ptwXYPoints *ptwXY2, int epsilonFactor, double epsilon );
236 nfu_status ptwXY_mutualifyDomains( ptwXYPoints    236 nfu_status ptwXY_mutualifyDomains( ptwXYPoints *ptwXY1, double lowerEps1, double upperEps1, int positiveXOnly1,
237                                           ptwX    237                                           ptwXYPoints *ptwXY2, double lowerEps2, double upperEps2, int positiveXOnly2 );
238 nfu_status ptwXY_copyToC_XY( ptwXYPoints *ptwX    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    239 nfu_status ptwXY_valueTo_ptwXAndY( ptwXYPoints *ptwXY, double **xs, double **ys );
240 ptwXYPoints *ptwXY_valueTo_ptwXY( double x1, d    240 ptwXYPoints *ptwXY_valueTo_ptwXY( double x1, double x2, double y, nfu_status *status );
241 ptwXYPoints *ptwXY_createGaussianCenteredSigma    241 ptwXYPoints *ptwXY_createGaussianCenteredSigma1( double accuracy, nfu_status *status );
242 ptwXYPoints *ptwXY_createGaussian( double accu    242 ptwXYPoints *ptwXY_createGaussian( double accuracy, double xCenter, double sigma, double amplitude, double xMin, double xMax, 
243         double dullEps, nfu_status *status );     243         double dullEps, nfu_status *status );
244                                                   244 
245 /*                                                245 /* 
246 * Functions in ptwXY_misc.c                       246 * Functions in ptwXY_misc.c 
247 */                                                247 */
248 void ptwXY_update_biSectionMax( ptwXYPoints *p    248 void ptwXY_update_biSectionMax( ptwXYPoints *ptwXY1, double oldLength );
249 ptwXYPoints *ptwXY_createFromFunction( int n,     249 ptwXYPoints *ptwXY_createFromFunction( int n, double *xs, ptwXY_createFromFunction_callback func, void *argList, double accuracy, int checkForRoots,
250     int biSectionMax, nfu_status *status );       250     int biSectionMax, nfu_status *status );
251 ptwXYPoints *ptwXY_createFromFunction2( ptwXPo    251 ptwXYPoints *ptwXY_createFromFunction2( ptwXPoints *xs, ptwXY_createFromFunction_callback func, void *argList, double accuracy, int checkForRoots,
252     int biSectionMax, nfu_status *status );       252     int biSectionMax, nfu_status *status );
253 nfu_status ptwXY_applyFunction( ptwXYPoints *p    253 nfu_status ptwXY_applyFunction( ptwXYPoints *ptwXY1, ptwXY_applyFunction_callback func, void *argList, int checkForRoots );
254 ptwXYPoints *ptwXY_fromString( char const *str    254 ptwXYPoints *ptwXY_fromString( char const *str, ptwXY_interpolation interpolation, ptwXY_interpolationOtherInfo const *interpolationOtherInfo, 
255     double biSectionMax, double accuracy, char    255     double biSectionMax, double accuracy, char **endCharacter, nfu_status *status );
256                                                   256 
257 void ptwXY_showInteralStructure( ptwXYPoints *    257 void ptwXY_showInteralStructure( ptwXYPoints *ptwXY, FILE *f, int printPointersAsNull );
258 void ptwXY_simpleWrite( ptwXYPoints *ptwXY, FI    258 void ptwXY_simpleWrite( ptwXYPoints *ptwXY, FILE *f, char *format );
259 void ptwXY_simplePrint( ptwXYPoints *ptwXY, ch    259 void ptwXY_simplePrint( ptwXYPoints *ptwXY, char *format );
260                                                   260 
261 /*                                                261 /* 
262 * Functions in ptwXY_integration.c                262 * Functions in ptwXY_integration.c 
263 */                                                263 */
264 nfu_status ptwXY_f_integrate( ptwXY_interpolat    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, do    265 double ptwXY_integrate( ptwXYPoints *ptwXY, double xMin, double xMax, nfu_status *status );
266 double ptwXY_integrateDomain( ptwXYPoints *ptw    266 double ptwXY_integrateDomain( ptwXYPoints *ptwXY, nfu_status *status );
267 nfu_status ptwXY_normalize( ptwXYPoints *ptwXY    267 nfu_status ptwXY_normalize( ptwXYPoints *ptwXY1 );
268 double ptwXY_integrateDomainWithWeight_x( ptwX    268 double ptwXY_integrateDomainWithWeight_x( ptwXYPoints *ptwXY, nfu_status *status );
269 double ptwXY_integrateWithWeight_x( ptwXYPoint    269 double ptwXY_integrateWithWeight_x( ptwXYPoints *ptwXY, double xMin, double xMax, nfu_status *status );
270 double ptwXY_integrateDomainWithWeight_sqrt_x(    270 double ptwXY_integrateDomainWithWeight_sqrt_x( ptwXYPoints *ptwXY, nfu_status *status );
271 double ptwXY_integrateWithWeight_sqrt_x( ptwXY    271 double ptwXY_integrateWithWeight_sqrt_x( ptwXYPoints *ptwXY, double xMin, double xMax, nfu_status *status );
272 ptwXPoints *ptwXY_groupOneFunction( ptwXYPoint    272 ptwXPoints *ptwXY_groupOneFunction( ptwXYPoints *ptwXY, ptwXPoints *groupBoundaries, ptwXY_group_normType normType, ptwXPoints *ptwX_norm, nfu_status *status );
273 ptwXPoints *ptwXY_groupTwoFunctions( ptwXYPoin    273 ptwXPoints *ptwXY_groupTwoFunctions( ptwXYPoints *ptwXY1, ptwXYPoints *ptwXY2, ptwXPoints *groupBoundaries, ptwXY_group_normType normType, 
274         ptwXPoints *ptwX_norm, nfu_status *sta    274         ptwXPoints *ptwX_norm, nfu_status *status );
275 ptwXPoints *ptwXY_groupThreeFunctions( ptwXYPo    275 ptwXPoints *ptwXY_groupThreeFunctions( ptwXYPoints *ptwXY1, ptwXYPoints *ptwXY2, ptwXYPoints *ptwXY3, ptwXPoints *groupBoundaries,
276         ptwXY_group_normType normType, ptwXPoi    276         ptwXY_group_normType normType, ptwXPoints *ptwX_norm, nfu_status *status );
277 ptwXPoints *ptwXY_runningIntegral( ptwXYPoints    277 ptwXPoints *ptwXY_runningIntegral( ptwXYPoints *ptwXY, nfu_status *status );
278 double ptwXY_integrateWithFunction( ptwXYPoint    278 double ptwXY_integrateWithFunction( ptwXYPoints *ptwXY, ptwXY_createFromFunction_callback func, void *argList,
279         double xMin, double xMax, int degree,     279         double xMin, double xMax, int degree, int recursionLimit, double tolerance, nfu_status *status );
280                                                   280 
281 #if defined __cplusplus                           281 #if defined __cplusplus
282     }                                             282     }
283     }                                             283     }
284 #endif                                            284 #endif
285                                                   285 
286 #endif          /* End of ptwXY_h_included. */    286 #endif          /* End of ptwXY_h_included. */
287                                                   287