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

◆ compare_partitions()

int SchurRing2::compare_partitions ( const_schur_partition a,
const_schur_partition b ) const
protected

Definition at line 348 of file schur2.cpp.

350{
351 int len = a[0];
352 if (b[0] < len) len = b[0];
353 for (int i = 1; i < len; i++)
354 {
355 int cmp = a[i] - b[i];
356 if (cmp < 0) return LT;
357 if (cmp > 0) return GT;
358 }
359 int cmp = a[0] - b[0];
360 if (cmp < 0) return LT;
361 if (cmp > 0) return GT;
362 return EQ;
363}
const int EQ
Definition style.hpp:40
const int GT
Definition style.hpp:41
const int LT
Definition style.hpp:39

References EQ, GT, and LT.

Referenced by add(), and compare_elems().