Test rational cone
==================

The cube

>>> from PyNormaliz import Cone, NmzCone, NmzResult
>>> from itertools import product
>>> V = list(list(p+(1,)) for p in product([-1,0,1],repeat=2))
>>> cube1 = Cone(vertices=V)
>>> cube2 = NmzCone(vertices=V)
>>> verts = cube1.VerticesOfPolyhedron()
>>> verts == NmzResult(cube2, "VerticesOfPolyhedron")
True
>>> verts == [[-1, -1, 1], [-1, 1, 1], [1, -1, 1], [1, 1, 1]]
True
>>> rays = cube1.ExtremeRays()
>>> rays == NmzResult(cube2, "ExtremeRays") == []
True
>>> cube1.MaximalSubspace() == NmzResult(cube2, "MaximalSubspace") == []
True
>>> hyperplanes = cube1.SupportHyperplanes()
>>> hyperplanes == NmzResult(cube2, "SupportHyperplanes")
True
>>> hyperplanes == [[-1, 0, 1], [0, -1, 1], [0, 1, 1], [1, 0, 1]]
True
>>> cube1.Equations() == NmzResult(cube2, "Equations") == []
True
>>> cube1.Congruences() == NmzResult(cube2, "Congruences") == []
True
>>> cube1.AffineDim() == NmzResult(cube2, "AffineDim") == 2
True
>>> cube1.Volume() == 8
True
>>> NmzResult(cube2, "Volume") == [8,1]
True
>>> cube1.IsPointed() == NmzResult(cube2, "IsPointed") == True
True
>>> cube1.EmbeddingDim() == NmzResult(cube2, "EmbeddingDim") == 3
True
>>> cube1.IsIntegrallyClosed()
Traceback (most recent call last):
...
NormalizError: ...
>>> NmzResult(cube2, "IsIntegrallyClosed")
Traceback (most recent call last):
...
NormalizError: ...
>>> cube1.EuclideanVolume() == '4.0000'
True
>>> abs(NmzResult(cube2, "EuclideanVolume") - 4) < 0.000001
True
>>> len(cube1.Triangulation()) ==  len(NmzResult(cube2, "Triangulation")) == 8
True
>>> int_pts = [[-1,-1,1],[-1,0,1],[-1,1,1],[0,-1,1],[0,0,1],[0,1,1],[1,-1,1],[1,0,1],[1,1,1]]
>>> cube1.ModuleGenerators() == NmzResult(cube2, "ModuleGenerators") == int_pts
True
>>> cube1.Rank() == NmzResult(cube2, "Rank") == 3
True
>>> cube1.ModuleRank() == NmzResult(cube2, "ModuleRank") == 9
True
>>> sublattice = [[[1,0,0],[0,1,0],[0,0,1]],[[1,0,0],[0,1,0],[0,0,1]],1]
>>> cube1.Sublattice() == NmzResult(cube2, "Sublattice") == sublattice
True
>>> cube1.TriangulationSize() == NmzResult(cube2, "TriangulationSize") == 8
True
>>> NmzResult(cube2, "FVector" ) == [ 1, 4, 4, 1 ]
True
>>> len(NmzResult(cube2, "FaceLattice")) == 10
True
>>> cube1.Automorphisms() == [8, [[], []], [[[0, 2, 1, 3], [1, 0, 3, 2]], [[0, 1, 2, 3]]], [[[1, 0, 3, 2], [0, 2, 1, 3]], [[0, 1, 2, 3]]]]
True
>>> cube1.Automorphisms() == [8, [[], []], [[[0, 2, 1, 3], [1, 0, 3, 2]], [[0, 1, 2, 3]]], [[[1, 0, 3, 2], [0, 2, 1, 3]], [[0, 1, 2, 3]]]] 
True
>>> cube1.CombinatorialAutomorphisms() == [8, [[], []], [[[0, 2, 1, 3], [1, 0, 3, 2]], [[0, 1, 2, 3]]], [[[1, 0, 3, 2], [0, 2, 1, 3]], [[0, 1, 2, 3]]]]
True
>>> cube1.RationalAutomorphisms() == [8, [[], []], [[[0, 2, 1, 3], [1, 0, 3, 2]], [[0, 1, 2, 3]]], [[[1, 0, 3, 2], [0, 2, 1, 3]], [[0, 1, 2, 3]]]]
True
>>> cube1.RationalAutomorphisms() == [8, [[], []], [[[0, 2, 1, 3], [1, 0, 3, 2]], [[0, 1, 2, 3]]], [[[1, 0, 3, 2], [0, 2, 1, 3]], [[0, 1, 2, 3]]]]
True
>>> cube1.EuclideanAutomorphisms() == [8, [[], []], [[[0, 2, 1, 3], [1, 0, 3, 2]], [[0, 1, 2, 3]]], [[[1, 0, 3, 2], [0, 2, 1, 3]], [[0, 1, 2, 3]]]]
True
>>> cube1.Incidence() == [[0, 0, 1, 1], [0, 1, 0, 1], [1, 0, 1, 0], [1, 1, 0, 0]]
True
>>> len(NmzResult(cube2, "DualFaceLattice")) == 10
True
>>> NmzResult(cube2, "DualFVector" ) == [ 1, 4, 4, 1 ]
True
>>> cube1.UnimodularTriangulation() == [[[0, 1, 2], 1], [[0, 1, 3], 1], [[0, 2, 4], 1], [[0, 3, 4], 1], [[1, 2, 5], 1], [[1, 3, 6], 1], [[2, 4, 7], 1], [[3, 4, 8], 1]]
True
>>> cube1.TriangulationGenerators() == [[0, 0, 1], [-1, 0, 1], [0, -1, 1], [0, 1, 1], [1, 0, 1], [-1, -1, 1], [-1, 1, 1], [1, -1, 1], [1, 1, 1]]
True
>>> cube1.AllGeneratorsTriangulation() == [[[0, 1, 2], 1], [[0, 1, 3], 1], [[0, 2, 4], 1], [[0, 3, 4], 1], [[1, 2, 5], 1], [[1, 3, 6], 1], [[2, 4, 7], 1], [[3, 4, 8], 1]]
True
>>> cube1.TriangulationGenerators() == [[0, 0, 1], [-1, 0, 1], [0, -1, 1], [0, 1, 1], [1, 0, 1], [-1, -1, 1], [-1, 1, 1], [1, -1, 1], [1, 1, 1]]
True
>>> cube1.LatticePointTriangulation() == [[[0, 1, 2], 1], [[0, 1, 3], 1], [[0, 2, 4], 1], [[0, 3, 4], 1], [[1, 2, 5], 1], [[1, 3, 6], 1], [[2, 4, 7], 1], [[3, 4, 8], 1]]
True
>>> cube1.TriangulationGenerators() == [[0, 0, 1], [-1, 0, 1], [0, -1, 1], [0, 1, 1], [1, 0, 1], [-1, -1, 1], [-1, 1, 1], [1, -1, 1], [1, 1, 1]]
True




