Home Online Manual
Top
Back: fVectorP(polymake)
Forward: gorensteinVector
FastBack: gfanlib_so
FastForward: Release Notes
Up: polymake_so
Top: Singular Manual
Contents: Table of Contents
Index: Index
About: About this document

D.16.2.7 gorensteinIndex

Syntax:
Polymake::gorensteinIndex( polytope p )
Assume:
p is Gorenstein, i.e. n*p+v is reflexive for some dilatation n and translation v.
Type:
int
Purpose:
returns a factor n such that n*p+v is reflexive for some translation v.
Note:
you can check whether p is Gorenstein by Polymake::isGorenstein(p); the translation v can be computed via Polymake::gorensteinVector(p).
Example:
 
  LIB"polymake.lib";
==> Welcome to polymake
==> Copyright (c) 1997-2012
==> Ewgenij Gawrilow, Michael Joswig (TU Darmstadt)
==> http://www.polymake.org
  intmat M[4][3]=1,1,0, 1,0,1, 1,0,0, 1,1,1;
  polytope p = polytopeViaPoints(M);
  Polymake::gorensteinIndex(p);
==> polymake: used package cddlib
==>   Implementation of the double description method of Motzkin et al.
==>   Copyright by Komei Fukuda.
==>   http://www.ifor.math.ethz.ch/~fukuda/cdd_home/cdd.html
==> 
==> polymake: used package lrslib
==>   Implementation of the reverse search algorithm of Avis and Fukuda.
==>   Copyright by David Avis.
==>   http://cgm.cs.mcgill.ca/~avis/lrs.html
==> 
==> 2
  intmat N[3][3]=1,2,0, 1,0,2, 1,-2,-2;
  polytope q = polytopeViaPoints(N);
  Polymake::gorensteinIndex(q);
==>    ? gorensteinIndex: input polytope not gorenstein
==>    ? error occurred in or before ./examples/gorensteinIndex.sing line 7: \
   `  Polymake::gorensteinIndex(q);`