ECCE @ EIC Software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
nf_utilities.h File Reference
#include <stdio.h>
#include <stdint.h>
#include <string.h>
#include <stdarg.h>
+ Include dependency graph for nf_utilities.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define NUMERICALFUNCTIONS_SVN_VERSION   110+
 
#define nf_floatToShortestString_trimZeros   ( 1 << 0 )
 
#define nf_floatToShortestString_keepPeriod   ( 1 << 1 )
 
#define nf_floatToShortestString_includeSign   ( 1 << 2 )
 

Typedefs

typedef enum nfu_status_e nfu_status
 

Enumerations

enum  nfu_status_e {
  nfu_Okay, nfu_mallocError, nfu_insufficientMemory, nfu_badIndex,
  nfu_XNotAscending, nfu_badIndexForX, nfu_XOutsideDomain, nfu_invalidInterpolation,
  nfu_badSelf, nfu_divByZero, nfu_unsupportedInterpolationConversion, nfu_unsupportedInterpolation,
  nfu_empty, nfu_tooFewPoints, nfu_domainsNotMutual, nfu_badInput,
  nfu_badNorm, nfu_badIntegrationInput, nfu_otherInterpolation, nfu_failedToConverge,
  nfu_oddNumberOfValues
}
 

Functions

double nfu_getNAN (void)
 
int nfu_isNAN (double d)
 
double nfu_getInfinity (double sign)
 
const char * nfu_statusMessage (nfu_status status)
 
void nfu_setMemoryDebugMode (int mode)
 
voidnfu_malloc (size_t size)
 
voidnfu_calloc (size_t size, size_t n)
 
voidnfu_realloc (size_t size, void *old)
 
voidnfu_free (void *p)
 
void nfu_printMsg (char *fmt,...)
 
void nfu_printErrorMsg (char *fmt,...)
 
nfu_status nfu_stringToListOfDoubles (char const *str, int64_t *numberConverted, double **doublePtr, char **endCharacter)
 
char * nf_floatToShortestString (double value, int significantDigits, int favorEFormBy, int flags)
 

Macro Definition Documentation

#define nf_floatToShortestString_includeSign   ( 1 << 2 )

Definition at line 18 of file nf_utilities.h.

View newest version in sPHENIX GitHub at line 18 of file nf_utilities.h

Referenced by nf_floatToShortestString().

#define nf_floatToShortestString_keepPeriod   ( 1 << 1 )

Definition at line 17 of file nf_utilities.h.

View newest version in sPHENIX GitHub at line 17 of file nf_utilities.h

Referenced by nf_floatToShortestString().

#define nf_floatToShortestString_trimZeros   ( 1 << 0 )

Definition at line 16 of file nf_utilities.h.

View newest version in sPHENIX GitHub at line 16 of file nf_utilities.h

Referenced by nf_floatToShortestString().

#define NUMERICALFUNCTIONS_SVN_VERSION   110+

Definition at line 14 of file nf_utilities.h.

View newest version in sPHENIX GitHub at line 14 of file nf_utilities.h

Typedef Documentation

typedef enum nfu_status_e nfu_status

Enumeration Type Documentation

Enumerator:
nfu_Okay 
nfu_mallocError 
nfu_insufficientMemory 
nfu_badIndex 
nfu_XNotAscending 
nfu_badIndexForX 
nfu_XOutsideDomain 
nfu_invalidInterpolation 
nfu_badSelf 
nfu_divByZero 
nfu_unsupportedInterpolationConversion 
nfu_unsupportedInterpolation 
nfu_empty 
nfu_tooFewPoints 
nfu_domainsNotMutual 
nfu_badInput 
nfu_badNorm 
nfu_badIntegrationInput 
nfu_otherInterpolation 
nfu_failedToConverge 
nfu_oddNumberOfValues 

Definition at line 25 of file nf_utilities.h.

View newest version in sPHENIX GitHub at line 25 of file nf_utilities.h

Function Documentation

char* nf_floatToShortestString ( double  value,
int  significantDigits,
int  favorEFormBy,
int  flags 
)

Definition at line 66 of file nf_stringToDoubles.cc.

View newest version in sPHENIX GitHub at line 66 of file nf_stringToDoubles.cc

References e1, e2, e3, int(), isfinite, n1, nf_floatToShortestString_includeSign, nf_floatToShortestString_keepPeriod, nf_floatToShortestString_trimZeros, and sign().

+ Here is the call graph for this function:

void* nfu_calloc ( size_t  size,
size_t  n 
)

Definition at line 123 of file nf_utilities.cc.

View newest version in sPHENIX GitHub at line 123 of file nf_utilities.cc

References nfu_debugging, and printf().

Referenced by ptwX_new(), ptwXY_new(), and ptwXY_thin().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void* nfu_free ( void p)

Definition at line 143 of file nf_utilities.cc.

View newest version in sPHENIX GitHub at line 143 of file nf_utilities.cc

References nfu_debugging, and printf().

