21 for (
int i = 0; i < me.
Size(); i++)
35 for (
int i = 0; i < me.
Size(); i++)
46 int i, size = me.
Size();
47 unsigned int seed = 0;
49 for (i = 0; i < size; i++)
56 return me[rand()/(RAND_MAX/size)];
65 for (i = 0; i < n; i++)
72 for (j = 0, i = 1; i < n; i++)
84 for (
int i = 0; i < TheList.Size(); i++)
92 return TheList.Size()-1;
97 for (
int i = 0; i < TheList.Size(); i++)
103 mfem_error(
"ListOfIntegerSets::Lookup (), integer set not found.");
113 for (i = 0; i <
Size(); i++)
120 for (i = 0; i <
Size(); i++)
131 for (
int i = 0; i < TheList.Size(); i++)
int Lookup(IntegerSet &s)
int Size() const
Return the logical size of the array.
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'.
void AddColumnsInRow(int r, int ncol)
void MakeI(int nrows)
Next 7 methods are used together with the default constructor.
T * GetData()
Returns the data.
int PickRandomElement()
Return the value of a random element of the set.
void AddConnections(int r, const int *c, int nc)
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.