Class ArrayOfTuples packs an heterogeneous array of tuples into a single 1D array. More...
Public Member Functions | |
| ArrayOfTuples () | |
| Empty ctor. | |
| ArrayOfTuples (int tupleSize) | |
| Constructor specifying the size of each tuple, but not the number of tuples. | |
| ArrayOfTuples (int numTuples, int tupleSize) | |
| Constructor specifying both the size and number of the tuples. | |
| int | length () const |
| Returns the number of tuples. | |
| int | tupleSize () const |
| Returns the size of the tuples. | |
| void | resize (int newSize) |
| Change the number of tuples. | |
| void | resize (int newSize, int newTupleSize) |
| Change the number and size of the tuples. | |
| void | reserve (int newSize) |
| Reserve memory for a number of tuples. | |
| void | setTupleSize (int tupleSize) |
| Specify the size of the tuples. | |
| const T & | value (int i, int j) const |
| Get the j-th entry in the i-th tuple. | |
| T & | value (int i, int j) |
| Get the j-th entry in the i-th tuple. | |
| void | append (const Array< T > &x) |
| Append a new tuple to the array. | |
| void | append (const T *x, int n) |
| Append a new tuple to the array. | |
Private Attributes | |
| int | numTuples_ |
| int | tupleSize_ |
| Array< T > | data_ |
Class ArrayOfTuples packs an heterogeneous array of tuples into a single 1D array.
Definition at line 45 of file SundanceArrayOfTuples.hpp.
| Sundance::ArrayOfTuples< T >::ArrayOfTuples | ( | ) | [inline] |
Empty ctor.
Definition at line 105 of file SundanceArrayOfTuples.hpp.
| Sundance::ArrayOfTuples< T >::ArrayOfTuples | ( | int | tupleSize | ) | [inline] |
Constructor specifying the size of each tuple, but not the number of tuples.
Definition at line 109 of file SundanceArrayOfTuples.hpp.
| Sundance::ArrayOfTuples< T >::ArrayOfTuples | ( | int | numTuples, |
| int | tupleSize | ||
| ) | [inline] |
Constructor specifying both the size and number of the tuples.
Definition at line 113 of file SundanceArrayOfTuples.hpp.
| void Sundance::ArrayOfTuples< T >::append | ( | const Array< T > & | x | ) | [inline] |
Append a new tuple to the array.
Definition at line 117 of file SundanceArrayOfTuples.hpp.
Referenced by Sundance::BasicSimplicialMesh::addEdge(), Sundance::BasicSimplicialMesh::addElement(), and Sundance::BasicSimplicialMesh::addFace().
| void Sundance::ArrayOfTuples< T >::append | ( | const T * | x, |
| int | n | ||
| ) | [inline] |
Append a new tuple to the array.
Definition at line 126 of file SundanceArrayOfTuples.hpp.
| int Sundance::ArrayOfTuples< T >::length | ( | ) | const [inline] |
Returns the number of tuples.
Definition at line 59 of file SundanceArrayOfTuples.hpp.
Referenced by Sundance::BasicSimplicialMesh::addEdge(), Sundance::BasicSimplicialMesh::addElement(), Sundance::BasicSimplicialMesh::addFace(), and Sundance::BasicSimplicialMesh::printCells().
| void Sundance::ArrayOfTuples< T >::reserve | ( | int | newSize | ) | [inline] |
Reserve memory for a number of tuples.
Definition at line 79 of file SundanceArrayOfTuples.hpp.
Referenced by Sundance::BasicSimplicialMesh::estimateNumElements().
| void Sundance::ArrayOfTuples< T >::resize | ( | int | newSize, |
| int | newTupleSize | ||
| ) | [inline] |
Change the number and size of the tuples.
Definition at line 71 of file SundanceArrayOfTuples.hpp.
| void Sundance::ArrayOfTuples< T >::resize | ( | int | newSize | ) | [inline] |
Change the number of tuples.
Definition at line 65 of file SundanceArrayOfTuples.hpp.
Referenced by Sundance::BasicSimplicialMesh::addElement(), Sundance::BasicSimplicialMesh::BasicSimplicialMesh(), and Sundance::BasicSimplicialMesh::estimateNumElements().
| void Sundance::ArrayOfTuples< T >::setTupleSize | ( | int | tupleSize | ) | [inline] |
Specify the size of the tuples.
Definition at line 82 of file SundanceArrayOfTuples.hpp.
Referenced by Sundance::BasicSimplicialMesh::BasicSimplicialMesh().
| int Sundance::ArrayOfTuples< T >::tupleSize | ( | ) | const [inline] |
Returns the size of the tuples.
Definition at line 62 of file SundanceArrayOfTuples.hpp.
Referenced by Sundance::BasicSimplicialMesh::cellToStr(), Sundance::BasicSimplicialMesh::printCells(), and Sundance::ArrayOfTuples< int >::setTupleSize().
| T& Sundance::ArrayOfTuples< T >::value | ( | int | i, |
| int | j | ||
| ) | [inline] |
Get the j-th entry in the i-th tuple.
Definition at line 88 of file SundanceArrayOfTuples.hpp.
| const T& Sundance::ArrayOfTuples< T >::value | ( | int | i, |
| int | j | ||
| ) | const [inline] |
Get the j-th entry in the i-th tuple.
Definition at line 85 of file SundanceArrayOfTuples.hpp.
Referenced by Sundance::BasicSimplicialMesh::addEdge(), Sundance::BasicSimplicialMesh::addFace(), Sundance::BasicSimplicialMesh::assignIntermediateCellGIDs(), Sundance::BasicSimplicialMesh::BasicSimplicialMesh(), Sundance::BasicSimplicialMesh::cellToStr(), Sundance::BasicSimplicialMesh::elemZeroFacetView(), Sundance::BasicSimplicialMesh::estimateNumElements(), Sundance::BasicSimplicialMesh::facetLID(), Sundance::BasicSimplicialMesh::getCellDiameters(), Sundance::BasicSimplicialMesh::getFacetLIDs(), Sundance::BasicSimplicialMesh::getJacobians(), Sundance::BasicSimplicialMesh::printCells(), Sundance::BasicSimplicialMesh::pushForward(), and Sundance::BasicSimplicialMesh::resolveEdgeOwnership().
Array<T> Sundance::ArrayOfTuples< T >::data_ [private] |
Definition at line 101 of file SundanceArrayOfTuples.hpp.
Referenced by Sundance::ArrayOfTuples< int >::reserve(), Sundance::ArrayOfTuples< int >::resize(), and Sundance::ArrayOfTuples< int >::value().
int Sundance::ArrayOfTuples< T >::numTuples_ [private] |
Definition at line 98 of file SundanceArrayOfTuples.hpp.
Referenced by Sundance::ArrayOfTuples< int >::length(), and Sundance::ArrayOfTuples< int >::resize().
int Sundance::ArrayOfTuples< T >::tupleSize_ [private] |