LifeV
ArraySimple< DataType > Class Template Reference

ArraySimple. More...

#include <ArraySimple.hpp>

+ Inheritance diagram for ArraySimple< DataType >:
+ Collaboration diagram for ArraySimple< DataType >:

Private Attributes

vectorSize_Type M_numberOfRows
 Number of rows. More...
 
vectorSize_Type M_numberOfColumns
 Number of columns. More...
 

Public Types

typedef DataType data_Type
 
typedef std::vector< DataType > vector_Type
 
typedef vector_Type::size_type vectorSize_Type
 
typedef vector_Type::reference vectorReference_Type
 
typedef vector_Type::const_reference vectorConstReference_Type
 
typedef vector_Type::iterator vectorIterator_Type
 
typedef vector_Type::const_iterator vectorConstIterator_Type
 

Constructor & Destructor

 ArraySimple ()
 Empty Constructor. More...
 
 ArraySimple (vectorSize_Type vectorSize)
 Constructor. More...
 
 ArraySimple (vectorSize_Type numberOfRows, vectorSize_Type numberOfColumns)
 Constructor. More...
 
 ~ArraySimple ()
 Destructor. More...
 

Operators

vectorReference_Type operator() (vectorSize_Type const i)
 Access operator. More...
 
vectorConstReference_Type operator() (vectorSize_Type const i) const
 Const access operator. More...
 
vectorReference_Type operator() (vectorSize_Type const i, vectorSize_Type const j)
 Access operator. More...
 
vectorConstReference_Type operator() (vectorSize_Type const i, vectorSize_Type const j) const
 Const access operator. More...
 

Methods

ArraySimple< DataType >::iterator columnIterator (vectorSize_Type const column)
 Return the iterator of the column passed by argument. More...
 
void reshape (vectorSize_Type const numberOfRows, vectorSize_Type const numberOfColumns)
 Resize the ArraySimple vector. More...
 
void clearArray ()
 Completely clear out the container, returning memory to the system. More...
 
bool checkIndex (vectorSize_Type const i, vectorSize_Type const j) const
 Check if the MeshEntityContainer vector contains an element with row index i and column index j. More...
 
void showMe () const
 Show the contents of the ArraySimple vector. More...
 

Get Methods

vectorSize_Type const numberOfRows () const
 Return the number of rows. More...
 
vectorSize_Type const numberOfColumns () const
 Return the number of columns. More...
 

Detailed Description

template<typename DataType>
class LifeV::ArraySimple< DataType >

ArraySimple.

Author
Luca Formaggia

The class is a wrap up of Standard Library vector class. It defines arrays of n x m size. This class is deprecated and it should be removed when the discussion is over. It is with COLUMNWISE ORDERING

Example:

ArraySimple<int> b(3,5) is an array with 3 rows and 5 columns

Definition at line 62 of file ArraySimple.hpp.

Member Typedef Documentation

◆ data_Type

typedef DataType data_Type

Definition at line 69 of file ArraySimple.hpp.

◆ vector_Type

typedef std::vector<DataType> vector_Type

Definition at line 70 of file ArraySimple.hpp.

◆ vectorSize_Type

typedef vector_Type::size_type vectorSize_Type

Definition at line 71 of file ArraySimple.hpp.

◆ vectorReference_Type

typedef vector_Type::reference vectorReference_Type

Definition at line 72 of file ArraySimple.hpp.

◆ vectorConstReference_Type

typedef vector_Type::const_reference vectorConstReference_Type

Definition at line 73 of file ArraySimple.hpp.

◆ vectorIterator_Type

typedef vector_Type::iterator vectorIterator_Type

Definition at line 74 of file ArraySimple.hpp.

◆ vectorConstIterator_Type

typedef vector_Type::const_iterator vectorConstIterator_Type

Definition at line 75 of file ArraySimple.hpp.

Constructor & Destructor Documentation

◆ ArraySimple() [1/3]

ArraySimple ( )
explicit

Empty Constructor.

Construct a ArraySimple vector of size (0,0)

Definition at line 234 of file ArraySimple.hpp.

+ Here is the caller graph for this function:

