CompactListList< T > Class Template Reference

A packed storage of objects of type <T> using an offset table for access. More...

Public Types

typedef T value_type
 The value type the list contains. More...
 
typedef Tpointer
 The pointer type for non-const access to value_type items. More...
 
typedef const Tconst_pointer
 The pointer type for const access to value_type items. More...
 
typedef Treference
 The type used for storing into value_type objects. More...
 
typedef const Tconst_reference
 The type used for reading from constant value_type objects. More...
 
typedef label size_type
 The type to represent the size of a CompactListList. More...
 

Public Member Functions

 CompactListList () noexcept=default
 Default construct. More...
 
 CompactListList (const CompactListList< T > &list)
 Copy construct. More...
 
 CompactListList (CompactListList< T > &&list)
 Move construct. More...
 
 CompactListList (CompactListList< T > &list, bool reuse)
 Copy/move construct as specified. More...
 
 CompactListList (const label mRows, const label nVals)
 Construct from number of rows and number of values. More...
 
 CompactListList (const label mRows, const label nVals, const Foam::zero)
 Construct from number of rows, number of values initializing all elements to zero. More...
 
 CompactListList (const label mRows, const label nVals, const T &)
 Construct from number of rows, number of values and uniform value for all elements. More...
 
 CompactListList (const labelUList &listSizes)
 Construct given list of row-sizes. More...
 
 CompactListList (const labelUList &listSizes, const T &val)
 Construct given list of row-sizes and a uniform value. More...
 
 CompactListList (Istream &is)
 Construct from Istream. More...
 
autoPtr< CompactListList< T > > clone () const
 Clone. More...
 
bool empty () const noexcept
 True if the number of rows/sublists is zero. More...
 
bool single () const noexcept
 True if content is a single row/sublist only. Such content could be flattened out into a straight list (for example). More...
 
label length () const noexcept
 The primary size (the number of rows/sublists) More...
 
label size () const noexcept
 The primary size (the number of rows/sublists) More...
 
label totalSize () const noexcept
 The total addressed size, which corresponds to the end (back) offset and also the sum of all localSizes. More...
 
const labelListoffsets () const noexcept
 Return the offset table (= size()+1) More...
 
labelListoffsets () noexcept
 Return non-const access to the offset table. More...
 
const List< T > & values () const noexcept
 Return the packed values. More...
 
List< T > & values () noexcept
 Return non-const access to the packed values. More...
 
const Tcdata () const noexcept
 Return const pointer to the first data in values() More...
 
Tdata () noexcept
 Return pointer to the first data in values() More...
 
const char * cdata_bytes () const noexcept
 Return const pointer to underlying values storage, reinterpreted as byte data. More...
 
char * data_bytes () noexcept
 Return pointer to underlying values storage, reinterpreted as byte data. More...
 
std::streamsize size_bytes () const noexcept
 Number of contiguous bytes for the values data, no runtime check that the type is actually contiguous. More...
 
std::streamsize byteSize () const
 Number of contiguous bytes for the values data, runtime FatalError if type is not contiguous. More...
 
labelList sizes () const
 The local row sizes. Same as localSizes. More...
 
const labelUList localStarts () const
 The local row starts. More...
 
labelList localSizes () const
 The local row sizes. More...
 
label localStart (const label i) const
 Starting offset for given row. More...
 
label localEnd (const label i) const
 End offset (exclusive) for given row. More...
 
label localSize (const label i) const
 Size of given row. More...
 
List< labelRangeranges () const
 Return start/size ranges for all sub-lists. More...
 
labelRange range (const label i) const
 Return start/size range for given sub-list. More...
 
label maxSize () const
 The max row length used. More...
 
void clear ()
 Clear addressing and contents. More...
 
void resize (const label mRows)
 Reset size of CompactListList. More...
 
void resize (const label mRows, const label nVals)
 Redimension CompactListList. More...
 
void resize_nocopy (const label mRows, const label nVals)
 Redimension without preserving existing content. More...
 
void resize (const label mRows, const label nVals, const T &)
 Redimension CompactListList and fill new elements with value. More...
 
