File: frobgrob

package info (click to toggle)
frobby 0.9.6-1~exp1
  • links: PTS, VCS
  • area: main
  • in suites:
  • size: 11,616 kB
  • sloc: cpp: 30,134; sh: 1,184; makefile: 306; ansic: 102; lisp: 10
file content (18 lines) | stat: -rwxr-xr-x 675 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#!/bin/bash
file="$1" # the input file
shift # important as any remaining options are passed on to Frobby

frobby=../bin/frobby
fti2=../4ti2/4ti2gmp # where to find 4ti2

# make input file $file.out.mat from $file in the format that 4ti2 expects
echo -n "1 " > $file.out.mat
wc $file | sed "s/ *[0-9]* *\([0-9]*\) *.*/\1/" >> $file.out.mat
cat $file >> $file.out.mat

# run 4ti2 to compute Grobner basis
$fti2 zbasis $file.out > /dev/null # make $file.out.lat (not required)
$fti2 groebner $file.out > /dev/null # make $file.out.gro

# run frobby to compute Frobenius number from Grobner basis
cat $file.out.gro $file | $frobby optimize -chopFirstAndSubtract -maxStandard $*