Learn R Programming

Volume computation and sampling

About

The volesti package provides R with functions for volume estimation and sampling. In particular, it provides an R interface for the C++ library volesti.

volesti computes approximations of volume of polytopes given as a set of points or linear inequalities or as a Minkowski sum of segments (zonotopes). There are algorithms for volume approximation as well as algorithms for sampling, rounding and rotating polytopes. Last but not least, volesti provides implementations of geometric algorithms to compute the score of a portfolio given asset returns and to detect financial crises in stock markets.

Download and install

  • The latest stable version is available from CRAN.

  • The latest development version is available on Github www.github.com/GeomScale/volesti

  • Install volesti by running:

install.packages("volesti")
  • The package-dependencies are: Rcpp, RcppEigen, BH.

Documentation

Credits

Copyright (c) 2012-2020 Vissarion Fisikopoulos Copyright (c) 2018-2020 Apostolos Chalkis

You may redistribute or modify the software under the GNU Lesser General Public License as published by Free Software Foundation, either version 3 of the License, or (at your option) any later version. It is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY.

Copy Link

Version

Install

install.packages('volesti')

Monthly Downloads

338

Version

1.1.2-9

License

LGPL-3

Maintainer

Vissarion Fisikopoulos

Last Published

April 29th, 2025

Functions in volesti (1.1.2-9)

gen_cross

Generator function for cross polytopes
gen_cube

Generator function for hypercubes
gen_rand_vpoly

Generator function for random V-polytopes
gen_rand_zonotope

Generator function for zonotopes
gen_simplex

Generator function for simplices
sample_points

Sample uniformly or normally distributed points from a convex Polytope (H-polytope, V-polytope, zonotope or intersection of two V-polytopes).
poly_gen

An internal Rccp function as a polytope generator
read_sdpa_format_file

Read a SDPA format file
gen_skinny_cube

Generator function for skinny hypercubes
round_polytope

Apply rounding to a convex polytope (H-polytope, V-polytope or a zonotope)
rounding

Internal rcpp function for the rounding of a convex polytope
zonotope_approximation

A function to over-approximate a zonotope with PCA method and to evaluate the approximation by computing a ratio of fitness.
write_sdpa_format_file

Write a SDPA format file
zono_approx

An internal Rccp function for the over-approximation of a zonotope
volume

The main function for volume approximation of a convex Polytope (H-polytope, V-polytope, zonotope or intersection of two V-polytopes)
rotating

An internal Rccp function for the random rotation of a convex polytope
rotate_polytope

Apply a random rotation to a convex polytope (H-polytope, V-polytope, zonotope or intersection of two V-polytopes)
Zonotope-class

An R class to represent a Zonotope
Hpolytope-class

An R class to represent an H-polytope
Vpolytope-class

An R class to represent a V-polytope
Spectrahedron-class

An R class to represent a Spectrahedron
exact_vol

Compute the exact volume of (a) a zonotope (b) an arbitrary simplex in V-representation or (c) if the volume is known and declared by the input object.
frustum_of_simplex

Compute the percentage of the volume of the simplex that is contained in the intersection of a half-space and the simplex.
VpolytopeIntersection-class

An R class to represent the intersection of two V-polytopes
compute_indicators

Compute an indicator for each time period that describes the state of a market.
copula

Construct a copula using uniform sampling from the unit simplex
direct_sampling

Sample perfect uniformly distributed points from well known convex bodies: (a) the unit simplex, (b) the canonical simplex, (c) the boundary of a hypersphere or (d) the interior of a hypersphere.
gen_prod_simplex

Generator function for product of simplices
inner_ball

Compute an inscribed ball of a convex polytope
load_sdpa_format_file

An internal Rccp function to read a SDPA format file
gen_rand_hpoly

Generator function for random H-polytopes