#include <stdio.h>
#include <stdlib.h>
#include <cmath>
#include "nf_utilities.h"
Go to the source code of this file.
#define is_nan |
( |
|
a | ) |
std::isnan(a) |
void* nfu_calloc |
( |
size_t |
size, |
|
|
size_t |
n |
|
) |
| |
Definition at line 123 of file nf_utilities.cc.
125 void *
p = calloc( size,
n );
127 if(
nfu_debugging ) printf(
"nfu_calloc %12p size = %8llu, n = %8llu\n", p, (
long long unsigned) size, (
long long unsigned)
n );
double nfu_getInfinity |
( |
double |
sign | ) |
|
double nfu_getNAN |
( |
void |
| ) |
|
int nfu_isNAN |
( |
double |
d | ) |
|
void* nfu_malloc |
( |
size_t |
size | ) |
|
Definition at line 113 of file nf_utilities.cc.
115 void *
p = malloc( size );
117 if(
nfu_debugging ) printf(
"nfu_malloc %12p size = %8llu\n", p, (
long long unsigned) size );
void nfu_printErrorMsg |
( |
char * |
fmt, |
|
|
|
... |
|
) |
| |
Definition at line 166 of file nf_utilities.cc.
170 va_start( args, fmt );
171 vfprintf( stderr, fmt, args );
172 fprintf( stderr,
"\n" );
175 exit( EXIT_FAILURE );
void nfu_printMsg |
( |
char * |
fmt, |
|
|
|
... |
|
) |
| |
Definition at line 154 of file nf_utilities.cc.
158 va_start( args, fmt );
159 vfprintf( stderr, fmt, args );
160 fprintf( stderr,
"\n" );
void* nfu_realloc |
( |
size_t |
size, |
|
|
void * |
old |
|
) |
| |
Definition at line 133 of file nf_utilities.cc.
135 void *
p = realloc( old, size );
137 if(
nfu_debugging ) printf(
"nfu_realloc %12p size = %8llu, old = %12p\n", p, (
long long unsigned) size, old );
void nfu_setMemoryDebugMode |
( |
int |
mode | ) |
|
const char* nfu_statusMessage |
( |
nfu_status |
status | ) |
|
Definition at line 76 of file nf_utilities.cc.
static const char empty_message[]
static const char mallocError_message[]
static const char unsupportedInterpolation_message[]
static const char XNotAscending_message[]
static const char insufficientMemory_message[]
static const char badIndex_message[]
static const char unsupportedInterpolationConversion_message[]
static const char tooFewPoints_message[]
static const char badSelf_message[]
static const char unknownStatus_message[]
static const char otherInterpolation_message[]
static const char XOutsideDomain_message[]
static const char Okay_message[]
static const char notMutualDomian_message[]
static const char divByZero_message[]
static const char badIntegrationInput_message[]
static const char failedToConverge_message[]
static const char invalidInterpolation_message[]
static const char badIndexForX_message[]
static const char badInput_message[]
static const char badNorm_message[]
static const char oddNumberOfValues_message[]
const char badIndex_message[] = "bad index" |
|
static |
const char badIndexForX_message[] = "index not correct for x value" |
|
static |
const char badInput_message[] = "bad input to function" |
|
static |
const char badIntegrationInput_message[] = "bad integration input" |
|
static |
const char badNorm_message[] = "bad norm" |
|
static |
const char badSelf_message[] = "source object has bad status value" |
|
static |
const char divByZero_message[] = "division by zero" |
|
static |
const char empty_message[] = "empty instance" |
|
static |
const char failedToConverge_message[] = "failed to converge" |
|
static |
const char insufficientMemory_message[] = "user's memory is too small to hanlde data" |
|
static |
const char invalidInterpolation_message[] = "bad x,y values for interpolation" |
|
static |
const char mallocError_message[] = "could not allocate memory" |
|
static |
const char notMutualDomian_message[] = "domains are not mutual" |
|
static |
const char oddNumberOfValues_message[] = "odd number of inputted values" |
|
static |
const char Okay_message[] = "all is okay" |
|
static |
const char otherInterpolation_message[] = "other integration not supported" |
|
static |
const char tooFewPoints_message[] = "too few points in instance" |
|
static |
const char unknownStatus_message[] = "unknown (i.e., invalid) status value" |
|
static |
const char unsupportedInterpolation_message[] = "unsupported interpolation" |
|
static |
const char unsupportedInterpolationConversion_message[] = "unsupported interpolation conversion" |
|
static |
const char XNotAscending_message[] = "x values are not ascending" |
|
static |
const char XOutsideDomain_message[] = "x value not in domain" |
|
static |