AXOM
Axom provides a robust, flexible software infrastructure for the development of multi-physics applications and computational tools.
axom::slam::NullBivariateSet< SetType1, SetType2 > Class Template Referenceabstract

A Null BivariateSet class. Same as the NullSet for Set class. More...

#include </home/docs/checkouts/readthedocs.org/user_builds/axom/checkouts/latest/src/axom/slam/BivariateSet.hpp>

Inheritance diagram for axom::slam::NullBivariateSet< SetType1, SetType2 >:

Public Types

using FirstSetType = SetType1
 
using SecondSetType = SetType2
 
using BSet = BivariateSet< FirstSetType, SecondSetType >
 
using PositionType = typename BSet::PositionType
 
using ElementType = typename BSet::ElementType
 
using SubsetType = typename BSet::SubsetType
 
using RangeSetType = typename BSet::RangeSetType
 
using NullSetType = NullSet< PositionType, ElementType >
 
using IteratorType = BivariateSetIterator< BivariateSet >
 

Public Member Functions

 NullBivariateSet ()=default
 
PositionType findElementIndex (PositionType pos1, PositionType pos2=0) const override
 
AXOM_HOST_DEVICE PositionType findElementFlatIndex (PositionType s1, PositionType s2) const override
 
PositionType findElementFlatIndex (PositionType s1) const override
 
AXOM_HOST_DEVICE PositionType flatToFirstIndex (PositionType) const override
 
AXOM_HOST_DEVICE PositionType flatToSecondIndex (PositionType) const override
 
AXOM_HOST_DEVICE RangeSetType elementRangeSet (PositionType) const override
 
AXOM_HOST_DEVICE ElementType at (PositionType) const override
 
AXOM_HOST_DEVICE PositionType size () const override
 Size of the BivariateSet, which is the number of non-zero entries in the BivariateSet. More...
 
PositionType size (PositionType) const override
 
SubsetType getElements (PositionType) const override
 
virtual PositionType findElementIndex (PositionType pos1, PositionType pos2) const=0
 Searches for the SparseIndex of the element given its DenseIndex. \detail If the element (i,j) is the kth non-zero in the row, then findElementIndex(i,j) returns k. If element (i,j) does not exist (such as the case of a zero in a sparse matrix), then INVALID_POS is returned. More...
 
virtual AXOM_HOST_DEVICE PositionType findElementFlatIndex (PositionType pos1, PositionType pos2) const=0
 Search for the FlatIndex of the element given its DenseIndex. More...
 
virtual PositionType findElementFlatIndex (PositionType pos1) const=0
 Searches for the first existing element given the row index (first set position). More...
 
virtual AXOM_HOST_DEVICE PositionType flatToFirstIndex (PositionType flatIndex) const=0
 Given the flat index, return the associated from-set index in the relation pair. More...
 
virtual AXOM_HOST_DEVICE PositionType flatToSecondIndex (PositionType flatIndex) const=0
 Given the flat index, return the associated to-set index in the relation pair. More...
 
virtual AXOM_HOST_DEVICE RangeSetType elementRangeSet (PositionType pos1) const=0
 Finds the range of indices of valid elements in the second set, given the index of an element in the first set. More...
 
virtual PositionType size (PositionType pos1) const=0
 Number of elements of the BivariateSet whose first index is pos. More...
 
AXOM_HOST_DEVICE PositionType firstSetSize () const
 Size of the first set.
More...
 
AXOM_HOST_DEVICE PositionType secondSetSize () const
 Size of the second set.
More...
 
const FirstSetTypegetFirstSet () const
 Returns pointer to the first set.
More...
 
const SecondSetTypegetSecondSet () const
 Returns pointer to the second set.
More...
 
virtual AXOM_HOST_DEVICE ElementType at (PositionType pos) const=0
 Returns the element at the given FlatIndex pos. More...
 
