|
D.13.2.45 minkowskiSum
Procedure from library polymake.lib (see polymake_lib).
- Usage:
- minkowskiSum(c,d); c cone, d cone
minkowskiSum(c,q); c cone, q polytope
minkowskiSum(p,d); p polytope, d cone
minkowskiSum(p,q); p polytope, q polytope
- Assume:
- input arguments have the same ambient dimension
- Return:
- cone, if both inputs are cones; polytope, otherwise
the minkowski sum of the two input arguments
Example:
| LIB "polymake.lib";
==> Welcome to polymake version
==> Copyright (c) 1997-2015
==> Ewgenij Gawrilow, Michael Joswig (TU Darmstadt)
==> http://www.polymake.org
intmat M[3][4]=
1,1,0,0,
1,0,1,0,
1,0,0,0;
intmat N[3][4]=
1,0,0,1,
1,-1,-1,-1,
1,0,0,0;
polytope p = polytopeViaPoints(M);
polytope q = polytopeViaPoints(N);
vertices(minkowskiSum(p,q));
==> polymake: used package ppl
==> The Parma Polyhedra Library (PPL): A C++ library for convex polyhedra
==> and other numerical abstractions.
==> http://www.cs.unipr.it/ppl/
==>
==> 1, 0, 1, 0,
==> 1, 1, 0, 0,
==> 1, 1, 0, 1,
==> 1, 0,-1,-1,
==> 1,-1,-1,-1,
==> 1, 0, 0, 1,
==> 1, 0, 1, 1,
==> 1,-1, 0,-1
|
|