Parma Polyhedra Library: Vertex Enumeration

佐手、 提交于 2019-12-06 06:59:47

Each shape in PPL has dual representations: 1) Constraint_System, 2) Generator_System. For a convex-polyhedra, the generator system will contain the set of generators which can either be 1) Point, 2) Line, 3) Rays. For the convex polytope, the set of generators would be all points. you can get the generator representation as follows:

Generator_System gs = ph.generators(); // Use ph.minimized_generators() to minimal set of points for the polytope
for(Generator_System::const_iterator it = gs.begin(); it != gs.end(); it++) {
  const Generator& g = *it;
  assert(g.is_point()); // Assertions will fail for unbounded polyhedra
  std::cout << g;
}
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!