Esempio n. 1
0
File: table.cpp Progetto: YPCC/mfem
void Transpose(const Array<int> &A, Table &At, int _ncols_A)
{
   At.MakeI((_ncols_A < 0) ? (A.Max() + 1) : _ncols_A);
   for (int i = 0; i < A.Size(); i++)
      At.AddAColumnInRow(A[i]);
   At.MakeJ();
   for (int i = 0; i < A.Size(); i++)
      At.AddConnection(A[i], i);
   At.ShiftUpI();
}
Esempio n. 2
0
File: sets.cpp Progetto: LLNL/mfem
void ListOfIntegerSets::AsTable(Table & t)
{
   int i;

   t.MakeI(Size());

   for (i = 0; i < Size(); i++)
   {
      t.AddColumnsInRow(i, TheList[i] -> Size());
   }

   t.MakeJ();

   for (i = 0; i < Size(); i++)
   {
      Array<int> &row = *TheList[i];
      t.AddConnections(i, row.GetData(), row.Size());
   }

   t.ShiftUpI();
}