Referenced by nf_Legendre_free(), nf_Legendre_new(), nf_Legendre_release(), ptwX_free(), ptwX_fromString(), ptwX_new(), ptwX_release(), ptwXY_cloneToInterpolation(), ptwXY_copy(), ptwXY_free(), ptwXY_fromString(), ptwXY_mergeFrom(), ptwXY_mergeFromXYs(), ptwXY_new(), ptwXY_release(), and ptwXY_thin().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

double nfu_getInfinity ( double  sign)

Definition at line 68 of file nf_utilities.cc.

View newest version in sPHENIX GitHub at line 68 of file nf_utilities.cc

double nfu_getNAN ( void  )

Definition at line 54 of file nf_utilities.cc.

View newest version in sPHENIX GitHub at line 54 of file nf_utilities.cc

Referenced by ptwXY_div_ptwXY(), ptwXY_getXMaxAndFrom(), and ptwXY_getXMinAndFrom().

+ Here is the caller graph for this function:

int nfu_isNAN ( double  d)

Definition at line 61 of file nf_utilities.cc.

View newest version in sPHENIX GitHub at line 61 of file nf_utilities.cc

References is_nan.

Referenced by ptwXY_div_ptwXY().

+ Here is the caller graph for this function:

void* nfu_malloc ( size_t  size)

Definition at line 113 of file nf_utilities.cc.

View newest version in sPHENIX GitHub at line 113 of file nf_utilities.cc

References nfu_debugging, and printf().

Referenced by nf_Legendre_new(), nfu_stringToListOfDoubles2(), ptwXY_mergeFrom(), and ptwXY_mergeFromXYs().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void nfu_printErrorMsg ( char *  fmt,
  ... 
)

Definition at line 166 of file nf_utilities.cc.

View newest version in sPHENIX GitHub at line 166 of file nf_utilities.cc

References g4zmq::exit().

+ Here is the call graph for this function:

void nfu_printMsg ( char *  fmt,
  ... 
)

Definition at line 154 of file nf_utilities.cc.

View newest version in sPHENIX GitHub at line 154 of file nf_utilities.cc

void* nfu_realloc ( size_t  size,
void old 
)

Definition at line 133 of file nf_utilities.cc.

View newest version in sPHENIX GitHub at line 133 of file nf_utilities.cc

References nfu_debugging, and printf().

Referenced by nf_Legendre_reallocateCls(), ptwX_reallocatePoints(), ptwXY_reallocateOverflowPoints(), and ptwXY_reallocatePoints().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void nfu_setMemoryDebugMode ( int  mode)

Definition at line 106 of file nf_utilities.cc.

View newest version in sPHENIX GitHub at line 106 of file nf_utilities.cc

References nfu_debugging.

const char* nfu_statusMessage ( nfu_status  status)

Definition at line 76 of file nf_utilities.cc.

View newest version in sPHENIX GitHub at line 76 of file nf_utilities.cc

References badIndex_message, badIndexForX_message, badInput_message, badIntegrationInput_message, badNorm_message, badSelf_message, divByZero_message, empty_message, failedToConverge_message, insufficientMemory_message, invalidInterpolation_message, mallocError_message, nfu_badIndex, nfu_badIndexForX, nfu_badInput, nfu_badIntegrationInput, nfu_badNorm, nfu_badSelf, nfu_divByZero, nfu_domainsNotMutual, nfu_empty, nfu_failedToConverge, nfu_insufficientMemory, nfu_invalidInterpolation, nfu_mallocError, nfu_oddNumberOfValues, nfu_Okay, nfu_otherInterpolation, nfu_tooFewPoints, nfu_unsupportedInterpolation, nfu_unsupportedInterpolationConversion, nfu_XNotAscending, nfu_XOutsideDomain, notMutualDomian_message, oddNumberOfValues_message, Okay_message, otherInterpolation_message, tooFewPoints_message, unknownStatus_message, unsupportedInterpolation_message, unsupportedInterpolationConversion_message, XNotAscending_message, and XOutsideDomain_message.

Referenced by MCGIDI_angular_parseFromTOM(), MCGIDI_angularEnergy_parsePointwiseFromTOM(), MCGIDI_energy_parseMadlandNixFromTOM(), MCGIDI_energy_parseNBodyPhaseSpaceFromTOM(), MCGIDI_energyAngular_linear_parseFromTOM(), MCGIDI_fromTOM_pdfOfX(), MCGIDI_KalbachMann_parseFromTOM2(), MCGIDI_LLNL_angularEnergy_parsePointwiseFromTOM(), MCGIDI_misc_Data2ptwXYPointsInUnitsOf(), MCGIDI_product_parseFromTOM(), MCGIDI_product_parsePolynomialMultiplicity(), MCGIDI_target_heated_read(), and MCGIDI_target_heated_recast().

+ Here is the caller graph for this function:

nfu_status nfu_stringToListOfDoubles ( char const *  str,
int64_t *  numberConverted,
double **  doublePtr,
char **  endCharacter 
)

Definition at line 29 of file nf_stringToDoubles.cc.

View newest version in sPHENIX GitHub at line 29 of file nf_stringToDoubles.cc

References nfu_stringToListOfDoubles2().

Referenced by ptwX_fromString(), and ptwXY_fromString().

+ Here is the call graph for this function:

+ Here is the caller graph for this function: