Quellcodebibliothek Statistik Leitseite products/Sources/formale Sprachen/GAP/hpcgap/demo/   (Algebra von RWTH Aachen Version 4.15.1©)  Datei vom 18.9.2025 mit Größe 511 B image not shown  

Quelle  serialize2.g   Sprache: unbekannt

 
ReadGapRoot("demo/serialize4.g");

l := List([1..6], x -> One(GF(7)) * x);
ConvertToVectorRep(l, 7);

l2 := List([1..6], x -> One(GF(2)) * x);
ConvertToVectorRep(l2, 2);

x := One(GF(5));
y := x * 2;

m := [ [ x, y ], [ y, x ] ];
ConvertToMatrixRep(m, 5);

x := One(GF(2));
y := 0 * x;

m2 := [ [ x, y ], [ y, x] ];
ConvertToMatrixRep(m, 2);

for val in [ l, l2, m, m2] do
  s := SerializeToNativeString(val);
  d := DeserializeNativeString(s);
  Print("Input:  ", val, "\n");
  Print("Output: ", d, "\n");
od;

[ Dauer der Verarbeitung: 0.18 Sekunden  (vorverarbeitet)  ]