void resize (const labelUList &listSizes)
 Reset dimensions of CompactListList. More...
 
void resize_nocopy (const labelUList &listSizes)
 Reset dimensions of CompactListList without preserving existing content. More...
 
void setLocalSize (const label rowi, const label len)
 Alter local addressing size for given row, does not change content. More...
 
void swap (CompactListList< T > &other)
 Swap contents. More...
 
void transfer (CompactListList< T > &list)
 Transfer contents into this and annul the argument. More...
 
label toGlobal (const label rowi, const label i) const
 From local index on rowi to global (flat) indexing into packed values. More...
 
label toLocal (const label rowi, const label i) const
 From global to local index on rowi. More...
 
label findRow (const label i) const
 Find row where global index comes from. Binary search. More...
 
label whichRow (const label i) const
 Which row does global index come from? Binary search. More...
 
template<class SubListType , class OutputIter >
OutputIter copy_unpack (OutputIter d_iter, const label pos=0, label len=-1) const
 Unpack sub-list copies in the range defined by pos and len with bounding behaviour like List::slice() by copy constructing begin at the destination iterator d_iter. More...
 
template<class SubListType , class OutputIter >
OutputIter copy_unpack (OutputIter d_iter, const labelRange &range) const
 Unpack sub-list copies in the specified range. More...
 
template<class SubListType , class OutputIter >
OutputIter copy_unpack (OutputIter d_iter, const labelUList &indices) const
 Unpack sub-list copies for the specified indices. More...
 
template<class SubListType = List<T>>
List< SubListType > unpack () const
 Return non-compact list of lists. More...
 
template<class SubListType = List<T>>
List< SubListType > unpack (const labelRange &range) const
 Return non-compact list of lists for the range of sub-lists. More...
 
template<class SubListType = List<T>>
List< SubListType > unpack (const labelUList &indices) const
 Return non-compact list of lists for specified indices. More...
 
void operator= (const CompactListList< T > &list)
 Copy assignment. More...
 
void operator= (CompactListList< T > &&list)
 Move assignment. More...
 
void operator= (const T &val)
 Assignment of all entries to the given value. More...
 
void operator= (const Foam::zero)
 Assignment of all entries to zero. More...
 
UList< TlocalList (const label i)
 Return non-const access to sub-list (no subscript checking) More...
 
const UList< TlocalList (const label i) const
 Return const access to sub-list (no subscript checking) More...
 
UList< Toperator[] (const label i)
 Return row as UList - same as localList method. More...
 
const UList< Toperator[] (const label i) const
 Return row as const UList - same as localList method. More...
 
Toperator() (const label i, const label j)
 Return subscript-checked element. More...
 
const Toperator() (const label i, const label j) const
 Return const subscript-checked element. More...
 
IstreamreadList (Istream &is)
 Read CompactListList as offsets/values pair from Istream, discards current list contents. More...
 
OstreamwriteList (Ostream &os, const label shortLen=0) const
 Write CompactListList as offsets/values pair. More...
 
OstreamwriteMatrix (Ostream &os, const label shortLen=0) const
 Write CompactListList as a formatted matrix of values (ASCII) More...
 
const List< T > & m () const noexcept
 Const access to the packed values. More...
 
List< T > & m () noexcept
 Non-const access to the packed values. More...
 
label index (const label rowi, const label colj) const
 Return flat index into packed values. More...
 
label whichColumn (const label rowi, const label i) const
 Get column within specified row that corresponds to global index. More...
 
void setSize (const label mRows)
 Redimension - same as resize() More...
 
void setSize (const label mRows, const label nVals)
 Redimension - same as resize() More...
 
void setSize (const label mRows, const label nVals, const T &val)
 Redimension - same as resize() More...
 
void setSize (const labelUList &listSizes)
 Reset sizes - same as resize() More...
 
template<class ListListType >
Foam::CompactListList< Tpack_impl (const ListListType &lists, const bool checkOverflow)
 
template<class SubListType >
Foam::CompactListList< Tpack (const UList< SubListType > &lists, const bool checkOverflow)
 
template<class SubListType , class Addr >
Foam::CompactListList< Tpack (const IndirectListBase< SubListType, Addr > &lists, const bool checkOverflow)
 
