OpenFOAM logo
The Open Source CFD Toolbox
  Programmer’s C++ Doxygen OpenCFD Solutions Contact OpenFOAM

CompactListList Class Template Reference

List of all members.

Detailed Description

template<class T>
class Foam::CompactListList< T >

Definition at line 80 of file CompactListList.H.


Public Member Functions

 CompactListList ()
 Null constructor.
 CompactListList (const List< List< T > > &)
 Construct by converting given List<List<T> >.
 CompactListList (const label nRows, const label nData)
 Construct given size of offset table (number of rows).
 CompactListList (const label nRows, const label nData, const T &)
 Construct given size of offset table (number of rows),.
 CompactListList (const UList< label > &rowSizes)
 Construct given list of row-sizes.
 CompactListList (const UList< label > &rowSizes, const T &)
 Construct given list of row-sizes.
 CompactListList (CompactListList< T > &, bool reUse)
 Construct as copy or re-use as specified.
 CompactListList (Istream &)
 Construct from Istream.
autoPtr< CompactListList<
T > > 
clone () const
 Clone.
label size () const
 Return the primary size, i.e. the number of rows.
const List< label > & offsets () const
 Return the offset table.
List< label > & offsets ()
 Return non-const access to the offset table.
const List< T > & m () const
 Return the packed matrix of data.
List< T > & m ()
 Return non-const access to the packed matrix of data.
void setSize (const label nRows)
 Reset size of CompactListList.
void setSize (const label nRows, const label nData)
 Reset size of CompactListList.
void setSize (const label nRows, const label nData, const T &)
 Reset sizes of CompactListList and value for new elements.
labelList sizes () const
 Return sizes (to be used e.g. for construction).
void setSize (const UList< label > &rowSizes)
 Reset size of CompactListList.
void clear ()
 Clear the CompactListList, i.e. set sizes to zero.
void transfer (CompactListList< T > &)
 Transfer the contents of the argument CompactListList.
label index (const label row, const label col) const
 Return index into m.
label whichRow (const label index) const
 Get row for index into m.
label whichColumn (const label row, const label index) const
 Get column index (j) given above row.
UList< T > operator[] (const label i)
 Return subscript-checked row as UList.
const UList< T > operator[] (const label i) const
 Return const subscript-checked row as UList.
T & operator() (const label i, const label j)
 Return subscript-checked element.
const T & operator() (const label i, const label j) const
 Return const subscript-checked element.
List< List< T > > operator() () const
 Return as List<List<T> >.
void operator= (const T &)
 Assignment of all entries to the given value.

Static Public Member Functions

static CompactListList< T > & null ()
 Return a null CompactListList.

Friends

Istream & operator>> (Istream &, CompactListList< T > &)
 Read CompactListList from Istream, discarding contents.
Ostream & operator (Ostream &, const CompactListList< T > &)

Constructor & Destructor Documentation

CompactListList (  )  [inline]

Null constructor.

Definition at line 40 of file CompactListListI.H.

CompactListList ( const List< List< T > > &   ) 

Construct by converting given List<List<T> >.

CompactListList ( const label  nRows,
const label  nData 
) [inline]

Construct given size of offset table (number of rows).

and number of data.

Definition at line 45 of file CompactListListI.H.

CompactListList ( const label  nRows,
const label  nData,
const T &   
) [inline]

Construct given size of offset table (number of rows),.

the number of data and a value for all elements.

Definition at line 54 of file CompactListListI.H.

CompactListList ( const UList< label > &  rowSizes  ) 

Construct given list of row-sizes.

CompactListList ( const UList< label > &  rowSizes,
const T &   
)

Construct given list of row-sizes.

CompactListList ( CompactListList< T > &  ,
bool  reUse 
)

Construct as copy or re-use as specified.

CompactListList ( Istream &   ) 

Construct from Istream.


Member Function Documentation

autoPtr< CompactListList< T > > clone (  )  const [inline]

Clone.

Definition at line 66 of file CompactListListI.H.

static CompactListList<T>& null (  )  [static]

Return a null CompactListList.

label size (  )  const [inline]

Return the primary size, i.e. the number of rows.

Definition at line 75 of file CompactListListI.H.

const List< label > & offsets (  )  const [inline]

Return the offset table.

Definition at line 81 of file CompactListListI.H.

List< label > & offsets (  )  [inline]

Return non-const access to the offset table.

Definition at line 87 of file CompactListListI.H.

const List< T > & m (  )  const [inline]

Return the packed matrix of data.

Definition at line 93 of file CompactListListI.H.

List< T > & m (  )  [inline]

Return non-const access to the packed matrix of data.

Definition at line 99 of file CompactListListI.H.

void setSize ( const label  nRows  ) 

Reset size of CompactListList.

This form only allows contraction of the CompactListList.

void setSize ( const label  nRows,
const label  nData 
)

Reset size of CompactListList.

void setSize ( const label  nRows,
const label  nData,
const T &   
)

Reset sizes of CompactListList and value for new elements.

labelList sizes (  )  const

Return sizes (to be used e.g. for construction).

void setSize ( const UList< label > &  rowSizes  ) 

Reset size of CompactListList.

void clear (  ) 

Clear the CompactListList, i.e. set sizes to zero.

void transfer ( CompactListList< T > &   ) 

Transfer the contents of the argument CompactListList.

into this CompactListList and annull the argument list.

label index ( const label  row,
const label  col 
) const [inline]

Return index into m.

Definition at line 106 of file CompactListListI.H.

label whichRow ( const label  index  )  const [inline]

Get row for index into m.

Definition at line 119 of file CompactListListI.H.

label whichColumn ( const label  row,
const label  index 
) const [inline]

Get column index (j) given above row.

Definition at line 142 of file CompactListListI.H.

UList< T > operator[] ( const label  i  )  [inline]

Return subscript-checked row as UList.

Definition at line 151 of file CompactListListI.H.

const UList< T > operator[] ( const label  i  )  const [inline]

Return const subscript-checked row as UList.

Definition at line 164 of file CompactListListI.H.

T & operator() ( const label  i,
const label  j 
) [inline]

Return subscript-checked element.

Definition at line 178 of file CompactListListI.H.

const T & operator() ( const label  i,
const label  j 
) const [inline]

Return const subscript-checked element.

Definition at line 185 of file CompactListListI.H.

List<List<T> > operator() (  )  const

Return as List<List<T> >.

void operator= ( const T &   )  [inline]

Assignment of all entries to the given value.

Definition at line 195 of file CompactListListI.H.


Friends And Related Function Documentation

Istream& operator>> ( Istream &  ,
CompactListList< T > &   
) [friend]

Read CompactListList from Istream, discarding contents.

of existing CompactListList.

Ostream& operator ( Ostream &  ,
const CompactListList< T > &   
) [friend]


The documentation for this class was generated from the following files: Copyright © 2000-2007 OpenCFD Ltd