next | previous | forward | backward | up | top | index | toc | Macaulay2 website
RandomComplexes :: normalize

normalize -- normalize a ChainComplex over QQ or RR

Synopsis

Description

We divide each matrix by its entry of maximal absolute value, to obtain a complex with entries of absolute size $\le 1$.

i1 : setRandomSeed "nice example 2";
i2 : C=randomChainComplex({1,1,1},{2,2})

       3       5       3
o2 = ZZ  <-- ZZ  <-- ZZ
                      
     0       1       2

o2 : ChainComplex
i3 : C.dd

           3                              5
o3 = 0 : ZZ  <------------------------- ZZ  : 1
                | -14 -7  5 5   3   |
                | 8   13  1 -17 -21 |
                | -13 -15 1 18  21  |

           5                        3
     1 : ZZ  <------------------- ZZ  : 2
                | -11 5   -10 |
                | 26  -29 37  |
                | 19  -16 23  |
                | -41 -1  -22 |
                | 46  -16 38  |

o3 : ChainComplexMap
i4 : B=normalize C

       3       5       3
o4 = QQ  <-- QQ  <-- QQ
                      
     0       1       2

o4 : ChainComplex
i5 : B.dd

           3                                         5
o5 = 0 : QQ  <------------------------------------ QQ  : 1
                | -2/3   -1/3  5/21 5/21   1/7 |
                | 8/21   13/21 1/21 -17/21 -1  |
                | -13/21 -5/7  1/21 6/7    1   |

           5                                 3
     1 : QQ  <---------------------------- QQ  : 2
                | -11/46 5/46   -5/23  |
                | 13/23  -29/46 37/46  |
                | 19/46  -8/23  1/2    |
                | -41/46 -1/46  -11/23 |
                | 1      -8/23  19/23  |

o5 : ChainComplexMap

Ways to use normalize :

For the programmer

The object normalize is a method function.