template<class SubListType >
Foam::List< SubListType > unpack () const
 
template<class SubListType >
Foam::List< SubListType > unpack (const labelRange &range) const
 
template<class SubListType >
Foam::List< SubListType > unpack (const labelUList &indices) const
 

Static Public Member Functions

static const CompactListList< T > & null ()
 Return a CompactListList reference to a nullObject. More...
 
template<class SubListType = List<T>>
static CompactListList< Tpack (const UList< SubListType > &lists, const bool checkOverflow=false)
 Construct by packing together the list of lists. More...
 
template<class SubListType , class Addr >
static CompactListList< Tpack (const IndirectListBase< SubListType, Addr > &lists, const bool checkOverflow=false)
 Construct by packing together an indirect list of lists. More...
 

Friends

Istreamoperator>> (Istream &, CompactListList< T > &)
 Read CompactListList offsets/values pair from Istream, discarding existing contents. More...
 
Ostreamoperator (Ostream &, const CompactListList< T > &)
 Write CompactListList as offsets/values pair. More...
 

Detailed Description

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

A packed storage of objects of type <T> using an offset table for access.

The offset table is the size of the number of rows+1 whose elements are the accumulated sizes of the rows, i.e.

  • offset[i] gives the index of first element of row i
  • offset[i+1] - offset[i] is the number of elements in row i

Note that an empty CompactListList should have empty offsets (not size 1).

Source files

Definition at line 89 of file polyTopoChange.H.

Member Typedef Documentation

◆ value_type

typedef T value_type

The value type the list contains.

Definition at line 132 of file CompactListList.H.

◆ pointer

typedef T* pointer

The pointer type for non-const access to value_type items.

Definition at line 137 of file CompactListList.H.

◆ const_pointer

typedef const T* const_pointer

The pointer type for const access to value_type items.

Definition at line 142 of file CompactListList.H.

◆ reference

typedef T& reference

The type used for storing into value_type objects.

Definition at line 147 of file CompactListList.H.

◆ const_reference

typedef const T& const_reference

The type used for reading from constant value_type objects.

Definition at line 152 of file CompactListList.H.

◆ size_type

typedef label size_type

The type to represent the size of a CompactListList.

Definition at line 157 of file CompactListList.H.

Constructor & Destructor Documentation

◆ CompactListList() [1/10]

CompactListList ( )
defaultnoexcept

Default construct.

◆ CompactListList() [2/10]

CompactListList ( const CompactListList< T > &  list)
inline

Copy construct.

Definition at line 54 of file CompactListListI.H.

◆ CompactListList() [3/10]

CompactListList ( CompactListList< T > &&  list)
inline

Move construct.

Definition at line 65 of file CompactListListI.H.

◆ CompactListList() [4/10]

CompactListList ( CompactListList< T > &  list,
bool  reuse 
)
inline

Copy/move construct as specified.

Definition at line 76 of file CompactListListI.H.

◆ CompactListList() [5/10]

CompactListList ( const label  mRows,
const label  nVals 
)
inline

Construct from number of rows and number of values.

Definition at line 89 of file CompactListListI.H.

◆ CompactListList() [6/10]

CompactListList ( const label  mRows,
const label  nVals,
const Foam::zero   
)
inline

Construct from number of rows, number of values initializing all elements to zero.

Definition at line 103 of file CompactListListI.H.

◆ CompactListList() [7/10]

CompactListList ( const label  mRows,
const label  nVals,
const T val 
)
inline

Construct from number of rows, number of values and uniform value for all elements.

Definition at line 118 of file CompactListListI.H.

◆ CompactListList() [8/10]

CompactListList ( const labelUList listSizes)
explicit

Construct given list of row-sizes.

Definition at line 193 of file CompactListList.C.

◆ CompactListList() [9/10]

CompactListList ( const labelUList listSizes,
const T val 
)

Construct given list of row-sizes and a uniform value.

Definition at line 206 of file CompactListList.C.

◆ CompactListList() [10/10]

CompactListList ( Istream is)
explicit

Construct from Istream.

