GateMatrix M is expected to have 1 column. Matrices params and variables are expected to have 1 row.
i1 : variables = declareVariable \ {x,y}
o1 = {x, y}
o1 : List
|
i2 : F = gateSystem(matrix{variables}, matrix{{x*y-1},{x^3+y^2-2}})
o2 = gate system: 2 ---> 2
o2 : GateSystem
|
i3 : evaluate(F,point{{0.1,0.2+ii}})
o3 = | -.98+.1ii -2.959+.4ii |
1 2
o3 : Matrix CC <--- CC
53 53
|
i4 : evaluate(F,point{{1/2,1/3}})
o4 = | -5/6 -127/72 |
1 2
o4 : Matrix QQ <--- QQ
|
i5 : evaluate(F,point{{2_(ZZ/101),3}})
o5 = | 5 15 |
ZZ 1 ZZ 2
o5 : Matrix (---) <--- (---)
101 101
|
Systems with parameters are allowed.
i6 : params = declareVariable \ {a,b}
o6 = {a, b}
o6 : List
|
i7 : Fab = gateSystem(matrix{params}, matrix{variables}, matrix{{a*x*y-1},{x^3+y^2-b}})
o7 = gate system: 2 ---> 2
(#parameters = 2)
o7 : GateSystem
|
i8 : evaluate(Fab,point{{1,2}},point{{0.1,0.2+ii}})
o8 = | -.98+.1ii -2.959+.4ii |
1 2
o8 : Matrix CC <--- CC
53 53
|
Note for developers: there is a version of the constructor that builds GateSystem from PolySystem. Its variant that takes the list of variables to treat as parameters is likely to disappear.
The object gateSystem is a method function.