◆ ArraySimple() [2/3]

ArraySimple ( vectorSize_Type  vectorSize)
explicit

Constructor.

Construct a ArraySimple vector of size (size,1)

Parameters
vectorSizesize of the ArraySimple vector

Definition at line 242 of file ArraySimple.hpp.

+ Here is the caller graph for this function:

◆ ArraySimple() [3/3]

ArraySimple ( vectorSize_Type  numberOfRows,
vectorSize_Type  numberOfColumns 
)
explicit

Constructor.

Construct a ArraySimple object of size (numberOfRows,numberOfColumns)

Parameters
numberOfRowsnumber of rows
numberOfColumnsnumber of columns

Definition at line 250 of file ArraySimple.hpp.

+ Here is the caller graph for this function:

◆ ~ArraySimple()

~ArraySimple ( )
inline

Destructor.

Definition at line 105 of file ArraySimple.hpp.

Member Function Documentation

◆ operator()() [1/4]

vectorReference_Type operator() ( vectorSize_Type const  i)
inline

Access operator.

ArraySimple is seen as vector (index from one)

Parameters
iindex of the element of the ArraySimple vector
Returns
a vector reference

Definition at line 119 of file ArraySimple.hpp.

◆ operator()() [2/4]

vectorConstReference_Type operator() ( vectorSize_Type const  i) const
inline

Const access operator.

ArraySimple is seen as vector

Parameters
iindex of the element of the ArraySimple vector
Returns
a vector const reference

Definition at line 130 of file ArraySimple.hpp.

◆ operator()() [3/4]

vectorReference_Type operator() ( vectorSize_Type const  i,
vectorSize_Type const  j 
)
inline

Access operator.

Parameters
irow index
jcolumn index
Returns
a vector reference

Definition at line 141 of file ArraySimple.hpp.

◆ operator()() [4/4]

vectorConstReference_Type operator() ( vectorSize_Type const  i,
vectorSize_Type const  j 
) const
inline

Const access operator.

Parameters
irow index
jcolumn index
Returns
a vector const reference

Definition at line 152 of file ArraySimple.hpp.

◆ columnIterator()

ArraySimple< DataType >::iterator columnIterator ( vectorSize_Type const  column)
inline

Return the iterator of the column passed by argument.

Parameters
columncolumn index
Returns
ArraySimple iterator

Definition at line 262 of file ArraySimple.hpp.

◆ reshape()

void reshape ( vectorSize_Type const  numberOfRows,
vectorSize_Type const  numberOfColumns 
)

Resize the ArraySimple vector.

Parameters
numberOfRowsnumber of rows
numberOfColumnsnumber of columns

Definition at line 277 of file ArraySimple.hpp.

◆ clearArray()

void clearArray ( )
inline

Completely clear out the container, returning memory to the system.

Definition at line 286 of file ArraySimple.hpp.

◆ checkIndex()

bool checkIndex ( vectorSize_Type const  i,
vectorSize_Type const  j 
) const
inline

Check if the MeshEntityContainer vector contains an element with row index i and column index j.

Parameters
irow index
jcolumn index
Returns
boolean

Definition at line 186 of file ArraySimple.hpp.

◆ showMe()

void showMe ( ) const

Show the contents of the ArraySimple vector.

Definition at line 297 of file ArraySimple.hpp.

◆ numberOfRows()

vectorSize_Type const numberOfRows ( ) const
inline

Return the number of rows.

Returns
a vector size type variable holding the number of rows

Definition at line 204 of file ArraySimple.hpp.

◆ numberOfColumns()

vectorSize_Type const numberOfColumns ( ) const
inline

Return the number of columns.

Returns
a vector size type variable holding the number of columns

Definition at line 213 of file ArraySimple.hpp.

+ Here is the caller graph for this function:

Field Documentation

◆ M_numberOfRows

vectorSize_Type M_numberOfRows
private

Number of rows.

Definition at line 223 of file ArraySimple.hpp.

◆ M_numberOfColumns

vectorSize_Type M_numberOfColumns
private

Number of columns.

Definition at line 226 of file ArraySimple.hpp.


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