Definition at line 27 of file CompactListListIO.C.

Member Function Documentation

◆ null()

const Foam::CompactListList< T > & null ( )
inlinestatic

Return a CompactListList reference to a nullObject.

Definition at line 28 of file CompactListListI.H.

◆ pack() [1/4]

static CompactListList<T> pack ( const UList< SubListType > &  lists,
const bool  checkOverflow = false 
)
static

Construct by packing together the list of lists.

◆ pack() [2/4]

static CompactListList<T> pack ( const IndirectListBase< SubListType, Addr > &  lists,
const bool  checkOverflow = false 
)
static

Construct by packing together an indirect list of lists.

◆ clone()

Foam::autoPtr< Foam::CompactListList< T > > clone ( ) const
inline

Clone.

Definition at line 133 of file CompactListListI.H.

References Foam::New().

Here is the call graph for this function:

◆ empty()

bool empty ( ) const
inlinenoexcept

True if the number of rows/sublists is zero.

Definition at line 177 of file CompactListListI.H.

Referenced by globalMeshData::calcCellCells().

Here is the caller graph for this function:

◆ single()

bool single ( ) const
inlinenoexcept

True if content is a single row/sublist only. Such content could be flattened out into a straight list (for example).

Definition at line 187 of file CompactListListI.H.

◆ length()

Foam::label length ( ) const
inlinenoexcept

The primary size (the number of rows/sublists)

Definition at line 194 of file CompactListListI.H.

Referenced by CompactListList< T >::writeMatrix().

Here is the caller graph for this function:

◆ size()

Foam::label size ( ) const
inlinenoexcept

The primary size (the number of rows/sublists)

Definition at line 202 of file CompactListListI.H.

Referenced by globalMeshData::calcCellCells(), noDecomp::decompose(), randomDecomp::decompose(), ptscotchDecomp::decompose(), metisLikeDecomp::decompose(), and SloanRenumber::renumber().

Here is the caller graph for this function:

◆ totalSize()

Foam::label totalSize ( ) const
inlinenoexcept

The total addressed size, which corresponds to the end (back) offset and also the sum of all localSizes.

Definition at line 217 of file CompactListListI.H.

◆ offsets() [1/2]

◆ offsets() [2/2]

labelList& offsets ( )
inlinenoexcept

Return non-const access to the offset table.

Definition at line 291 of file CompactListList.H.

◆ values() [1/2]

◆ values() [2/2]

List<T>& values ( )
inlinenoexcept

Return non-const access to the packed values.

Definition at line 301 of file CompactListList.H.

◆ cdata()

const T * cdata ( ) const
inlinenoexcept

Return const pointer to the first data in values()

Definition at line 142 of file CompactListListI.H.

◆ data()

T * data ( )
inlinenoexcept

Return pointer to the first data in values()

Definition at line 149 of file CompactListListI.H.

◆ cdata_bytes()

const char * cdata_bytes ( ) const
inlinenoexcept

Return const pointer to underlying values storage, reinterpreted as byte data.

Note
Only meaningful for contiguous data

Definition at line 156 of file CompactListListI.H.

◆ data_bytes()

char * data_bytes ( )
inlinenoexcept

Return pointer to underlying values storage, reinterpreted as byte data.

Note
Only meaningful for contiguous data

Definition at line 163 of file CompactListListI.H.

◆ size_bytes()

std::streamsize size_bytes ( ) const
inlinenoexcept

Number of contiguous bytes for the values data, no runtime check that the type is actually contiguous.

Note
Only meaningful for contiguous data

Definition at line 170 of file CompactListListI.H.

◆ byteSize()

std::streamsize byteSize ( ) const

Number of contiguous bytes for the values data, runtime FatalError if type is not contiguous.

Definition at line 248 of file CompactListList.C.

References Foam::abort(), Foam::FatalError, and FatalErrorInFunction.

Here is the call graph for this function:

◆ sizes()

Foam::labelList sizes ( ) const
inline

The local row sizes. Same as localSizes.

Definition at line 210 of file CompactListListI.H.

◆ localStarts()

const Foam::labelUList localStarts ( ) const
inline

The local row starts.

