Code: Select all
#include <polymake/polytope/beneath_beyond.h>
...
// create some input data
perl::Object p = CallPolymakeFunction("johnson_solid",91);
Matrix<QuadraticExtension<Rational> > V = p.give("VERTICES");
// the 'true' at the end tells the algorithm that the input points are already vertices
// in general you probably want 'false' there
polytope::beneath_beyond_algo<QuadraticExtension<Rational> > algo(V,true);
// the (end-sensitive) iterator specifies the insertion order of the points
algo.compute(entire(sequence(0,V.rows())));
Matrix<QuadraticExtension<Rational> > F = algo.getFacets();
Code: Select all
polymake::polytope::beneath_beyond_algo<polymake::QuadraticExtension<polymake::Rational>> algo(H, false);
algo.compute(polymake::entire(polymake::sequence(0, H.rows())));
polymake::Matrix<polymake::QuadraticExtension<polymake::Rational> > V = algo.getVertices();
Code: Select all
perl::Main pmain;
pmain.set_application("polytope");
Matrix< QuadraticExtension<Rational> > H(...);
perl::Object poly("Polytope<QuadraticExtension<Rational>>");
poly.take("INEQUALITIES") << H;
perl::Scope psc=pmain.newScope();
psc.prefer_now("beneath_beyond");
Matrix< QuadraticExtension<Rational> > V = poly.give("VERTICES");
cout << V;
Code: Select all
polymake::Main pm;
pm.set_application("polytope");