Geant4
10.02.p02
|
#include <stdio.h>
#include <stdlib.h>
#include <cmath>
#include <cstdlib>
#include <float.h>
#include "ptwX.h"
Go to the source code of this file.
Functions | |
static int | ptwX_sort_descending (void const *p1, void const *p2) |
static int | ptwX_sort_ascending (void const *p1, void const *p2) |
ptwXPoints * | ptwX_new (int64_t size, nfu_status *status) |
nfu_status | ptwX_setup (ptwXPoints *ptwX, int64_t size) |
ptwXPoints * | ptwX_create (int64_t size, int64_t length, double const *xs, nfu_status *status) |
ptwXPoints * | ptwX_createLine (int64_t size, int64_t length, double slope, double offset, nfu_status *status) |
nfu_status | ptwX_copy (ptwXPoints *dest, ptwXPoints *src) |
ptwXPoints * | ptwX_clone (ptwXPoints *ptwX, nfu_status *status) |
ptwXPoints * | ptwX_slice (ptwXPoints *ptwX, int64_t index1, int64_t index2, nfu_status *status) |
nfu_status | ptwX_reallocatePoints (ptwXPoints *ptwX, int64_t size, int forceSmallerResize) |
nfu_status | ptwX_clear (ptwXPoints *ptwX) |
nfu_status | ptwX_release (ptwXPoints *ptwX) |
ptwXPoints * | ptwX_free (ptwXPoints *ptwX) |
int64_t | ptwX_length (ptwXPoints *ptwX) |
nfu_status | ptwX_setData (ptwXPoints *ptwX, int64_t length, double const *xs) |
nfu_status | ptwX_deletePoints (ptwXPoints *ptwX, int64_t i1, int64_t i2) |
double * | ptwX_getPointAtIndex (ptwXPoints *ptwX, int64_t index) |
double | ptwX_getPointAtIndex_Unsafely (ptwXPoints *ptwX, int64_t index) |
nfu_status | ptwX_setPointAtIndex (ptwXPoints *ptwX, int64_t index, double x) |
nfu_status | ptwX_insertPointsAtIndex (ptwXPoints *ptwX, int64_t index, int64_t n1, double const *xs) |
int | ptwX_ascendingOrder (ptwXPoints *ptwX) |
ptwXPoints * | ptwX_fromString (char const *str, char **endCharacter, nfu_status *status) |
nfu_status | ptwX_countOccurrences (ptwXPoints *ptwX, double value, int *count) |
nfu_status | ptwX_reverse (ptwXPoints *ptwX) |
nfu_status | ptwX_sort (ptwXPoints *ptwX, enum ptwX_sort_order order) |
nfu_status | ptwX_closesDifference (ptwXPoints *ptwX, double value, int64_t *index, double *difference) |
nfu_status | ptwX_closesDifferenceInRange (ptwXPoints *ptwX, int64_t i1, int64_t i2, double value, int64_t *index, double *difference) |
ptwXPoints * | ptwX_unique (ptwXPoints *ptwX, int order, nfu_status *status) |
nfu_status | ptwX_abs (ptwXPoints *ptwX) |
nfu_status | ptwX_neg (ptwXPoints *ptwX) |
nfu_status | ptwX_add_double (ptwXPoints *ptwX, double value) |
nfu_status | ptwX_mul_double (ptwXPoints *ptwX, double value) |
nfu_status | ptwX_slopeOffset (ptwXPoints *ptwX, double slope, double offset) |
nfu_status | ptwX_add_ptwX (ptwXPoints *ptwX1, ptwXPoints *ptwX2) |
nfu_status | ptwX_sub_ptwX (ptwXPoints *ptwX1, ptwXPoints *ptwX2) |
nfu_status | ptwX_xMinMax (ptwXPoints *ptwX, double *xMin, double *xMax) |
nfu_status | ptwX_compare (ptwXPoints *ptwX1, ptwXPoints *ptwX2, int *comparison) |
int | ptwX_close (ptwXPoints *ptwX1, ptwXPoints *ptwX2, int epsilonFactor, double epsilon, nfu_status *status) |
nfu_status ptwX_abs | ( | ptwXPoints * | ptwX | ) |
Definition at line 434 of file ptwX_core.cc.
nfu_status ptwX_add_double | ( | ptwXPoints * | ptwX, |
double | value | ||
) |
Definition at line 453 of file ptwX_core.cc.
References ptwX_slopeOffset().
nfu_status ptwX_add_ptwX | ( | ptwXPoints * | ptwX1, |
ptwXPoints * | ptwX2 | ||
) |
Definition at line 479 of file ptwX_core.cc.
Referenced by MCGIDI_reaction_recast().
int ptwX_ascendingOrder | ( | ptwXPoints * | ptwX | ) |
Definition at line 257 of file ptwX_core.cc.
nfu_status ptwX_clear | ( | ptwXPoints * | ptwX | ) |
Definition at line 139 of file ptwX_core.cc.
Referenced by ptwX_copy().
ptwXPoints* ptwX_clone | ( | ptwXPoints * | ptwX, |
nfu_status * | status | ||
) |
Definition at line 88 of file ptwX_core.cc.
References ptwX_slice().
Referenced by GIDI_settings_processedFlux::GIDI_settings_processedFlux(), MCGIDI_target_heated_recast(), and ptwX_unique().
int ptwX_close | ( | ptwXPoints * | ptwX1, |
ptwXPoints * | ptwX2, | ||
int | epsilonFactor, | ||
double | epsilon, | ||
nfu_status * | status | ||
) |
Definition at line 553 of file ptwX_core.cc.
References DBL_EPSILON.
nfu_status ptwX_closesDifference | ( | ptwXPoints * | ptwX, |
double | value, | ||
int64_t * | index, | ||
double * | difference | ||
) |
Definition at line 352 of file ptwX_core.cc.
References ptwX_closesDifferenceInRange().
nfu_status ptwX_closesDifferenceInRange | ( | ptwXPoints * | ptwX, |
int64_t | i1, | ||
int64_t | i2, | ||
double | value, | ||
int64_t * | index, | ||
double * | difference | ||
) |
Definition at line 359 of file ptwX_core.cc.
References d1.
Referenced by ptwX_closesDifference().
nfu_status ptwX_compare | ( | ptwXPoints * | ptwX1, |
ptwXPoints * | ptwX2, | ||
int * | comparison | ||
) |
Definition at line 528 of file ptwX_core.cc.
References G4InuclParticleNames::nn.
nfu_status ptwX_copy | ( | ptwXPoints * | dest, |
ptwXPoints * | src | ||
) |
Definition at line 78 of file ptwX_core.cc.
References ptwX_clear(), and ptwX_setData().
nfu_status ptwX_countOccurrences | ( | ptwXPoints * | ptwX, |
double | value, | ||
int * | count | ||
) |
Definition at line 301 of file ptwX_core.cc.
ptwXPoints* ptwX_create | ( | int64_t | size, |
int64_t | length, | ||
double const * | xs, | ||
nfu_status * | status | ||
) |
Definition at line 50 of file ptwX_core.cc.
References ptwX_free(), ptwX_new(), and ptwX_setData().
Referenced by ptwX_fromString(), and GIDI_settings_particle::setGroup().
ptwXPoints* ptwX_createLine | ( | int64_t | size, |
int64_t | length, | ||
double | slope, | ||
double | offset, | ||
nfu_status * | status | ||
) |
Definition at line 62 of file ptwX_core.cc.
References ptwX_new().
Referenced by MCGIDI_target_heated_recast(), ptwXY_groupOneFunction(), ptwXY_groupThreeFunctions(), and ptwXY_groupTwoFunctions().
nfu_status ptwX_deletePoints | ( | ptwXPoints * | ptwX, |
int64_t | i1, | ||
int64_t | i2 | ||
) |
Definition at line 191 of file ptwX_core.cc.
References n.
ptwXPoints* ptwX_free | ( | ptwXPoints * | ptwX | ) |
Definition at line 158 of file ptwX_core.cc.
References nfu_free(), and ptwX_release().
Referenced by GIDI_settings_processedFlux::GIDI_settings_processedFlux(), MCGIDI_angular_parseFromTOM(), MCGIDI_energy_parseMadlandNixFromTOM(), MCGIDI_fromTOM_pdfOfX(), MCGIDI_KalbachMann_parseFromTOM2(), MCGIDI_reaction_recast(), MCGIDI_reaction_release(), MCGIDI_target_heated_recast(), MCGIDI_target_heated_release(), ptwX_create(), ptwX_unique(), ptwXY_groupOneFunction(), ptwXY_groupThreeFunctions(), ptwXY_groupTwoFunctions(), ptwXY_runningIntegral(), GIDI_settings_particle::setGroup(), GIDI_settings_particle::~GIDI_settings_particle(), and GIDI_settings_processedFlux::~GIDI_settings_processedFlux().
ptwXPoints* ptwX_fromString | ( | char const * | str, |
char ** | endCharacter, | ||
nfu_status * | status | ||
) |
Definition at line 287 of file ptwX_core.cc.
References nfu_free(), nfu_stringToListOfDoubles(), and ptwX_create().
double* ptwX_getPointAtIndex | ( | ptwXPoints * | ptwX, |
int64_t | index | ||
) |
Definition at line 206 of file ptwX_core.cc.
Referenced by MCGIDI_reaction_getCrossSectionAtE(), MCGIDI_reaction_recast(), and MCGIDI_target_heated_getTotalCrossSectionAtE().
double ptwX_getPointAtIndex_Unsafely | ( | ptwXPoints * | ptwX, |
int64_t | index | ||
) |
Definition at line 215 of file ptwX_core.cc.
Referenced by MCGIDI_angular_parseFromTOM(), MCGIDI_energy_parseMadlandNixFromTOM(), MCGIDI_fromTOM_pdfOfX(), MCGIDI_KalbachMann_parseFromTOM2(), and MCGIDI_target_heated_recast().
nfu_status ptwX_insertPointsAtIndex | ( | ptwXPoints * | ptwX, |
int64_t | index, | ||
int64_t | n1, | ||
double const * | xs | ||
) |
Definition at line 238 of file ptwX_core.cc.
References ptwX_reallocatePoints().
int64_t ptwX_length | ( | ptwXPoints * | ptwX | ) |
Definition at line 166 of file ptwX_core.cc.
Referenced by MCGIDI_target_heated_getTotalCrossSectionAtE(), ptwXY_groupOneFunction(), ptwXY_groupThreeFunctions(), ptwXY_groupTwoFunctions(), and ptwXY_intersectionWith_ptwX().
nfu_status ptwX_mul_double | ( | ptwXPoints * | ptwX, |
double | value | ||
) |
Definition at line 460 of file ptwX_core.cc.
References ptwX_slopeOffset().
nfu_status ptwX_neg | ( | ptwXPoints * | ptwX | ) |
Definition at line 446 of file ptwX_core.cc.
References ptwX_slopeOffset().
ptwXPoints* ptwX_new | ( | int64_t | size, |
nfu_status * | status | ||
) |
Definition at line 24 of file ptwX_core.cc.
References nfu_calloc(), nfu_free(), and ptwX_setup().
Referenced by ptwX_create(), ptwX_createLine(), ptwX_slice(), ptwX_unique(), ptwXY_getXArray(), ptwXY_groupOneFunction(), ptwXY_groupThreeFunctions(), ptwXY_groupTwoFunctions(), and ptwXY_runningIntegral().
nfu_status ptwX_reallocatePoints | ( | ptwXPoints * | ptwX, |
int64_t | size, | ||
int | forceSmallerResize | ||
) |
Definition at line 116 of file ptwX_core.cc.
References nfu_realloc().
Referenced by ptwX_insertPointsAtIndex(), ptwX_setData(), ptwX_setPointAtIndex(), and ptwX_setup().
nfu_status ptwX_release | ( | ptwXPoints * | ptwX | ) |
Definition at line 147 of file ptwX_core.cc.
References nfu_free().
Referenced by ptwX_free().
nfu_status ptwX_reverse | ( | ptwXPoints * | ptwX | ) |
Definition at line 314 of file ptwX_core.cc.
nfu_status ptwX_setData | ( | ptwXPoints * | ptwX, |
int64_t | length, | ||
double const * | xs | ||
) |
Definition at line 173 of file ptwX_core.cc.
References ptwX_reallocatePoints().
Referenced by ptwX_copy(), and ptwX_create().
nfu_status ptwX_setPointAtIndex | ( | ptwXPoints * | ptwX, |
int64_t | index, | ||
double | x | ||
) |
Definition at line 222 of file ptwX_core.cc.
References ptwX_reallocatePoints(), and x.
Referenced by MCGIDI_target_heated_recast(), and ptwXY_runningIntegral().
nfu_status ptwX_setup | ( | ptwXPoints * | ptwX, |
int64_t | size | ||
) |
Definition at line 37 of file ptwX_core.cc.
References ptwX_reallocatePoints().
Referenced by ptwX_new().
ptwXPoints* ptwX_slice | ( | ptwXPoints * | ptwX, |
int64_t | index1, | ||
int64_t | index2, | ||
nfu_status * | status | ||
) |
Definition at line 95 of file ptwX_core.cc.
References n, and ptwX_new().
Referenced by ptwX_clone().
nfu_status ptwX_slopeOffset | ( | ptwXPoints * | ptwX, |
double | slope, | ||
double | offset | ||
) |
Definition at line 467 of file ptwX_core.cc.
Referenced by ptwX_add_double(), ptwX_mul_double(), and ptwX_neg().
nfu_status ptwX_sort | ( | ptwXPoints * | ptwX, |
enum ptwX_sort_order | order | ||
) |
Definition at line 329 of file ptwX_core.cc.
References ptwX_sort_ascending(), and ptwX_sort_descending().
Referenced by ptwX_unique().
|
static |
Definition at line 341 of file ptwX_core.cc.
Referenced by ptwX_sort(), and ptwX_sort_descending().
|
static |
Definition at line 340 of file ptwX_core.cc.
References ptwX_sort_ascending().
Referenced by ptwX_sort().
nfu_status ptwX_sub_ptwX | ( | ptwXPoints * | ptwX1, |
ptwXPoints * | ptwX2 | ||
) |
Definition at line 494 of file ptwX_core.cc.
ptwXPoints* ptwX_unique | ( | ptwXPoints * | ptwX, |
int | order, | ||
nfu_status * | status | ||
) |
Definition at line 385 of file ptwX_core.cc.
References ptwX_clone(), ptwX_free(), ptwX_new(), and ptwX_sort().
nfu_status ptwX_xMinMax | ( | ptwXPoints * | ptwX, |
double * | xMin, | ||
double * | xMax | ||
) |
Definition at line 509 of file ptwX_core.cc.