Definition at line 232 of file CompactListListI.H.

◆ localSizes()

Foam::labelList localSizes ( ) const

The local row sizes.

Definition at line 335 of file CompactListList.C.

References Foam::HashTableOps::values().

Referenced by GAMGAgglomeration::procAgglomerateLduAddressing().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ localStart()

Foam::label localStart ( const label  i) const
inline

Starting offset for given row.

Definition at line 243 of file CompactListListI.H.

◆ localEnd()

Foam::label localEnd ( const label  i) const
inline

End offset (exclusive) for given row.

Definition at line 250 of file CompactListListI.H.

◆ localSize()

Foam::label localSize ( const label  i) const
inline

Size of given row.

Definition at line 257 of file CompactListListI.H.

◆ ranges()

Foam::List< Foam::labelRange > ranges ( ) const

Return start/size ranges for all sub-lists.

Definition at line 269 of file CompactListList.C.

References Foam::HashTableOps::values().

Here is the call graph for this function:

◆ range()

Foam::labelRange range ( const label  i) const

Return start/size range for given sub-list.

Definition at line 261 of file CompactListList.C.

◆ maxSize()

Foam::label maxSize ( ) const
inline

The max row length used.

Definition at line 224 of file CompactListListI.H.

◆ clear()

void clear ( )
inline

Clear addressing and contents.

Definition at line 336 of file CompactListListI.H.

◆ resize() [1/4]

void resize ( const label  mRows)
inline

Reset size of CompactListList.

Note
this form only allows truncation of the CompactListList.

Definition at line 344 of file CompactListListI.H.

Referenced by CompactListList< T >::setSize().

Here is the caller graph for this function:

◆ resize() [2/4]

void resize ( const label  mRows,
const label  nVals 
)
inline

Redimension CompactListList.

Definition at line 370 of file CompactListListI.H.

References Foam::Zero.

◆ resize_nocopy() [1/2]

void resize_nocopy ( const label  mRows,
const label  nVals 
)
inline

Redimension without preserving existing content.

Definition at line 391 of file CompactListListI.H.

References Foam::Zero.

Referenced by globalMeshData::calcCellCells().

Here is the caller graph for this function:

◆ resize() [3/4]

void resize ( const label  mRows,
const label  nVals,
const T val 
)
inline

Redimension CompactListList and fill new elements with value.

Definition at line 412 of file CompactListListI.H.

References Foam::Zero.

◆ resize() [4/4]

void resize ( const labelUList listSizes)

Reset dimensions of CompactListList.

Definition at line 292 of file CompactListList.C.

◆ resize_nocopy() [2/2]

void resize_nocopy ( const labelUList listSizes)

Reset dimensions of CompactListList without preserving existing content.

Definition at line 304 of file CompactListList.C.

◆ setLocalSize()

void setLocalSize ( const label  rowi,
const label  len 
)

Alter local addressing size for given row, does not change content.

Definition at line 316 of file CompactListList.C.

References delta.

◆ swap()

void swap ( CompactListList< T > &  other)

Swap contents.

Definition at line 359 of file CompactListList.C.

◆ transfer()

void transfer ( CompactListList< T > &  list)

Transfer contents into this and annul the argument.

Definition at line 375 of file CompactListList.C.

Referenced by CompactListList< T >::operator=().

Here is the caller graph for this function:

◆ toGlobal()

Foam::label toGlobal ( const label  rowi,
const label  i 
) const
inline

From local index on rowi to global (flat) indexing into packed values.

Definition at line 281 of file CompactListListI.H.

Referenced by CompactListList< T >::index().

Here is the caller graph for this function:

◆ toLocal()

Foam::label toLocal ( const label  rowi,
const label  i 
) const
inline

From global to local index on rowi.

Definition at line 292 of file CompactListListI.H.

References Foam::abort(), Foam::FatalError, FatalErrorInFunction, and Foam::nl.

Referenced by CompactListList< T >::whichColumn().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ findRow()

Foam::label findRow ( const label  i) const
inline

Find row where global index comes from. Binary search.

Returns
-1 if out-of-bounds

Definition at line 312 of file CompactListListI.H.

References Foam::findLower().

Here is the call graph for this function:

◆ whichRow()

Foam::label whichRow ( const label  i) const
inline

Which row does global index come from? Binary search.

FatalError if out-of-bounds

Definition at line 319 of file CompactListListI.H.

References Foam::abort(), Foam::FatalError, FatalErrorInFunction, and Foam::nl.

Here is the call graph for this function:

◆ copy_unpack() [1/3]

OutputIter copy_unpack ( OutputIter  d_iter,
const label  pos = 0,
label  len = -1 
) const

Unpack sub-list copies in the range defined by pos and len with bounding behaviour like List::slice() by copy constructing begin at the destination iterator d_iter.

Returns
Output iterator to the element in the destination range, one past the last element copied.
Parameters
[out]d_iterThe output destination
posThe start of sub-region to copy (no-op if -ve or out-of-range)
lenThe length of sub-region to copy (-ve = until the end)

Definition at line 392 of file CompactListList.C.

References Foam::pos().

Here is the call graph for this function:

◆ copy_unpack() [2/3]

OutputIter copy_unpack ( OutputIter  d_iter,
const labelRange range 
) const

Unpack sub-list copies in the specified range.

Returns
Output iterator to the element in the destination range, one past the last element copied.
Parameters
[out]d_iterThe output destination
rangeThe sub-region to copy

Definition at line 423 of file CompactListList.C.

References range.

◆ copy_unpack() [3/3]

OutputIter copy_unpack ( OutputIter  d_iter,
const labelUList indices 
) const

Unpack sub-list copies for the specified indices.

Returns
Output iterator to the element in the destination range, one past the last element copied.
Parameters
[out]d_iterThe output destination
indicesThe sub-regions to copy

Definition at line 435 of file CompactListList.C.

◆ unpack() [1/6]

List<SubListType> unpack ( ) const

Return non-compact list of lists.

Referenced by multiLevelDecomp::decompose(), and renumberMethod::renumber().

Here is the caller graph for this function:

◆ unpack() [2/6]

List<SubListType> unpack ( const labelRange range) const

Return non-compact list of lists for the range of sub-lists.

◆ unpack() [3/6]

List<SubListType> unpack ( const labelUList indices) const

Return non-compact list of lists for specified indices.

◆ operator=() [1/4]

void operator= ( const CompactListList< T > &  list)
inline

Copy assignment.

Definition at line 436 of file CompactListListI.H.

◆ operator=() [2/4]

void operator= ( CompactListList< T > &&  list)
inline

Move assignment.

Definition at line 452 of file CompactListListI.H.

References CompactListList< T >::transfer().

Here is the call graph for this function:

◆ operator=() [3/4]

void operator= ( const T val)
inline

Assignment of all entries to the given value.

Definition at line 467 of file CompactListListI.H.

◆ operator=() [4/4]

void operator= ( const Foam::zero  )
inline

Assignment of all entries to zero.

Definition at line 474 of file CompactListListI.H.

◆ localList() [1/2]

Foam::UList< T > localList ( const label  i)
inline

Return non-const access to sub-list (no subscript checking)

Definition at line 265 of file CompactListListI.H.

Referenced by CompactListList< T >::writeMatrix().

Here is the caller graph for this function:

◆ localList() [2/2]

const Foam::UList< T > localList ( const label  i) const
inline

Return const access to sub-list (no subscript checking)

Definition at line 273 of file CompactListListI.H.

◆ operator[]() [1/2]

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

Return row as UList - same as localList method.

Definition at line 482 of file CompactListListI.H.

◆ operator[]() [2/2]

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

Return row as const UList - same as localList method.

Definition at line 490 of file CompactListListI.H.

◆ operator()() [1/2]

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

Return subscript-checked element.

Definition at line 498 of file CompactListListI.H.

◆ operator()() [2/2]

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

Return const subscript-checked element.

Definition at line 509 of file CompactListListI.H.

◆ readList()

Foam::Istream & readList ( Istream is)

Read CompactListList as offsets/values pair from Istream, discards current list contents.

Definition at line 39 of file CompactListListIO.C.

