Go to the documentation of this file.
19 #if !defined escript_DataVectorTaipan_H
20 #define escript_DataVectorTaipan_H
227 ESYS_ASSERT(i<
size(),
"DataVectorTaipan: invalid index specified. " << i <<
" of " <<
size());
235 ESYS_ASSERT(i<
size(),
"DataVectorTaipan: invalid index specified. " << i <<
" of " <<
size());
#define ESCRIPT_DLL_API
Definition: escriptcore/src/system_dep.h:30
DataVectorTaipan()
Default constructor for DataVectorTaipan.
Definition: DataVectorTaipan.cpp:47
DataTypes::real_t getElt() const
Definition: WrappedArray.h:89
bool operator==(const DataVectorTaipan &other) const
DataVectorTaipan equality comparison operator "==". Return true if the given DataVectorTaipan is equa...
Definition: DataVectorTaipan.cpp:158
size_type size() const
Return the number of elements in this DataVectorTaipan.
Definition: DataVectorTaipan.h:218
size_type m_N
Definition: DataVectorTaipan.h:199
size_type m_dim
Definition: DataVectorTaipan.h:198
DataVectorTaipan implements an arbitrarily long vector of data values. DataVectorTaipan is the underl...
Definition: DataVectorTaipan.h:45
Definition: WrappedArray.h:33
const ElementType & const_reference
Definition: DataVectorTaipan.h:64
~DataVectorTaipan()
Default destructor for DataVectorTaipan.
Definition: DataVectorTaipan.cpp:79
size_type m_size
Definition: DataVectorTaipan.h:197
unsigned int getRank() const
Definition: WrappedArray.h:77
DataVectorTaipan & operator=(const DataVectorTaipan &other)
DataVectorTaipan assignment operator "=". Assign the given DataVectorTaipan object to this.
Definition: DataVectorTaipan.cpp:135
Definition: DataException.h:28
VectorStorageType m_array_data
Definition: DataVectorTaipan.h:203
std::vector< int > ShapeType
The shape of a single datapoint.
Definition: DataTypes.h:44
void resize(const size_type newSize, const value_type newVal=0.0, const size_type newBlockSize=1)
Resize the DataVectorTaipan to the given length "newSize". All current data is lost....
Definition: DataVectorTaipan.cpp:94
const ElementType * const_pointer
Definition: DataVectorTaipan.h:60
int noValues(const ShapeType &shape)
Calculate the number of values in a datapoint with the given shape.
Definition: DataTypes.cpp:91
Taipan array manager, C++ version. Based on TaipanMemManager C module by Lutz Gross.
Definition: Taipan.h:44
long size_type
Definition: DataVectorTaipan.h:62
Taipan arrayManager
Definition: DataVectorTaipan.cpp:39
void copyFromArray(const escript::WrappedArray &value, size_type copies)
Populates the vector with the data from value. This method currently throws an exception if the speci...
Definition: DataVectorTaipan.cpp:283
escript::DataTypes::DataVectorAlt< real_t > RealVectorType
Vector to store underlying data.
Definition: DataVector.h:44
void releaseUnusedMemory()
releases unused memory in the memory manager.
Definition: DataVectorTaipan.cpp:41
double * new_array(size_type dim, size_type N)
Taipan data-array allocator.
Definition: Taipan.cpp:105
bool operator!=(const DataVectorTaipan &other) const
DataVectorTaipan inequality comparison operator "!=". Return true if the given DataVectorTaipan is no...
Definition: DataVectorTaipan.cpp:180
void delete_array(double *array)
Taipan data-array deallocator.
Definition: Taipan.cpp:192
reference operator[](const size_type i)
Return a reference to the element at position i in this DataVectorTaipan. Will throw an exception if ...
Definition: DataVectorTaipan.h:225
Definition: AbstractContinuousDomain.cpp:23
vec_size_type getRelIndex(const DataTypes::ShapeType &shape, vec_size_type i)
Compute the offset (in 1D vector) of a given subscript with a shape.
Definition: DataTypes.h:240
double ElementType
Definition: DataVectorTaipan.h:51
ElementType value_type
Definition: DataVectorTaipan.h:61
ElementType & reference
Definition: DataVectorTaipan.h:63
ElementType * VectorStorageType
Definition: DataVectorTaipan.h:55
void copyFromArrayToOffset(const escript::WrappedArray &value, size_type offset, size_type copies)
Definition: DataVectorTaipan.cpp:186
const DataTypes::ShapeType & getShape() const
Definition: WrappedArray.h:83
#define ESYS_ASSERT(a, b)
EsysAssert is a MACRO that will throw an exception if the boolean condition specified is false.
Definition: Assert.h:79
void release_unused_arrays()
frees all arrays that are currently unused.
Definition: Taipan.cpp:74