Public Member Functions | Static Public Member Functions
Pair Class Reference

An ordered pair of two objects of type <T> with first() and second() elements. More...

Inheritance diagram for Pair:
Inheritance graph
[legend]

Public Member Functions

 Pair ()
 Null constructor. More...
 
 Pair (const Type &f, const Type &s)
 Construct from components. More...
 
 Pair (const FixedList< Type, 2 > &fl)
 Construct from FixedList. More...
 
 Pair (Istream &is)
 Construct from Istream. More...
 
const Type & first () const
 Return first. More...
 
Type & first ()
 Return first. More...
 
const Type & second () const
 Return second. More...
 
Type & second ()
 Return second. More...
 
const Type & other (const Type &a) const
 Return other. More...
 

Static Public Member Functions

static int compare (const Pair< Type > &a, const Pair< Type > &b)
 Compare Pairs. More...
 

Detailed Description

An ordered pair of two objects of type <T> with first() and second() elements.

See also
Foam::Tuple2 for storing two objects of dissimilar types.

Definition at line 49 of file contiguous.H.

Constructor & Destructor Documentation

◆ Pair() [1/4]

Pair ( )
inline

Null constructor.

Definition at line 61 of file Pair.H.

◆ Pair() [2/4]

Pair ( const Type &  f,
const Type &  s 
)
inline

Construct from components.

Definition at line 65 of file Pair.H.

◆ Pair() [3/4]

Pair ( const FixedList< Type, 2 > &  fl)
inline

Construct from FixedList.

Definition at line 72 of file Pair.H.

◆ Pair() [4/4]

Pair ( Istream is)
inline

Construct from Istream.

Definition at line 78 of file Pair.H.

Member Function Documentation

◆ first() [1/2]

const Type& first ( ) const
inline

Return first.

Definition at line 87 of file Pair.H.

Referenced by globalIndexAndTransform::addToTransformIndex(), meshRefinement::allocateInterRegionFaceZone(), preserveBafflesConstraint::apply(), meshRefinement::balance(), blockMesh::calcMergeInfoFast(), featureEdgesNeiOp::calculateNumberOfEdgesAtPoint(), edgeExtractor::calculateValence(), edgeExtractor::checkCorners(), triSurfaceClassifyEdges::checkOrientation(), meshBndLayerNeighbourOperator::collectGroups(), featureEdgesNeiOp::collectGroups(), extrudeLayer::createDuplicateFrontFaces(), decompositionMethod::decompose(), triSurfaceDetectFeatureEdges::detectFeatureEdgesAngleCriterion(), autoRefineDriver::doRefine(), Foam::faceNij(), polyMeshFilter::filterFaces(), boundaryLayers::findPatchesToBeTreatedTogether(), meshRefinement::freeStandingBaffles(), refineBoundaryLayers::generateNewVertices(), Foam::help::groupMarking(), globalIndexAndTransform::index(), linearInterpolationWeights::integrationWeights(), main(), Distribution::normalised(), multiphaseMixtureThermo::interfacePair::hash::operator()(), multiphaseMixture::interfacePair::hash::operator()(), multiphaseSystem::interfacePair::symmHash::operator()(), multiphaseSystem::interfacePair::hash::operator()(), labelledPair::operator<(), labelledPair::operator==(), Pair< word >::other(), Pair< word >::Pair(), edgeExtractor::projectDeterminedFeatureVertices(), Distribution::raw(), refineBoundaryLayers::refineFace(), slidingInterface::renumberAttachedAddressing(), meshRefinement::splitFacesUndo(), globalIndexAndTransform::transformIndicesForPatches(), Distribution::validLimits(), and meshRefinement::zonify().

Here is the caller graph for this function:

◆ first() [2/2]

Type& first ( )
inline

Return first.

Definition at line 93 of file Pair.H.

◆ second() [1/2]

const Type& second ( ) const
inline

Return second.

Definition at line 99 of file Pair.H.

Referenced by globalIndexAndTransform::addToTransformIndex(), meshRefinement::allocateInterRegionFaceZone(), preserveBafflesConstraint::apply(), meshRefinement::balance(), blockMesh::calcMergeInfoFast(), featureEdgesNeiOp::calculateNumberOfEdgesAtPoint(), edgeExtractor::calculateValence(), edgeExtractor::checkCorners(), triSurfaceClassifyEdges::checkOrientation(), meshBndLayerNeighbourOperator::collectGroups(), featureEdgesNeiOp::collectGroups(), extrudeLayer::createDuplicateFrontFaces(), decompositionMethod::decompose(), triSurfaceDetectFeatureEdges::detectFeatureEdgesAngleCriterion(), autoRefineDriver::doRefine(), Foam::faceNij(), polyMeshFilter::filterFaces(), boundaryLayers::findPatchesToBeTreatedTogether(), meshRefinement::freeStandingBaffles(), refineBoundaryLayers::generateNewVertices(), Foam::help::groupMarking(), linearInterpolationWeights::integrationWeights(), main(), Distribution::normalised(), multiphaseMixtureThermo::interfacePair::hash::operator()(), multiphaseMixture::interfacePair::hash::operator()(), multiphaseSystem::interfacePair::symmHash::operator()(), multiphaseSystem::interfacePair::hash::operator()(), labelledPair::operator<(), labelledPair::operator==(), Pair< word >::other(), Pair< word >::Pair(), globalIndexAndTransform::processor(), edgeExtractor::projectDeterminedFeatureVertices(), Distribution::raw(), refineBoundaryLayers::refineFace(), slidingInterface::renumberAttachedAddressing(), meshRefinement::splitFacesUndo(), globalIndexAndTransform::transformIndex(), globalIndexAndTransform::transformIndicesForPatches(), Distribution::validLimits(), and meshRefinement::zonify().

Here is the caller graph for this function:

◆ second() [2/2]

Type& second ( )
inline

Return second.

Definition at line 105 of file Pair.H.

◆ other()

const Type& other ( const Type &  a) const
inline

Return other.

Definition at line 111 of file Pair.H.

◆ compare()

static int compare ( const Pair< Type > &  a,
const Pair< Type > &  b 
)
inlinestatic

Compare Pairs.

Returning:

  • 0: different
  • +1: identical
  • -1: same pair, but reversed order

Definition at line 141 of file Pair.H.

Referenced by preserveBafflesConstraint::add(), and globalMeshData::calcGlobalEdgeOrientation().

Here is the caller graph for this function:

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