Quellcodebibliothek Statistik Leitseite products/Sources/formale Sprachen/GAP/pkg/hap/lib/PolyComplexes/   (Algebra von RWTH Aachen Version 4.15.1©)  Datei vom 19.6.2025 mit Größe 483 B image not shown  

Quelle  prog.old   Sprache: unbekannt

 
#!/usr/bin/perl
#
# Program to convert image text files to GAP matrices. 

($file) = @ARGV;
#$file = '/tmp/im.txt';  # Name the file

open(INFO, $file);  # Open the file
my $line = <INFO>;
@parts = split /(:|,)/, $line;
print("HAPAAA:=[\n ",$parts[2],",",$parts[4],",");
while(<INFO>)  # Read it into an array
{
@parts = split m!(,|:|\(|\))!, $_;
print("[",1+$parts[0],",",1+$parts[2],",",$parts[6]+$parts[8]+$parts[10],"],");
};   # Print the array
print($my,"0];\n");
close(INFO);

[ Dauer der Verarbeitung: 0.20 Sekunden  (vorverarbeitet)  ]