◆ writeList()

Foam::Ostream & writeList ( Ostream os,
const label  shortLen = 0 
) const

Write CompactListList as offsets/values pair.

Definition at line 50 of file CompactListListIO.C.

References os().

Here is the call graph for this function:

◆ writeMatrix()

Foam::Ostream & writeMatrix ( Ostream os,
const label  shortLen = 0 
) const

Write CompactListList as a formatted matrix of values (ASCII)

Definition at line 63 of file CompactListListIO.C.

References IOstreamOption::ASCII, token::BEGIN_LIST, token::END_LIST, IOstreamOption::format(), CompactListList< T >::length(), CompactListList< T >::localList(), Foam::nl, and os().

Here is the call graph for this function:

◆ m() [1/2]

const List<T>& m ( ) const
inlinenoexcept

Const access to the packed values.

Definition at line 660 of file CompactListList.H.

◆ m() [2/2]

List<T>& m ( )
inlinenoexcept

Non-const access to the packed values.

Definition at line 666 of file CompactListList.H.

◆ index()

label index ( const label  rowi,
const label  colj 
) const
inline

Return flat index into packed values.

Definition at line 671 of file CompactListList.H.

References CompactListList< T >::toGlobal().

Here is the call graph for this function:

◆ whichColumn()

label whichColumn ( const label  rowi,
const label  i 
) const
inline

Get column within specified row that corresponds to global index.

Definition at line 679 of file CompactListList.H.

References CompactListList< T >::toLocal().

Here is the call graph for this function:

◆ setSize() [1/4]

void setSize ( const label  mRows)
inline

Redimension - same as resize()

Definition at line 687 of file CompactListList.H.

References CompactListList< T >::resize().

Here is the call graph for this function:

◆ setSize() [2/4]

void setSize ( const label  mRows,
const label  nVals 
)
inline

Redimension - same as resize()

Definition at line 695 of file CompactListList.H.

References CompactListList< T >::resize().

Here is the call graph for this function:

◆ setSize() [3/4]

void setSize ( const label  mRows,
const label  nVals,
const T val 
)
inline

Redimension - same as resize()

Definition at line 703 of file CompactListList.H.

References CompactListList< T >::resize().

Here is the call graph for this function:

◆ setSize() [4/4]

void setSize ( const labelUList listSizes)
inline

Reset sizes - same as resize()

Definition at line 711 of file CompactListList.H.

References CompactListList< T >::resize().

Here is the call graph for this function:

◆ pack_impl()

Foam::CompactListList<T> pack_impl ( const ListListType &  lists,
const bool  checkOverflow 
)

Definition at line 62 of file CompactListList.C.

References Foam::BitOps::count(), and Foam::Zero.

Here is the call graph for this function:

◆ pack() [3/4]

Foam::CompactListList<T> pack ( const UList< SubListType > &  lists,
const bool  checkOverflow 
)

Definition at line 122 of file CompactListList.C.

◆ pack() [4/4]

Foam::CompactListList<T> pack ( const IndirectListBase< SubListType, Addr > &  lists,
const bool  checkOverflow 
)

Definition at line 138 of file CompactListList.C.

◆ unpack() [4/6]

Foam::List<SubListType> unpack ( ) const

Definition at line 458 of file CompactListList.C.

References UList< T >::begin().

Here is the call graph for this function:

◆ unpack() [5/6]

Foam::List<SubListType> unpack ( const labelRange range) const

Definition at line 471 of file CompactListList.C.

References IndirectListBase< T, Addr >::begin(), and range.

Here is the call graph for this function:

◆ unpack() [6/6]

Foam::List<SubListType> unpack ( const labelUList indices) const

Definition at line 484 of file CompactListList.C.

References IndirectListBase< T, Addr >::begin(), and UList< T >::size().

Here is the call graph for this function:

Friends And Related Function Documentation

◆ operator>>

Istream& operator>> ( Istream is,
CompactListList< T > &  list 
)
friend

Read CompactListList offsets/values pair from Istream, discarding existing contents.

Definition at line 721 of file CompactListList.H.

◆ operator

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

Write CompactListList as offsets/values pair.


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