next | previous | forward | backward | up | index | toc

# disturb -- disturb the matrices of a chain complex over RR

## Synopsis

• Usage:
B = disturb(C,epsilon)
• Inputs:
• C, , over RR or QQ
• epsilon, ,
• Optional inputs:
• Strategy => , default value Discrete, either Discrete or Continuous, whether the disturbed values should be drawn from a discrete distribution or a continuous distribution
• Outputs:
• B, , a sequence of matrices over RR

## Description

We disturb the entries of the matrices by a relative error of size epsilon depending on either a discrete with values in \{-1,1\}\ or a continuous random variable with values in [-1..1].

 i1 : needsPackage "RandomComplexes" o1 = RandomComplexes o1 : Package i2 : setRandomSeed "nice example 2"; i3 : C=randomChainComplex({1,1,1},{2,2}) 3 5 3 o3 = ZZ <-- ZZ <-- ZZ 0 1 2 o3 : ChainComplex i4 : C.dd 3 5 o4 = 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 | o4 : ChainComplexMap i5 : B=disturb(C,1e-4) 3 5 3 o5 = RR <-- RR <-- RR 53 53 53 0 1 2 o5 : ChainComplex i6 : B.dd 3 5 o6 = 0 : RR <-------------------------------------------------- RR : 1 53 | -13.9986 -6.9993 5.0005 5.0005 2.9997 | 53 | 8.0008 12.9987 1.0001 -17.0017 -20.9979 | | -13.0013 -15.0015 1.0001 18.0018 20.9979 | 5 3 1 : RR <---------------------------------- RR : 2 53 | -10.9989 4.9995 -10.001 | 53 | 26.0026 -29.0029 37.0037 | | 18.9981 -16.0016 23.0023 | | -40.9959 -1.0001 -21.9978 | | 46.0046 -16.0016 37.9962 | o6 : ChainComplexMap i7 : B.dd^2 3 3 o7 = 0 : RR <---------------------------------------- RR : 2 53 | -.0307969 -.0030031 .00020458 | 53 | -4.26326e-14 .00020002 .148183 | | -.0780078 .080208 -.239992 | o7 : ChainComplexMap i8 : B1=disturb(C,1e-4,Strategy => Continuous) 3 5 3 o8 = RR <-- RR <-- RR 53 53 53 0 1 2 o8 : ChainComplex i9 : B1.dd^2 3 3 o9 = 0 : RR <------------------------------------- RR : 2 53 | -.0274814 .0279033 -.0248834 | 53 | -.0316963 -.0630671 .0213659 | | .0211089 .0524756 -.0148725 | o9 : ChainComplexMap

## Caveat

The result is only approximately a complex