virtual SubsetType getElements (PositionType s1) const=0
 A set of elements with the given first set index. More...
 
IteratorType begin () const
 Return an iterator to the first pair of set elements in the relation. More...
 
IteratorType end () const
 Return an iterator to one past the last pair of set elements in the relation. More...
 
virtual bool isValid (bool verboseOutput=false) const
 

Static Public Attributes

static const PositionType INVALID_POS
 
static const NullSetType s_nullSet
 

Protected Attributes

const FirstSetTypem_set1
 
const SecondSetTypem_set2
 

Detailed Description

template<typename SetType1 = slam::Set<>, typename SetType2 = slam::Set<>>
class axom::slam::NullBivariateSet< SetType1, SetType2 >

A Null BivariateSet class. Same as the NullSet for Set class.

Member Typedef Documentation

◆ FirstSetType

template<typename SetType1 = slam::Set<>, typename SetType2 = slam::Set<>>
using axom::slam::NullBivariateSet< SetType1, SetType2 >::FirstSetType = SetType1

◆ SecondSetType

template<typename SetType1 = slam::Set<>, typename SetType2 = slam::Set<>>
using axom::slam::NullBivariateSet< SetType1, SetType2 >::SecondSetType = SetType2

◆ BSet

template<typename SetType1 = slam::Set<>, typename SetType2 = slam::Set<>>
using axom::slam::NullBivariateSet< SetType1, SetType2 >::BSet = BivariateSet<FirstSetType, SecondSetType>

◆ PositionType

template<typename SetType1 = slam::Set<>, typename SetType2 = slam::Set<>>
using axom::slam::NullBivariateSet< SetType1, SetType2 >::PositionType = typename BSet::PositionType

◆ ElementType

template<typename SetType1 = slam::Set<>, typename SetType2 = slam::Set<>>
using axom::slam::NullBivariateSet< SetType1, SetType2 >::ElementType = typename BSet::ElementType

◆ SubsetType

template<typename SetType1 = slam::Set<>, typename SetType2 = slam::Set<>>
using axom::slam::NullBivariateSet< SetType1, SetType2 >::SubsetType = typename BSet::SubsetType

◆ RangeSetType

template<typename SetType1 = slam::Set<>, typename SetType2 = slam::Set<>>
using axom::slam::NullBivariateSet< SetType1, SetType2 >::RangeSetType = typename BSet::RangeSetType

◆ NullSetType

◆ IteratorType

Constructor & Destructor Documentation

◆ NullBivariateSet()

template<typename SetType1 = slam::Set<>, typename SetType2 = slam::Set<>>
axom::slam::NullBivariateSet< SetType1, SetType2 >::NullBivariateSet ( )
default

Member Function Documentation

◆ findElementIndex() [1/2]

template<typename SetType1 = slam::Set<>, typename SetType2 = slam::Set<>>
PositionType axom::slam::NullBivariateSet< SetType1, SetType2 >::findElementIndex ( PositionType  pos1,
PositionType  pos2 = 0 
) const
inlineoverride

◆ findElementFlatIndex() [1/4]

template<typename SetType1 = slam::Set<>, typename SetType2 = slam::Set<>>
AXOM_HOST_DEVICE PositionType axom::slam::NullBivariateSet< SetType1, SetType2 >::findElementFlatIndex ( PositionType  s1,
PositionType  s2 
) const
inlineoverride

◆ findElementFlatIndex() [2/4]

template<typename SetType1 = slam::Set<>, typename SetType2 = slam::Set<>>
PositionType axom::slam::NullBivariateSet< SetType1, SetType2 >::findElementFlatIndex ( PositionType  s1) const
inlineoverride

◆ flatToFirstIndex() [1/2]

template<typename SetType1 = slam::Set<>, typename SetType2 = slam::Set<>>
AXOM_HOST_DEVICE PositionType axom::slam::NullBivariateSet< SetType1, SetType2 >::flatToFirstIndex ( PositionType  ) const
inlineoverride

