21 for (
int i = 0; i < me.
Size(); i++)
30 for (
int i = 0; i < me.
Size(); i++)
39 if (me.
Size() !=
s.me.Size())
44 for (
int i = 0; i < me.
Size(); i++)
55 int i, size = me.
Size();
56 unsigned int seed = 0;
58 for (i = 0; i < size; i++)
65 return me[rand()/(RAND_MAX/size)];
74 for (i = 0; i < n; i++)
81 for (j = 0, i = 1; i < n; i++)
93 for (
int i = 0; i < TheList.Size(); i++)
101 return TheList.Size()-1;
106 for (
int i = 0; i < TheList.Size(); i++)
107 if (*TheList[i] ==
s)
112 mfem_error(
"ListOfIntegerSets::Lookup (), integer set not found.");
122 for (i = 0; i <
Size(); i++)
124 t.AddColumnsInRow(i, TheList[i] ->
Size());
129 for (i = 0; i <
Size(); i++)
140 for (
int i = 0; i < TheList.Size(); i++)
int Lookup(IntegerSet &s)
void Recreate(const int n, const int *p)
Create an integer set from C-array 'p' of 'n' integers. Overwrites any existing set data...
void AsTable(Table &t)
Write the list of sets into table 't'.
T * GetData()
Returns the data.
int PickRandomElement()
Return the value of a random element of the set.
int operator==(IntegerSet &s)
Return 1 if the sets are equal and 0 otherwise.
void mfem_error(const char *msg)
Function called when an error is encountered. Used by the macros MFEM_ABORT, MFEM_ASSERT, MFEM_VERIFY.
int Insert(IntegerSet &s)
Check to see if set 's' is in the list. If not append it to the end of the list. Returns the index of...
void Sort()
Sorts the array in ascending order. This requires operator< to be defined for T.
int Size()
Return the number of integer sets in the list.
double p(const Vector &x, double t)
void SetSize(int nsize)
Change the logical size of the array, keep existing entries.
IntegerSet()
Create an empty set.
IntegerSet & operator=(const IntegerSet &s)
Create a copy of set 's'.
int Size() const
Return the logical size of the array.