[top][index]
search for:

new ChainComplex -- make a new chain complex from scratch

Synopsis:

  • Operator: NewMethod
  • Input:
  • an instance of class ChainComplex.
  • Output:
  • an instance of class ChainComplex.
  • C = new ChainComplex -- make a new chain complex.

    The new chain complex is initialized with a differential of degree -1 accessible as C.dd and of type ChainComplexMap. You can take the new chain complex and fill in the ring, the modules, and the differentials.

    i1 : C = new ChainComplex;
    i2 : C.ring = ZZ;
    i3 : C#2 = ZZ^1;
    i4 : C#3 = ZZ^2;
    i5 : C.dd#3 = matrix {{3,-11}};

                  1        2
    o5 : Matrix ZZ  <--- ZZ
    i6 : C

           1       2
    o6 = ZZ  <-- ZZ
                  
         2       3

    o6 : ChainComplex
    i7 : C.dd

               1                  2
    o7 = 2 : ZZ  <------------- ZZ  : 3
                    | 3 -11 |

    o7 : ChainComplexMap

    Code:

         -- ../../../Macaulay2/m2/chaincomplexes.m2:10-15
         new ChainComplex := ChainComplex => (cl) -> (
              C := newClass(ChainComplex,new MutableHashTable); -- sigh
              b := C.dd = new ChainComplexMap;
              b.degree = -1;
              b.source = b.target = C;
              C)

    [top][index]
    search for: