Octave binding for the volesti C++ library — high-dimensional sampling and volume computation for convex polytopes.
ovolesti wraps volesti's templated C++ algorithms behind Octave classdef
objects (HPolytope, VPolytope, Zonotope, Spectahedron — the latter three
are planned). Each class exposes sample and volume methods that dispatch
through compiled oct-file bindings to the underlying C++ library.
The package is in early development. The current release provides:
| Class | Methods | Status |
|---|---|---|
HPolytope |
sample, volume |
✓ implemented |
pkg install compiles the oct-file bindings from source, so you need:
- GNU Octave ≥ 9.1, including its development files (
mkoctfileand headers). On Debian/Ubuntu these are in theoctave-devpackage, on Fedora inoctave-devel. - A C++17 compiler (e.g.
g++) and make.
All C++ dependencies (the volesti library, Eigen, Boost, and Spectra) are vendored in the repository at pinned versions, so installing needs no network access beyond the download itself and no other system libraries.
CI tests the package on Linux with Octave 9.1 and 11.3.
Maintainers only: re-vendoring the dependencies with tools/fetch_deps.sh
additionally requires cmake, git, and wget (or curl).
Install the latest release (v0.0.1) from the Octave command prompt by typing
pkg install "https://github.com/GeomScale/ovolesti/archive/refs/tags/v0.0.1.tar.gz"
Install the latest dev version from the Octave command prompt by typing
pkg install "https://github.com/GeomScale/ovolesti/archive/refs/heads/main.zip"
Load the package by typing
pkg load ovolesti
pkg load ovolesti
## The square [-1, 1]² in R²
A = [1 0; -1 0; 0 1; 0 -1];
b = [1; 1; 1; 1];
P = HPolytope (A, b);
## Volume estimate (cooling balls, the default)
vol = volume (P)
## Sequence of balls with the RDHR walk, fixed seed; also the log-volume
[vol, logvol] = volume (P, 'SoB', [], [], 42, 'RDHR')
## Draw 100 uniform samples
pts = sample (P, 10, 100, [0; 0]);
plot (pts(1,:), pts(2,:), '.');Run the test suite:
pkg test ovolestiEvery public function and class method carries a texinfo help block. In Octave:
help HPolytope
help HPolytope.samplePlease report bugs, missing features, or volesti capabilities not yet exposed through the Octave binding on the GitHub Issues tracker. Include enough detail to reproduce the problem: Octave version, compiler/platform, and a minimal code snippet.
ovolesti is open source under GPLv3+. Contributions are welcome:
oct-file bindings for new polytope types, additional volesti algorithms,
better tests, or documentation improvements.
This project's page at NLnet: https://nlnet.nl/project/Ovolesti/.
This project is funded through the NGI0 Commons Fund, a fund established by NLnet with financial support from the European Commission's Next Generation Internet programme, under the aegis of DG Communications Networks, Content and Technology under grant agreement No 101135429. Additional funding is made available by the Swiss State Secretariat for Education, Research and Innovation (SERI).