<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ Cdd_PolyhedronByInequalities</code>( <var class="Arg">ineq</var>[, <var class="Arg">linearities_list</var>] )</td><td class="tdright">( function )</td></tr></table></div>
<p>Returns: a CddPolyhedron</p>
<p>The function takes a list in which every entry represents an inequality (or equality). In case we want some entries to represent equalities we should refer in a second list to their indices.</p>
<div class="example"><pre>
<span class="GAPprompt">gap></span> <span class="GAPinput">A:= Cdd_PolyhedronByInequalities( [ [ 0, 1, 0 ], [ 0, 1, -1 ] ] );</span>
<Polyhedron given by its H-representation>
<span class="GAPprompt">gap></span> <span class="GAPinput">Display( A );</span>
H-representation
begin
2 X 3 rational
0 1 0
0 1 -1
end
<span class="GAPprompt">gap></span> <span class="GAPinput">B:= Cdd_PolyhedronByInequalities( [ [ 0, 1, 0 ], [ 0, 1, -1 ] ], [ 2 ] );</span>
<Polyhedron given by its H-representation>
<span class="GAPprompt">gap></span> <span class="GAPinput">Display( B );</span>
H-representation
linearity 1, [ 2 ]
begin
2 X 3 rational
<div class="func"><table class="func" width="100%"><tr><td class="tdleft"><code class="func">‣ Cdd_PolyhedronByGenerators</code>( <var class="Arg">genes</var>[, <var class="Arg">linearities_list</var>] )</td><td class="tdright">( function )</td></tr></table></div>
<p>Returns: a CddPolyhedron</p>
<p>The function takes a list in which every entry represents a vertex in the ambient vector space. In case we want some vertices to be free (the vertex and its negative belong to the polyhedron) we should refer in a second list to their indices .</p>
<div class="example"><pre>
<span class="GAPprompt">gap></span> <span class="GAPinput">A:= Cdd_PolyhedronByGenerators( [ [ 0, 1, 3 ], [ 1, 4, 5 ] ] );</span>
<Polyhedron given by its V-representation>
<span class="GAPprompt">gap></span> <span class="GAPinput">Display( A );</span>
V-representation
begin
2 X 3 rational
0 1 3
1 4 5
end
<span class="GAPprompt">gap></span> <span class="GAPinput">B:= Cdd_PolyhedronByGenerators( [ [ 0, 1, 3 ] ], [ 1 ] );</span>
<Polyhedron given by its V-representation>
<span class="GAPprompt">gap></span> <span class="GAPinput">Display( B );</span>
V-representation
linearity 1, [ 1 ]
begin
1 X 3 rational
<p>The function returns the Fourier projection of the polyhedron in the subspace <span class="Math">(O,x_1,\dots,x_{i-1},x_{i+1},\dots,x_n)</span> after applying the Fourier elemination algorithm to get rid of the variable <span class="Math">x_{i}</span>.</p>
<p>To illustrate this projection, Let <span class="Math">P= \mathrm{conv}( (1,2), (4,5) )</span> in <span class="Math">\mathbb{Q}^2</span>. <span class="Math">\newline</span> To find its projection on the subspace <span class="Math">(O, x_1)</span>, we apply the Fourier elemination to get rid of <span class="Math">x_2</span></p>
<div class="example"><pre>
<span class="GAPprompt">gap></span> <span class="GAPinput">P := Cdd_PolyhedronByGenerators( [ [ 1, 1, 2 ], [ 1, 4, 5 ] ] );</span>
<Polyhedron given by its V-representation>
<span class="GAPprompt">gap></span> <span class="GAPinput">H := Cdd_H_Rep( P );</span>
<Polyhedron given by its H-representation>
<span class="GAPprompt">gap></span> <span class="GAPinput">Display( H );</span>
H-representation
linearity 1, [ 3 ]
begin
3 X 3 rational
4 -1 0
-1 1 0
-1 -1 1
end
<span class="GAPprompt">gap></span> <span class="GAPinput">P_x1 := Cdd_FourierProjection( H, 2);</span>
<Polyhedron given by its H-representation>
<span class="GAPprompt">gap></span> <span class="GAPinput">Display( P_x1 );</span>
H-representation
linearity 1, [ 3 ]
begin
3 X 3 rational
4 -1 0
-1 1 0
0 0 1
end
<span class="GAPprompt">gap></span> <span class="GAPinput">Display( Cdd_V_Rep( P_x1 ) );</span>
V-representation
begin
2 X 3 rational
1 1 0
1 4 0
end
</pre></div>
<p>Let again <span class="Math">Q= Conv( (2,3,4), (2,4,5) )+ nonneg( (1,1,1) )</span>, and let us compute its projection on <span class="Math">(O,x_2,x_3)</span></p>
<div class="example"><pre>
<span class="GAPprompt">gap></span> <span class="GAPinput">Q := Cdd_PolyhedronByGenerators( [ [ 1, 2, 3, 4 ],[ 1, 2, 4, 5 ], [ 0, 1, 1, 1 ] ] );</span>
<Polyhedron given by its V-representation>
<span class="GAPprompt">gap></span> <span class="GAPinput">R := Cdd_H_Rep( Q );</span>
<Polyhedron given by its H-representation>
<span class="GAPprompt">gap></span> <span class="GAPinput">Display( R );</span>
H-representation
linearity 1, [ 4 ]
begin
4 X 4 rational
2 1 -1 0
-2 1 0 0
-1 -1 1 0
-1 0 -1 1
end
<span class="GAPprompt">gap></span> <span class="GAPinput">P_x2_x3 := Cdd_FourierProjection( R, 1);</span>
<Polyhedron given by its H-representation>
<span class="GAPprompt">gap></span> <span class="GAPinput">Display( P_x2_x3 );</span>
H-representation
linearity 2, [ 1, 3 ]
begin
3 X 4 rational
-1 0 -1 1
-3 0 1 0
0 1 0 0
end
<span class="GAPprompt">gap></span> <span class="GAPinput">Display( Cdd_V_Rep( last ) ) ;</span>
V-representation
begin
2 X 4 rational
<p>The function returns <code class="code">true</code> if <span class="Math">P_1</span> is contained in <span class="Math">P_2</span>, otherwise returns <code class="code">false</code>.</p>
¤ Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.0.16Bemerkung:
(vorverarbeitet)
¤
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung ist noch experimentell.