Geant4  v4-10.4-release
 모두 클래스 네임스페이스들 파일들 함수 변수 타입정의 열거형 타입 열거형 멤버 Friends 매크로 그룹들 페이지들
ptwX.h
이 파일의 문서화 페이지로 가기
1 /*
2 # <<BEGIN-copyright>>
3 # <<END-copyright>>
4 */
5 
6 #ifndef ptwX_h_included
7 #define ptwX_h_included
8 
9 #include <stdio.h>
10 #include <stdint.h>
11 
12 #include <nf_utilities.h>
13 
14 #if defined __cplusplus
15  extern "C" {
16  namespace GIDI {
17 #endif
18 
19 #define ptwX_minimumSize 10
20 
22 
23 typedef
24  struct ptwXPoints_s {
26  int64_t length;
27  int64_t allocatedSize;
29  double *points;
30  } ptwXPoints;
31 
32 /*
33 * Routines in ptwX_core.c
34 */
35 ptwXPoints *ptwX_new( int64_t size, nfu_status *status );
36 nfu_status ptwX_setup( ptwXPoints *ptwX, int64_t size );
37 ptwXPoints *ptwX_create( int64_t size, int64_t length, double const *xs, nfu_status *status );
38 ptwXPoints *ptwX_createLine( int64_t size, int64_t length, double slope, double offset, nfu_status *status );
40 ptwXPoints *ptwX_clone( ptwXPoints *ptwX, nfu_status *status );
41 ptwXPoints *ptwX_slice( ptwXPoints *ptwX, int64_t index1, int64_t index2, nfu_status *status );
42 nfu_status ptwX_reallocatePoints( ptwXPoints *ptwX, int64_t size, int forceSmallerResize );
46 
47 int64_t ptwX_length( ptwXPoints *ptwX );
48 nfu_status ptwX_setData( ptwXPoints *ptwX, int64_t length, double const *xs );
49 nfu_status ptwX_deletePoints( ptwXPoints *ptwX, int64_t i1, int64_t i2 );
50 double *ptwX_getPointAtIndex( ptwXPoints *ptwX, int64_t index );
51 double ptwX_getPointAtIndex_Unsafely( ptwXPoints *ptwX, int64_t index );
52 nfu_status ptwX_setPointAtIndex( ptwXPoints *ptwX, int64_t index, double x );
53 nfu_status ptwX_insertPointsAtIndex( ptwXPoints *ptwX, int64_t index, int64_t n1, double const *xs );
54 int ptwX_ascendingOrder( ptwXPoints *ptwX );
55 ptwXPoints *ptwX_fromString( char const *str, char **endCharacter, nfu_status *status );
56 nfu_status ptwX_countOccurrences( ptwXPoints *ptwX, double value, int *count );
58 nfu_status ptwX_sort( ptwXPoints *ptwX, enum ptwX_sort_order order );
59 nfu_status ptwX_closesDifference( ptwXPoints *ptwX, double value, int64_t *index, double *difference );
60 nfu_status ptwX_closesDifferenceInRange( ptwXPoints *ptwX, int64_t i1, int64_t i2, double value, int64_t *index, double *difference );
61 ptwXPoints *ptwX_unique( ptwXPoints *ptwX, int order, nfu_status *status );
62 
67 nfu_status ptwX_slopeOffset( ptwXPoints *ptwX, double slope, double offset );
70 
71 nfu_status ptwX_xMinMax( ptwXPoints *ptwX, double *xMin, double *xMax );
72 
73 nfu_status ptwX_compare( ptwXPoints *ptwX1, ptwXPoints *ptwX2, int *comparison );
74 int ptwX_close( ptwXPoints *ptwX1, ptwXPoints *ptwX2, int epsilonFactor, double epsilon, nfu_status *status );
75 
76 /*
77 * Routines in ptwX_misc.c
78 */
79 void ptwX_simpleWrite( ptwXPoints const *ptwX, FILE *f, char const *format );
80 void ptwX_simplePrint( ptwXPoints const *ptwX, char const *format );
81 
82 #if defined __cplusplus
83  }
84  }
85 #endif
86 
87 #endif /* End of ptwX_h_included. */
Float_t x
Definition: compare.C:6
nfu_status ptwX_add_double(ptwXPoints *ptwX, double value)
Definition: ptwX_core.cc:453
nfu_status ptwX_reverse(ptwXPoints *ptwX)
Definition: ptwX_core.cc:314
nfu_status ptwX_closesDifference(ptwXPoints *ptwX, double value, int64_t *index, double *difference)
Definition: ptwX_core.cc:352
ptwXPoints * ptwX_free(ptwXPoints *ptwX)
Definition: ptwX_core.cc:158
ptwX_sort_order
Definition: ptwX.h:21
nfu_status ptwX_sort(ptwXPoints *ptwX, enum ptwX_sort_order order)
Definition: ptwX_core.cc:329
nfu_status ptwX_reallocatePoints(ptwXPoints *ptwX, int64_t size, int forceSmallerResize)
Definition: ptwX_core.cc:116
void ptwX_simplePrint(ptwXPoints const *ptwX, char const *format)
Definition: ptwX_misc.cc:29
int64_t ptwX_length(ptwXPoints *ptwX)
Definition: ptwX_core.cc:166
int64_t allocatedSize
Definition: ptwX.h:27
nfu_status ptwX_xMinMax(ptwXPoints *ptwX, double *xMin, double *xMax)
Definition: ptwX_core.cc:509
double ptwX_getPointAtIndex_Unsafely(ptwXPoints *ptwX, int64_t index)
Definition: ptwX_core.cc:215
double * ptwX_getPointAtIndex(ptwXPoints *ptwX, int64_t index)
Definition: ptwX_core.cc:206
nfu_status ptwX_release(ptwXPoints *ptwX)
Definition: ptwX_core.cc:147
nfu_status ptwX_countOccurrences(ptwXPoints *ptwX, double value, int *count)
Definition: ptwX_core.cc:301
nfu_status ptwX_insertPointsAtIndex(ptwXPoints *ptwX, int64_t index, int64_t n1, double const *xs)
Definition: ptwX_core.cc:238
nfu_status ptwX_setPointAtIndex(ptwXPoints *ptwX, int64_t index, double x)
Definition: ptwX_core.cc:222
int ptwX_ascendingOrder(ptwXPoints *ptwX)
Definition: ptwX_core.cc:257
nfu_status status
Definition: ptwX.h:25
int64_t length
Definition: ptwX.h:26
nfu_status ptwX_copy(ptwXPoints *dest, ptwXPoints *src)
Definition: ptwX_core.cc:78
nfu_status ptwX_add_ptwX(ptwXPoints *ptwX1, ptwXPoints *ptwX2)
Definition: ptwX_core.cc:479
const XML_Char int const XML_Char * value
Definition: expat.h:331
enum nfu_status_e nfu_status
nfu_status ptwX_neg(ptwXPoints *ptwX)
Definition: ptwX_core.cc:446
nfu_status ptwX_clear(ptwXPoints *ptwX)
Definition: ptwX_core.cc:139
ptwXPoints * ptwX_create(int64_t size, int64_t length, double const *xs, nfu_status *status)
Definition: ptwX_core.cc:50
double epsilon(double density, double temperature)
ptwXPoints * ptwX_new(int64_t size, nfu_status *status)
Definition: ptwX_core.cc:24
struct ptwXPoints_s ptwXPoints
nfu_status ptwX_closesDifferenceInRange(ptwXPoints *ptwX, int64_t i1, int64_t i2, double value, int64_t *index, double *difference)
Definition: ptwX_core.cc:359
nfu_status ptwX_deletePoints(ptwXPoints *ptwX, int64_t i1, int64_t i2)
Definition: ptwX_core.cc:191
double * points
Definition: ptwX.h:29
ptwXPoints * ptwX_slice(ptwXPoints *ptwX, int64_t index1, int64_t index2, nfu_status *status)
Definition: ptwX_core.cc:95
int ptwX_close(ptwXPoints *ptwX1, ptwXPoints *ptwX2, int epsilonFactor, double epsilon, nfu_status *status)
Definition: ptwX_core.cc:553
ptwXPoints * ptwX_clone(ptwXPoints *ptwX, nfu_status *status)
Definition: ptwX_core.cc:88
ptwXPoints * ptwX_fromString(char const *str, char **endCharacter, nfu_status *status)
Definition: ptwX_core.cc:287
nfu_status ptwX_slopeOffset(ptwXPoints *ptwX, double slope, double offset)
Definition: ptwX_core.cc:467
nfu_status ptwX_mul_double(ptwXPoints *ptwX, double value)
Definition: ptwX_core.cc:460
void ptwX_simpleWrite(ptwXPoints const *ptwX, FILE *f, char const *format)
Definition: ptwX_misc.cc:19
ptwXPoints * ptwX_unique(ptwXPoints *ptwX, int order, nfu_status *status)
Definition: ptwX_core.cc:385
int64_t mallocFailedSize
Definition: ptwX.h:28
nfu_status ptwX_setup(ptwXPoints *ptwX, int64_t size)
Definition: ptwX_core.cc:37
ptwXPoints * ptwX_createLine(int64_t size, int64_t length, double slope, double offset, nfu_status *status)
Definition: ptwX_core.cc:62
nfu_status ptwX_setData(ptwXPoints *ptwX, int64_t length, double const *xs)
Definition: ptwX_core.cc:173
nfu_status ptwX_compare(ptwXPoints *ptwX1, ptwXPoints *ptwX2, int *comparison)
Definition: ptwX_core.cc:528
nfu_status ptwX_sub_ptwX(ptwXPoints *ptwX1, ptwXPoints *ptwX2)
Definition: ptwX_core.cc:494
nfu_status ptwX_abs(ptwXPoints *ptwX)
Definition: ptwX_core.cc:434