MFEM v4.7.0
Finite element discretization library
Loading...
Searching...
No Matches
mfem::IntegerSet Class Reference

A set of integers. More...

#include <sets.hpp>

Public Member Functions

 IntegerSet ()
 Create an empty set.
 
 IntegerSet (IntegerSet &s)
 Create a copy of set 's'.
 
 IntegerSet (const int n, const int *p)
 Create an integer set from C-array 'p' of 'n' integers.
 
int Size ()
 Return the size of the set.
 
 operator Array< int > & ()
 Return a reference to the sorted array of all the set entries.
 
int PickElement ()
 Return the value of the lowest element of the set.
 
int PickRandomElement ()
 Return the value of a random element of the set.
 
IntegerSetoperator= (const IntegerSet &s)
 Create a copy of set 's'.
 
int operator== (IntegerSet &s)
 Return 1 if the sets are equal and 0 otherwise.
 
void Recreate (const int n, const int *p)
 Create an integer set from C-array 'p' of 'n' integers. Overwrites any existing set data.
 

Detailed Description

A set of integers.

Definition at line 23 of file sets.hpp.

Constructor & Destructor Documentation

◆ IntegerSet() [1/3]

mfem::IntegerSet::IntegerSet ( )
inline

Create an empty set.

Definition at line 30 of file sets.hpp.

◆ IntegerSet() [2/3]

mfem::IntegerSet::IntegerSet ( IntegerSet & s)

Create a copy of set 's'.

Definition at line 18 of file sets.cpp.

◆ IntegerSet() [3/3]

mfem::IntegerSet::IntegerSet ( const int n,
const int * p )
inline

Create an integer set from C-array 'p' of 'n' integers.

Definition at line 36 of file sets.hpp.

Member Function Documentation

◆ operator Array< int > &()

mfem::IntegerSet::operator Array< int > & ( )
inline

Return a reference to the sorted array of all the set entries.

Definition at line 42 of file sets.hpp.

◆ operator=()

IntegerSet & mfem::IntegerSet::operator= ( const IntegerSet & s)

Create a copy of set 's'.

Definition at line 27 of file sets.cpp.

◆ operator==()

int mfem::IntegerSet::operator== ( IntegerSet & s)

Return 1 if the sets are equal and 0 otherwise.

Definition at line 37 of file sets.cpp.

◆ PickElement()

int mfem::IntegerSet::PickElement ( )
inline

Return the value of the lowest element of the set.

Definition at line 45 of file sets.hpp.

◆ PickRandomElement()

int mfem::IntegerSet::PickRandomElement ( )

Return the value of a random element of the set.

Definition at line 53 of file sets.cpp.

◆ Recreate()

void mfem::IntegerSet::Recreate ( const int n,
const int * p )

Create an integer set from C-array 'p' of 'n' integers. Overwrites any existing set data.

Definition at line 68 of file sets.cpp.

◆ Size()

int mfem::IntegerSet::Size ( )
inline

Return the size of the set.

Definition at line 39 of file sets.hpp.


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