36#ifndef __YTLIB_DOUBLE_ARRAY_H
37#define __YTLIB_DOUBLE_ARRAY_H
42#include "lang/ytObject.h"
44#define ytDoubleArray_ERROR_VALUE ((size_t) -1)
52typedef struct ytDoubleArray_t {
61#define ytDoubleArray_new() ytDoubleArray_newm(__FILE__,__LINE__)
62ytDoubleArray * ytDoubleArray_newm(
const char * file,
int line);
67void ytDoubleArray_deletev(
void *
this);
69void ytDoubleArray_deleteAllv(
void *
this);
73void ytDoubleArray_arrayDelete(
ytDoubleArray *
this,
size_t size);
74void ytDoubleArray_dump(
const ytDoubleArray *
this, FILE * fp);
75void ytDoubleArray_dumpv(
const ytObject *
this, FILE * fp);
79size_t ytDoubleArray_arrayMemSize(
const ytDoubleArray *
this,
size_t n);
84void ytDoubleArray_set(
ytDoubleArray *
this,
size_t index,
double value);
86void ytDoubleArray_insert(
ytDoubleArray *
this,
size_t index,
double value);
87double ytDoubleArray_remove(
ytDoubleArray *
this,
size_t index);
89void ytDoubleArray_copyArray(
ytDoubleArray *
this,
size_t index,
const double * array,
size_t size);
90double ytDoubleArray_get(
const ytDoubleArray *
this,
size_t index);
94size_t ytDoubleArray_find(
const ytDoubleArray *
this,
const double v);
95void ytDoubleArray_print(
const ytDoubleArray *
this, FILE * fp,
char * delim);
96int ytDoubleArray_sprint(
const ytDoubleArray *
this,
char * buff,
size_t size,
char * delim);
102size_t ytDoubleArray_memorySizeI(
const ytObject *
this);
103ytByte * ytDoubleArray_serializeI(
const ytObject * obj, ytByte ** pptr);
104ytByte * ytDoubleArray_serialize(
const ytDoubleArray *
this, ytByte ** pptr);
105ytDoubleArray * ytDoubleArray_deserialize(ytByte **
const pptr);
106ytObject * ytDoubleArray_deserializeI(ytByte **
const ptr);
109void ytDoubleArray_MPI_Bcast(
ytDoubleArray ** pObj,
int root, MPI_Comm comm);
110void ytDoubleArray_MPI_BcastI(
ytObject ** pObject,
int root, MPI_Comm comm);