9#ifndef __YTLIB_DOUBLE_ARRAY_H
10#define __YTLIB_DOUBLE_ARRAY_H
15#include "lang/ytObject.h"
17#define ytDoubleArray_ERROR_VALUE ((size_t) -1)
25typedef struct ytDoubleArray_t {
34#define ytDoubleArray_new() ytDoubleArray_newm(__FILE__,__LINE__)
35ytDoubleArray * ytDoubleArray_newm(
const char * file,
int line);
40void ytDoubleArray_deletev(
void *
this);
42void ytDoubleArray_deleteAllv(
void *
this);
46void ytDoubleArray_arrayDelete(
ytDoubleArray *
this,
size_t size);
47void ytDoubleArray_dump(
const ytDoubleArray *
this, FILE * fp);
48void ytDoubleArray_dumpv(
const ytObject *
this, FILE * fp);
52size_t ytDoubleArray_arrayMemSize(
const ytDoubleArray *
this,
size_t n);
57void ytDoubleArray_set(
ytDoubleArray *
this,
size_t index,
double value);
59void ytDoubleArray_insert(
ytDoubleArray *
this,
size_t index,
double value);
60double ytDoubleArray_remove(
ytDoubleArray *
this,
size_t index);
62void ytDoubleArray_copyArray(
ytDoubleArray *
this,
size_t index,
const double * array,
size_t size);
63double ytDoubleArray_get(
const ytDoubleArray *
this,
size_t index);
67size_t ytDoubleArray_find(
const ytDoubleArray *
this,
const double v);
68void ytDoubleArray_print(
const ytDoubleArray *
this, FILE * fp,
char * delim);
69int ytDoubleArray_sprint(
const ytDoubleArray *
this,
char * buff,
size_t size,
char * delim);
75size_t ytDoubleArray_memorySizeI(
const ytObject *
this);
76ytByte * ytDoubleArray_serializeI(
const ytObject * obj, ytByte ** pptr);
77ytByte * ytDoubleArray_serialize(
const ytDoubleArray *
this, ytByte ** pptr);
78ytDoubleArray * ytDoubleArray_deserialize(ytByte **
const pptr);
79ytObject * ytDoubleArray_deserializeI(ytByte **
const ptr);
82void ytDoubleArray_MPI_Bcast(
ytDoubleArray ** pObj,
int root, MPI_Comm comm);
83void ytDoubleArray_MPI_BcastI(
ytObject ** pObject,
int root, MPI_Comm comm);