Macaulay2 Engine
Loading...
Searching...
No Matches

◆ applyPermutation()

void applyPermutation ( ComponentIndex * permutation,
std::vector< ComponentIndex > & entries )
static

Definition at line 281 of file res-f4.cpp.

283{
284 // TODO: permutation should be a std::vector too,
285 // and we should check the values of the permutation.
286 for (ComponentIndex i = 0; i < entries.size(); i++)
287 entries[i] = permutation[entries[i]];
288
289 // The next is just a consistency check, that maybe can be removed later.
290 for (ComponentIndex i = 1; i < entries.size(); i++)
291 {
292 if (entries[i] <= entries[i - 1])
293 {
294 fprintf(stderr, "Internal error: array out of order\n");
295 break;
296 }
297 }
298}
int ComponentIndex

Referenced by F4Res::reorderColumns().