Givaro
Public Types | Public Member Functions | Data Fields | Protected Attributes
RetMatrixStorage< T, Dense >::Storage_t Struct Reference

#include <givmatstoragedense.h>

+ Inheritance diagram for RetMatrixStorage< T, Dense >::Storage_t:
+ Collaboration diagram for RetMatrixStorage< T, Dense >::Storage_t:

Public Types

typedef size_t Indice_t
 
typedef T Type_t
 
typedef Array0< T > Self_t
 
typedef Type_tIterator_t
 
typedef const Type_tconstIterator_t
 
typedef Type_t value_type
 STL compliance. More...
 
typedef Type_titerator
 
typedef const Type_tconst_iterator
 

Public Member Functions

void allocate (Indice_t nrow, Indice_t ncol)
 
Type_toperator() (Indice_t i, Indice_t j)
 
const Type_toperator() (Indice_t i, Indice_t j) const
 
void resize (Indice_t nrow, Indice_t ncol)
 
Indice_t nrow () const
 
Indice_t ncol () const
 
void destroy ()
 Destroy of the array. More...
 
void allocate (size_t s)
 Allocation of an array of s Elements. More...
 
void reallocate (size_t s)
 Reallocation of an array of s Elements. More...
 
void resize (size_t s)
 resize More...
 
void reserve (size_t s)
 reserve More...
 
Self_tcopy (const Self_t &src)
 Physical copy operator. More...
 
Self_tlogcopy (const Self_t &src)
 Logical recopy operator: make an alias to src. Return dest. More...
 
size_t size () const
 Return the occuped size of the array. More...
 
size_t phsize () const
 Return the physical size of the array (capacity) More...
 
Type_tbaseptr ()
 Return the base ptr to the array. More...
 
const Type_tbaseptr () const
 
const T & operator[] (Indice_t i) const
 Access to the ith Element: More...
 
T & operator[] (Indice_t i)
 
const T & front () const
 back/front More...
 
T & front ()
 
const T & back () const
 
T & back ()
 
void push_back (const T &a)
 add one element at the end More...
 
void write (Indice_t i, const Type_t &val)
 write More...
 
void read (Indice_t i, Type_t &val) const
 read More...
 
Iterator_t begin ()
 Iterators. More...
 
constIterator_t begin () const
 
Iterator_t end ()
 
constIterator_t end () const
 
int getCounter () const
 

Data Fields

Indice_t _nrow
 
Indice_t _ncol
 

Protected Attributes

int * _cnt
 reference counter on _d More...
 
size_t _size
 actual size of the array. More...
 
size_t _psz
 physical size of the array More...
 
T * _d
 ptr to the memory More...
 

Member Typedef Documentation

◆ Indice_t

typedef size_t Indice_t
inherited

◆ Type_t

typedef T Type_t
inherited

◆ Self_t

typedef Array0<T> Self_t
inherited

◆ Iterator_t

typedef Type_t* Iterator_t
inherited

◆ constIterator_t

typedef const Type_t* constIterator_t
inherited

◆ value_type

typedef Type_t value_type
inherited

STL compliance.

◆ iterator

typedef Type_t* iterator
inherited

◆ const_iterator

typedef const Type_t* const_iterator
inherited

Member Function Documentation

◆ allocate() [1/2]

void allocate ( Indice_t  nrow,
Indice_t  ncol 
)
inline

◆ operator()() [1/2]

Type_t& operator() ( Indice_t  i,
Indice_t  j 
)
inline

◆ operator()() [2/2]

const Type_t& operator() ( Indice_t  i,
Indice_t  j 
) const
inline

◆ resize() [1/2]

void resize ( Indice_t  nrow,
Indice_t  ncol 
)
inline

◆ nrow()

Indice_t nrow ( ) const
inline

◆ ncol()

Indice_t ncol ( ) const
inline

◆ destroy()

void destroy
inlineinherited

Destroy of the array.

◆ allocate() [2/2]

void allocate ( size_t  s)
inlineinherited

Allocation of an array of s Elements.

if refcount>1 then it is always a creation of new array

◆ reallocate()

void reallocate ( size_t  s)
inlineinherited

Reallocation of an array of s Elements.

if refcount>1 then it is always a creation of new array + recopy

◆ resize() [2/2]

void resize ( size_t  s)
inlineinherited

resize

◆ reserve()

void reserve ( size_t  s)
inlineinherited

reserve

◆ copy()

Array0< T > & copy ( const Self_t src)
inlineinherited

Physical copy operator.

reallocate dest of the same size as src (if necessary) and apply GivaroCopyItem<Array<T>,T> on each Element. This class can be specialized. Return dest (i.e, *this).

◆ logcopy()

Array0< T > & logcopy ( const Self_t src)
inlineinherited

Logical recopy operator: make an alias to src. Return dest.

◆ size()

size_t size ( ) const
inlineinherited

Return the occuped size of the array.

◆ phsize()

size_t phsize
inlineinherited

Return the physical size of the array (capacity)

◆ baseptr() [1/2]

T * baseptr
inlineinherited

Return the base ptr to the array.

◆ baseptr() [2/2]

const T * baseptr
inlineinherited

◆ operator[]() [1/2]

const T & operator[] ( Indice_t  i) const
inlineinherited

Access to the ith Element:

◆ operator[]() [2/2]

T & operator[] ( Indice_t  i)
inlineinherited

◆ front() [1/2]

const T & front
inlineinherited

back/front

◆ front() [2/2]

T & front
inlineinherited

◆ back() [1/2]

const T & back
inlineinherited

◆ back() [2/2]

T & back
inlineinherited

◆ push_back()

void push_back ( const T &  a)
inlineinherited

add one element at the end

◆ write()

void write ( Indice_t  i,
const Type_t val 
)
inlineinherited

write

◆ read()

void read ( Indice_t  i,
Type_t val 
) const
inlineinherited

read

◆ begin() [1/2]

Array0< T >::Iterator_t begin
inlineinherited

Iterators.

◆ begin() [2/2]

Array0< T >::constIterator_t begin
inlineinherited

◆ end() [1/2]

Array0< T >::Iterator_t end
inlineinherited

◆ end() [2/2]

Array0< T >::constIterator_t end
inlineinherited

◆ getCounter()

int getCounter ( ) const
inlineinherited

get Counter

Field Documentation

◆ _nrow

Indice_t _nrow

◆ _ncol

Indice_t _ncol

◆ _cnt

int* _cnt
protectedinherited

reference counter on _d

◆ _size

size_t _size
protectedinherited

actual size of the array.

If ==0 then _psz=_d=_cnt=0

◆ _psz

size_t _psz
protectedinherited

physical size of the array

◆ _d

T* _d
protectedinherited

ptr to the memory


The documentation for this struct was generated from the following file: