Toric code examples using GUAVA 1.8

For some elementary background on the construction of toric varieties and toric codes, see for example the online expository paper by Joyner and Verrill. To construct a toric code associated to the points in an integral polytope P in Zn (Z=integers), over a finite field F=GF(q) (q=prime power), one merely needs to call ToricCode(L,F);. For example,
gap> RequirePackage("guava");
gap> L:=[[-2,-2],[-1,-2],[-1,-1],[-1,0],[0,-1],[0,0],[0,1],[1,-1],[1,0]];
gap> C:=ToricCode(L,GF(5));
returns "a linear [16,9,1..6]4..7 code defined by generator matrix over GF(5)". Typing
gap> WeightDistribution(C);
returns the vector [1,0,0,0,0,0,672,1984,10704,40064,105056,235200,391216,482496,409536,221568,54628]. In particular, this code is minimum distance 6.

Note GAP 4.4 will use "LoadPackage("guava");" in place of "RequirePackage("guava");" and the above code will not work in GUAVA 1.7 or below. For large q the program is very slow.


Back to the GUAVA homepage.

David Joyner / Last modified: 3-12-2003