Quelle nconvex02.tst
Sprache: unbekannt
|
|
# NConvex, single 2
#
# DO NOT EDIT THIS FILE - EDIT EXAMPLES IN THE SOURCE INSTEAD!
#
# This file has been generated by AutoDoc. It contains examples extracted from
# the package documentation. Each example is preceded by a comment which gives
# the name of a GAPDoc XML file and a line range from which the example were
# taken. Note that the XML file in turn may have been generated by AutoDoc
# from some other input.
#
gap> START_TEST("nconvex02.tst");
# doc/_Chunks.xml:138-198
gap> F1 := Fan( [ [ [ 2, 1 ], [ 1, 2 ] ], [ [ 2, 1 ], [ 1, -1 ] ],
> [ [ -3, 1 ], [ -1, -3 ] ] ] );
<A fan in |R^2>
gap> F2 := Fan( [ [ 2, 1 ], [ 1, 2 ], [ -3, 1 ], [ -1, -3 ], [ 1, -1 ] ],
> [ [ 1, 2 ], [ 1, 5 ], [ 3, 4 ] ] );
<A fan in |R^2>
gap> rays1 := RayGenerators( F1 );
[ [ -3, 1 ], [ -1, -3 ], [ 1, -1 ], [ 1, 2 ], [ 2, 1 ] ]
gap> rays2 := RayGenerators( F2 );
[ [ -3, 1 ], [ -1, -3 ], [ 1, -1 ], [ 1, 2 ], [ 2, 1 ] ]
gap> RaysInMaximalCones( F1 );
[ [ 0, 0, 0, 1, 1 ], [ 0, 0, 1, 0, 1 ], [ 1, 1, 0, 0, 0 ] ]
gap> RaysInMaximalCones( F2 );
[ [ 0, 0, 0, 1, 1 ], [ 0, 0, 1, 0, 1 ], [ 1, 1, 0, 0, 0 ] ]
gap> RaysInAllCones( F1 );
[ [ 0, 0, 0, 0, 0 ], [ 0, 0, 0, 1, 1 ], [ 0, 0, 0, 0, 1 ],
[ 0, 0, 0, 1, 0 ], [ 0, 0, 1, 0, 1 ], [ 0, 0, 1, 0, 0 ],
[ 1, 1, 0, 0, 0 ], [ 0, 1, 0, 0, 0 ], [ 1, 0, 0, 0, 0 ] ]
gap> FVector( F1 );
[ 5, 3 ]
gap> IsComplete( F1 );
false
gap> IsSimplicial( F1 );
true
gap> IsNormalFan( F1 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