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

◆ mult_terms()

ring_elem SchurRing2::mult_terms ( const_schur_partition a,
const_schur_partition b )
private

Definition at line 867 of file schur2.cpp.

869{
870 int maxsize = (a[0] - 1 + b[0] - 1) + 1; // this is the max number of
871 // elements in the output partition,
872 // plus one
873
874 schur_partition lambda = ALLOCATE_EXPONENTS(sizeof(schur_word) * maxsize);
875 schur_partition p = ALLOCATE_EXPONENTS(sizeof(schur_word) * maxsize);
876
877 // Second: make the skew partition (note: r,s>=1)
878 // this is: if a = r+1 a1 a2 ... ar
879 // b = s+1 b1 b2 ... bs
880 // p is:
881 // (r+s+1) b1+a1 b1+a2 ... b1+ar b1 b2 ... bs
882 // lambda is:
883 // (r+1) b1 b1 ... b1 0 0 ... 0
884
885 int r = a[0] - 1;
886 int s = b[0] - 1;
887 int c = b[1];
888
889 assert(r + s + 1 == maxsize);
890
891 for (int i = 1; i <= r; i++)
892 {
893 assert(i < maxsize);
894 p[i] = c + a[i];
895 lambda[i] = c;
896 }
897 for (int i = r + 1; i < r + s + 1; i++)
898 {
899 assert(i < maxsize);
900 p[i] = b[i - r];
901 lambda[i] = 0;
902 }
903 p[0] = r + s + 1;
904 lambda[0] = r + 1;
905 return skew_schur(lambda, p);
906}
ring_elem skew_schur(const_schur_partition lambda, const_schur_partition p)
Definition schur2.cpp:836
int p
void size_t s
Definition m2-mem.cpp:271
#define ALLOCATE_EXPONENTS(byte_len)
Definition monoid.hpp:62
int schur_word
Definition schur2.hpp:43
schur_word * schur_partition
Definition schur2.hpp:51

References ALLOCATE_EXPONENTS, p, s, and skew_schur().

Referenced by mult().