Code: Select all
use application 'polytope';
sub hStarPoly {
my ($p) = @_;
my $h = $p -> H_STAR_VECTOR;
my $d = $h -> dim();
my $R = new Ring("t");
$d -= 1;
my $exps = new Matrix<Int>( map { "$_" } (0..$d) );
my $poly = new Polynomial($exps,$h,$R);
return $poly;
}
Code: Select all
$h = hStarPoly(cube(3));
defines a polynomial $h. I'd like to be able to do stuff with $h. For example, I'd like to evaluate $h at 1 or evaluate $h at u^(-1)*v where u and v are indeterminants. Is it possible to this sort of algebra within polymake?