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++)
void Sort()
Sorts the array in ascending order. This requires operator< to be defined for T.
void SetSize(int nsize)
Change the logical size of the array, keep existing entries.
int Size() const
Return the logical size of the array.
T * GetData()
Returns the data.
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.
int PickRandomElement()
Return the value of a random element of the set.
IntegerSet & operator=(const IntegerSet &s)
Create a copy of set 's'.
IntegerSet()
Create an empty set.
int Size()
Return the number of integer sets in the list.
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 AsTable(Table &t)
Write the list of sets into table 't'.
int Lookup(IntegerSet &s)
void mfem_error(const char *msg)
real_t p(const Vector &x, real_t t)