Skip to content
GeomScalePublic

About

Octave package for intefacing volesti C++ library

Resources

Stars

2 stars

Watchers

0 watching

Forks

Latest commit

 

History

11 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ovolesti

CI Octave License

Octave binding for the volesti C++ library — high-dimensional sampling and volume computation for convex polytopes.


1. About

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

2. Requirements

pkg install compiles the oct-file bindings from source, so you need:

  • GNU Octave ≥ 9.1, including its development files (mkoctfile and headers). On Debian/Ubuntu these are in the octave-dev package, on Fedora in octave-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).


3. Install

3.1. Latest release

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"

3.2. Latest dev version

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

4. Usage

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 ovolesti

5. Documentation

Every public function and class method carries a texinfo help block. In Octave:

help HPolytope
help HPolytope.sample

6. Provide feedback

Please 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.


7. Contribute

ovolesti is open source under GPLv3+. Contributions are welcome: oct-file bindings for new polytope types, additional volesti algorithms, better tests, or documentation improvements.


8. Funding

This project's page at NLnet: https://nlnet.nl/project/Ovolesti/.

Logo NLnet: abstract logo of four people seen from above   Logo NGI Zero Commons Fund: letterlogo shaped like a tag

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).

About

Octave package for intefacing volesti C++ library

Resources

Stars

2 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages