MFEM  v4.4.0
Finite element discretization library
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Pages
Public Member Functions | List of all members
mfem::IntegerSet Class Reference

A set of integers. More...

#include <sets.hpp>

Public Member Functions

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

Detailed Description

A set of integers.

Definition at line 23 of file sets.hpp.

Constructor & Destructor Documentation

mfem::IntegerSet::IntegerSet ( )
inline

Create an empty set.

Definition at line 30 of file sets.hpp.

mfem::IntegerSet::IntegerSet ( IntegerSet s)

Create a copy of set 's'.

Definition at line 18 of file sets.cpp.

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

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.

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

Create a copy of set 's'.

Definition at line 27 of file sets.cpp.

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

Return 1 if the sets are equal and 0 otherwise.

Definition at line 37 of file sets.cpp.

int mfem::IntegerSet::PickElement ( )
inline

Return the value of the lowest element of the set.

Definition at line 45 of file sets.hpp.

int mfem::IntegerSet::PickRandomElement ( )

Return the value of a random element of the set.

Definition at line 53 of file sets.cpp.

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.

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: