Public Member Functions | Private Member Functions | Private Attributes | Friends
graphRow< graphType > Class Template Reference

Public Member Functions

 graphRow (graphType &, const label)
 Construct from graph and row number. More...
 
 graphRow (const graphRow< graphType > &)
 Copy contructor. More...
 
 ~graphRow ()
 
label size () const
 Returns the number of rows. More...
 
void setSize (const label size)
 Reset the number of rows. More...
 
void clear ()
 Clear the graph. More...
 
void append (const label)
 Append an element to the given row. More...
 
void appendIfNotIn (const label)
 Append an element to the given row if it does not exist there. More...
 
bool contains (const label e) const
 check if the element is in the given row (takes linear time) More...
 
label containsAtPosition (const label e) const
 
label operator[] (const label) const
 set and get operators More...
 
labeloperator[] (const label)
 
void operator= (const graphRow< graphType > &)
 Assignment operator. More...
 
template<class listType >
void operator= (const listType &)
 

Private Member Functions

void checkIndex (const label i) const
 check index More...
 

Private Attributes

graphType & data_
 reference to the graph More...
 
const label rowI_
 row number More...
 

Friends

Ostreamoperator (Ostream &, const graphRow< graphType > &)
 

Detailed Description

template<class graphType>
class Foam::graphRow< graphType >

Definition at line 48 of file graphRow.H.

Constructor & Destructor Documentation

◆ graphRow() [1/2]

graphRow ( graphType &  g,
const label  i 
)
inline

Construct from graph and row number.

Definition at line 47 of file graphRowI.H.

◆ graphRow() [2/2]

graphRow ( const graphRow< graphType > &  ol)
inline

Copy contructor.

Definition at line 56 of file graphRowI.H.

◆ ~graphRow()

~graphRow
inline

Definition at line 66 of file graphRowI.H.

Member Function Documentation

◆ checkIndex()

void checkIndex ( const label  i) const
inlineprivate

check index

Definition at line 30 of file graphRowI.H.

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

Here is the call graph for this function:

◆ size()

Foam::label size
inline

Returns the number of rows.

Definition at line 74 of file graphRowI.H.

◆ setSize()

void setSize ( const label  size)
inline

Reset the number of rows.

Definition at line 80 of file graphRowI.H.

References s().

Here is the call graph for this function:

◆ clear()

void clear
inline

Clear the graph.

Definition at line 86 of file graphRowI.H.

◆ append()

void append ( const label  el)
inline

Append an element to the given row.

Definition at line 92 of file graphRowI.H.

◆ appendIfNotIn()

void appendIfNotIn ( const label  el)
inline

Append an element to the given row if it does not exist there.

Definition at line 98 of file graphRowI.H.

◆ contains()

bool contains ( const label  e) const
inline

check if the element is in the given row (takes linear time)

Definition at line 104 of file graphRowI.H.

References Foam::e.

Referenced by voronoiMeshExtractor::createAddressing().

Here is the caller graph for this function:

◆ containsAtPosition()

Foam::label containsAtPosition ( const label  e) const
inline

Definition at line 111 of file graphRowI.H.

References Foam::e.

◆ operator[]() [1/2]

Foam::label operator[] ( const label  i) const
inline

set and get operators

Definition at line 121 of file graphRowI.H.

◆ operator[]() [2/2]

Foam::label & operator[] ( const label  i)
inline

Definition at line 127 of file graphRowI.H.

◆ operator=() [1/2]

void operator= ( const graphRow< graphType > &  l)
inline

Assignment operator.

Definition at line 134 of file graphRowI.H.

◆ operator=() [2/2]

void operator= ( const listType &  l)
inline

Definition at line 145 of file graphRowI.H.

Friends And Related Function Documentation

◆ operator

Ostream& operator ( Ostream ,
const graphRow< graphType > &   
)
friend

Field Documentation

◆ data_

graphType& data_
private

reference to the graph

Definition at line 61 of file graphRow.H.

◆ rowI_

const label rowI_
private

row number

Definition at line 64 of file graphRow.H.


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