98 static inline boost::shared_ptr<CORE_Array2D<T> >
New() {
230 tUIndex *i0=&mRowIndices[iRow];
263 return mRowIndices[i+1]-mRowIndices[i];
CORE_Array2D< tInt > CORE_IntArray2D
Definition: CORE_Array2D.h:326
const tUIndex & getRowsNumber() const
get the rows number
Definition: CORE_Array2D.h:306
void allocateRows(const tUIndex &n)
allocate the rows array indices
Definition: CORE_Array2D.hpp:40
const tUIndex & getSize() const
return the size of the array for reading
Definition: CORE_Array.h:1018
static boost::shared_ptr< CORE_Array2D< T > > New()
New constructor. return a shared pointer of CORE_Array2D.
Definition: CORE_Array2D.h:98
CORE_Array2D< tBoolean > CORE_BooleanArray2D
Definition: CORE_Array2D.h:327
void copy(const CORE_Array2D< T > &v)
copy the array 2D
Definition: CORE_Array2D.hpp:135
T * getValues()
get the values
Definition: CORE_Array2D.h:293
this class describes an array
Definition: CORE_Vector.h:19
virtual void fitToSize()
fit to size
Definition: CORE_Array2D.hpp:125
void copy(const CORE_Array2D< T > *v)
copy the pointer of array 2D
Definition: CORE_Array2D.h:148
void add(const tUIndex &iRow, const T &obj)
add an element at the end of row at index iRow
Definition: CORE_Array2D.h:227
virtual ~CORE_Array2D()
destroy an array of T*
Definition: CORE_Array2D.hpp:22
const T * getRow(const tUIndex &i) const
get a pointer to the first element of row
Definition: CORE_Array2D.h:276
tUIndex getRowSize(const tUIndex &i) const
return the size of the row at index i
Definition: CORE_Array2D.h:261
CORE_Array2D()
build an array of T*
Definition: CORE_Array2D.hpp:9
const T & operator()(const tUIndex &i, const tUIndex &j)
get the element at index i,j
Definition: CORE_Array2D.h:80
tUIndex mRowCapacity
Definition: CORE_Array2D.h:36
#define tBoolean
Definition: types.h:139
void insertAtIndex(const tUIndex &i, const T &v)
insert the object at index i
Definition: CORE_ArrayList.hpp:122
virtual void clear()
clear the array
Definition: CORE_Array2D.h:118
#define null
Definition: types.h:144
const T & operator()(const tUIndex &i, const tUIndex &j) const
get the element at index i,j
Definition: CORE_Array2D.h:89
TYPEDEF_SPTR(CORE_DoubleArray2D)
CORE_Array2D< tInteger > CORE_IntegerArray2D
Definition: CORE_Array2D.h:333
const T & operator[](const tUIndex &i) const
get the i-th element Assert in (i>-1) Assert in (i<size());
Definition: CORE_Array.h:164
CORE_Array2D< tComplex > CORE_ComplexArray2D
Definition: CORE_Array2D.h:329
void reserve(const tUIndex &nRows, const tUIndex &nCols)
reserve of the 2D array of size nRows x nCols
Definition: CORE_Array2D.hpp:100
void desallocateRows()
desallocate the rows
Definition: CORE_Array2D.hpp:28
const T * getValues() const
get the values
Definition: CORE_Array2D.h:288
void setRowsNumber(const tUIndex &nRows)
set the rows number
Definition: CORE_Array2D.hpp:111
this class describes an array
Definition: CORE_Array.h:19
CORE_Array2D< tDouble > CORE_DoubleArray2D
Definition: CORE_Array2D.h:324
this class describes an array of arrays ordered by rows The array like this 0 1 2 3 4 ...
Definition: CORE_Array2D.h:24
#define tUIndex
Definition: types.h:126
const T * operator[](const tUIndex &i) const
get the pointer the i-th row
Definition: CORE_Array2D.h:61
void addRow(const tUIndex &rowSize)
add a row of size row size at end
Definition: CORE_Array2D.hpp:328
const tUIndex * getRowIndices() const
get the row indices
Definition: CORE_Array2D.h:300
#define tString
Definition: types.h:135
CORE_Array2D< tUInteger > CORE_UIntegerArray2D
Definition: CORE_Array2D.h:334
tUIndex mRowsNumber
Definition: CORE_Array2D.h:30
CORE_Array2D< tChar > CORE_CharArray2D
Definition: CORE_Array2D.h:325
void setValues(const tUIndex &nvs, const T *vs, const tUIndex &nrs, const tUIndex *rs)
set the values
Definition: CORE_Array2D.hpp:161
void setRowSize(const tUIndex &i, const tUIndex &n)
the the size of the row at index i
Definition: CORE_Array2D.hpp:196
void setRowValue(const tUIndex &i, const tUIndex &p, const Q *vs)
set row value to vs array
Definition: CORE_Array2D.hpp:311
Definition: CORE_ArrayList.h:12
T * getRow(const tUIndex &i)
get the pointer to first element at row
Definition: CORE_Array2D.h:282
CORE_Array2D< tSInt > CORE_ShortArray2D
Definition: CORE_Array2D.h:331
void setValuesByReference(const tUIndex &nvs, T *vs, const tUIndex &nrs, tUIndex *rs)
set the values by reference
Definition: CORE_Array2D.hpp:179
CORE_Array2D< tFlag > CORE_FlagArray2D
Definition: CORE_Array2D.h:330
CORE_Array2D< tReal > CORE_RealArray2D
Definition: CORE_Array2D.h:328
tBoolean mIsPrivateRowAllocated
Definition: CORE_Array2D.h:35
T * operator[](const tUIndex &i)
get pointer to the first element of rows i
Definition: CORE_Array2D.h:70
CORE_Array2D< tString > CORE_StringArray2D
Definition: CORE_Array2D.h:332
void setSize(const tUIndex &nRows, const tUIndex &nCols)
set the size of the 2D array n rows of n columns
Definition: CORE_Array2D.hpp:90
tString toString() const
turn the array 2D into string
Definition: CORE_Array2D.hpp:339
const tUIndex & getValuesNumber() const
return the number of values
Definition: CORE_Array2D.h:253
#define ASSERT_IN(a)
Definition: types.h:196
tUIndex * mRowIndices
Definition: CORE_Array2D.h:37
class Free introduced for deleting a smart pointer
Definition: CORE_Object.h:141
tUIndex getColumnsNumber(const tUIndex &i) const
return the number of columns of the row at index i
Definition: CORE_Array2D.h:269