exact_vol {volesti} | R Documentation |
Given a zonotope (as an object of class Zonotope), this function computes the sum of the absolute values of the determinants of all the d \times d submatrices of the m\times d matrix G that contains row-wise the m d-dimensional segments that define the zonotope. For an arbitrary simplex that is given in V-representation this function computes the absolute value of the determinant formed by the simplex's points assuming it is shifted to the origin. For a d-dimensional unit simplex, hypercube or cross polytope this function computes the exact well known formulas.
exact_vol(P = NULL, body = NULL, Parameters = NULL)
P |
A zonotope or a simplex in V-representation. |
body |
A string that declares the type of the body for the exact sampling: a) |
Parameters |
A list for the parameters of the methods:
|
The exact volume of the zonotope
# compute the exact volume of a 5-dimensional zonotope defined by the Minkowski sum of 10 segments Z = GenZonotope(5, 10) vol = exact_vol(Z) # compute the exact volume of a 2-d arbitrary simplex V = matrix(c(2,3,-1,7,0,0),ncol = 2, nrow = 3, byrow = TRUE) P = Vpolytope$new(V) vol = exact_vol(P) # compute the exact volume the 10-dimensional cross polytope vol = exact_vol(body = "cross", Parameters = list("dimension" = 10))