Description
Create a NeuralCode from a list of binary strings or an ideal. By default, Macaulay2 will choose the ring and polarized ring of the code, but these can be specified by giving strings for the variable names or inputting rings.
i1 : C=neuralCode({"000","001","101"});
|
i2 : dim C
o2 = 3
|
i3 : ring C
ZZ
o3 = --[x ..x ]
2 1 3
o3 : PolynomialRing
|
i4 : polarizedRing C
ZZ
o4 = --[x ..y ]
2 1 3
o4 : PolynomialRing
|
i5 : D=neuralCode({"00","10"},"z","w");
|
i6 : ring D
ZZ
o6 = --[z ..z ]
2 1 2
o6 : PolynomialRing
|
i7 : polarizedRing D
ZZ
o7 = --[z ..z , w ..w ]
2 1 2 1 2
o7 : PolynomialRing
|
i8 : R=ZZ/2[x_1,x_2];
|
i9 : S=ZZ/2[x_1,x_2,y_1,y_2];
|
i10 : E=neuralCode({"00","10","11"},R,S);
|
i11 : ring E
o11 = R
o11 : PolynomialRing
|
i12 : polarizedRing E
o12 = S
o12 : PolynomialRing
|
i13 : R=ZZ/2[x_1,x_2];
|
i14 : I=ideal(x_1*x_2);
o14 : Ideal of R
|
i15 : neuralCode(I)
o15 = NeuralCode{cache => CacheTable{...2...}}
codeWords => {00, 01, 10}
dimension => 2
o15 : NeuralCode
|
i16 : S=ZZ/2[x_1,x_2,y_1,y_2];
|
i17 : I=ideal(x_1*y_2);
o17 : Ideal of S
|
i18 : F=neuralCode(I,Polarized=>true)
o18 = NeuralCode{cache => CacheTable{...2...}}
codeWords => {00, 01, 11}
dimension => 2
o18 : NeuralCode
|