◆ flatToSecondIndex() [1/2]

template<typename SetType1 = slam::Set<>, typename SetType2 = slam::Set<>>
AXOM_HOST_DEVICE PositionType axom::slam::NullBivariateSet< SetType1, SetType2 >::flatToSecondIndex ( PositionType  ) const
inlineoverride

◆ elementRangeSet() [1/2]

template<typename SetType1 = slam::Set<>, typename SetType2 = slam::Set<>>
AXOM_HOST_DEVICE RangeSetType axom::slam::NullBivariateSet< SetType1, SetType2 >::elementRangeSet ( PositionType  ) const
inlineoverride

◆ at() [1/2]

template<typename SetType1 = slam::Set<>, typename SetType2 = slam::Set<>>
AXOM_HOST_DEVICE ElementType axom::slam::NullBivariateSet< SetType1, SetType2 >::at ( PositionType  ) const
inlineoverride

◆ size() [1/3]

template<typename SetType1 = slam::Set<>, typename SetType2 = slam::Set<>>
AXOM_HOST_DEVICE PositionType axom::slam::NullBivariateSet< SetType1, SetType2 >::size ( ) const
inlineoverridevirtual

Size of the BivariateSet, which is the number of non-zero entries in the BivariateSet.

Implements axom::slam::BivariateSet< slam::Set<>, slam::Set<> >.

◆ size() [2/3]

template<typename SetType1 = slam::Set<>, typename SetType2 = slam::Set<>>
PositionType axom::slam::NullBivariateSet< SetType1, SetType2 >::size ( PositionType  ) const
inlineoverride

◆ getElements() [1/2]

template<typename SetType1 = slam::Set<>, typename SetType2 = slam::Set<>>
SubsetType axom::slam::NullBivariateSet< SetType1, SetType2 >::getElements ( PositionType  ) const
inlineoverride

◆ findElementIndex() [2/2]

virtual PositionType axom::slam::BivariateSet< slam::Set<> , slam::Set<> >::findElementIndex ( PositionType  pos1,
PositionType  pos2 
) const
pure virtualinherited

Searches for the SparseIndex of the element given its DenseIndex. \detail If the element (i,j) is the kth non-zero in the row, then findElementIndex(i,j) returns k. If element (i,j) does not exist (such as the case of a zero in a sparse matrix), then INVALID_POS is returned.

Parameters
pos1The first set position.
pos2The second set position.
Returns
The DenseIndex of the given element, or INVALID_POS if such element is missing from the set.
Precondition
0 <= pos1 <= set1.size() && 0 <= pos2 <= size2.size()

◆ findElementFlatIndex() [3/4]

virtual AXOM_HOST_DEVICE PositionType axom::slam::BivariateSet< slam::Set<> , slam::Set<> >::findElementFlatIndex ( PositionType  pos1,
PositionType  pos2 
) const
pure virtualinherited

Search for the FlatIndex of the element given its DenseIndex.

Parameters
pos1The first set position.
pos2The second set position.
Returns
The element's FlatIndex
Precondition
0 <= pos1 <= set1.size() && 0 <= pos2 <= size2.size()

◆ findElementFlatIndex() [4/4]

virtual PositionType axom::slam::BivariateSet< slam::Set<> , slam::Set<> >::findElementFlatIndex ( PositionType  pos1) const
pure virtualinherited

Searches for the first existing element given the row index (first set position).

Parameters
pos1The first set position.
Returns
The found element's FlatIndex.
Precondition
0 <= pos1 <= set1.size()

◆ flatToFirstIndex() [2/2]

virtual AXOM_HOST_DEVICE PositionType axom::slam::BivariateSet< slam::Set<> , slam::Set<> >::flatToFirstIndex ( PositionType  flatIndex) const
pure virtualinherited

Given the flat index, return the associated from-set index in the relation pair.

Parameters
flatIndexThe FlatIndex of the from-set/to-set pair.
Returns
pos1 The from-set index.

◆ flatToSecondIndex() [2/2]

virtual AXOM_HOST_DEVICE PositionType axom::slam::BivariateSet< slam::Set<> , slam::Set<> >::flatToSecondIndex ( PositionType  flatIndex) const
pure virtualinherited

Given the flat index, return the associated to-set index in the relation pair.

Parameters
flatIndexThe FlatIndex of the from-set/to-set pair.
Returns
pos2 The to-set index.

◆ elementRangeSet() [2/2]

virtual AXOM_HOST_DEVICE RangeSetType axom::slam::BivariateSet< slam::Set<> , slam::Set<> >::elementRangeSet ( PositionType  pos1) const
pure virtualinherited

Finds the range of indices of valid elements in the second set, given the index of an element in the first set.

Parameters
Positionof the element in the first set
Returns
A range set of the positions in the second set

◆ size() [3/3]

virtual PositionType axom::slam::BivariateSet< slam::Set<> , slam::Set<> >::size ( PositionType  pos1) const
pure virtualinherited

Number of elements of the BivariateSet whose first index is pos.

Precondition
0 <= pos1 <= set1.size()

◆ firstSetSize()

AXOM_HOST_DEVICE PositionType axom::slam::BivariateSet< slam::Set<> , slam::Set<> >::firstSetSize ( ) const
inlineinherited

Size of the first set.

◆ secondSetSize()

AXOM_HOST_DEVICE PositionType axom::slam::BivariateSet< slam::Set<> , slam::Set<> >::secondSetSize ( ) const
inlineinherited

Size of the second set.

◆ getFirstSet()

const FirstSetType* axom::slam::BivariateSet< slam::Set<> , slam::Set<> >::getFirstSet ( ) const
inlineinherited

Returns pointer to the first set.

◆ getSecondSet()

const SecondSetType* axom::slam::BivariateSet< slam::Set<> , slam::Set<> >::getSecondSet ( ) const
inlineinherited

Returns pointer to the second set.

◆ at() [2/2]

virtual AXOM_HOST_DEVICE ElementType axom::slam::BivariateSet< slam::Set<> , slam::Set<> >::at ( PositionType  pos) const
pure virtualinherited

Returns the element at the given FlatIndex pos.

◆ getElements() [2/2]

virtual SubsetType axom::slam::BivariateSet< slam::Set<> , slam::Set<> >::getElements ( PositionType  s1) const
pure virtualinherited

A set of elements with the given first set index.

Parameters
s1The first set index.
Returns
An OrderedSet containing the elements
Precondition
0 <= pos1 <= set1.size()

◆ begin()

IteratorType axom::slam::BivariateSet< slam::Set<> , slam::Set<> >::begin ( ) const
inlineinherited

Return an iterator to the first pair of set elements in the relation.

◆ end()

IteratorType axom::slam::BivariateSet< slam::Set<> , slam::Set<> >::end ( ) const
inlineinherited

Return an iterator to one past the last pair of set elements in the relation.

◆ isValid()

bool axom::slam::BivariateSet< slam::Set<> , slam::Set<> >::isValid ( bool  verboseOutput = false) const
virtualinherited

Member Data Documentation

◆ INVALID_POS

const PositionType axom::slam::BivariateSet< slam::Set<> , slam::Set<> >::INVALID_POS
staticinherited

◆ s_nullSet

const BivariateSet< slam::Set<> , slam::Set<> >::NullSetType axom::slam::BivariateSet< slam::Set<> , slam::Set<> >::s_nullSet
staticinherited

◆ m_set1

const FirstSetType* axom::slam::BivariateSet< slam::Set<> , slam::Set<> >::m_set1
protectedinherited

◆ m_set2

const SecondSetType* axom::slam::BivariateSet< slam::Set<> , slam::Set<> >::m_set2
protectedinherited

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