Copyright (C) 2024 Parker Edwards
- Bertini
- Libspatialindex (A requirement of the Python package Rtree)
- An mpiexec executable, like the one you can compile from source here
- The timeout shell command. Default in Linux installs.
Python package for sampling real algebraic varieties from their polynomial systems. See the article https://arxiv.org/abs/1802.07716 for theoretical details. It has been tested on Linux.
The package installs two command line scripts:
- tdasampling - Entry point to the main sampling algorithm.
- sampling-setup - Script for setting up a directory for sampling computation from just a list of polynomials in the system.
See the included tutorial for detailed information about all the different options.
There is now a conda version available for Linux via Anaconda. You can install it with
$ conda install parkeredw::tdasampling
This should install the external requirements bertini and rtree along with the shell scripts into your conda environment. If you would like to run bertini in parallel, your own install or version of MPI is required.
$ tdasampling [options] bounds density number_of_functions_in_system execution_directory
- Bounds is a list of a form like -1.0,1.0,-1.0,1.0, which indicates the region in which to sample the polynomial system is box [-1.0,1.0] x [-1.0,1.0] in Euclidean space
- execution_directory is a directory containing, at minimum:
- A minimizer directory which contains parameter homotopy files for
Bertini. Unless you have experience with Bertini, set these up with
sampling-setup
- (Recommended, not required) A parameters file parameters.json.
See examples for format. If you include a parameters.json file and
use the option flag
--parameters
withtdasampling
, the parameters.json file should include all the information exceptexecution_directory
, which can then be omitted from the command line call.
$ sampling-setup [options] path_to_directory_to_setup
- The directory indicated at
path_to_directory_to_setup
should contain a file named polynomial_system. The general format of that file is text:
list of variable names separated by commas polynomial 1 polynomial 2 ... polynomial n
For example, if we were sampling from a circle of radius 1:
x1,x2 x1^2 + x2^2 - 1
--mpiexecutable /a/path/to/mpiexec
option to indicate a path tompiexec
. Unnecesssary if yourmpiexec
can be called asmpiexec
--bertini /a/path/to/bertini
: a path to yourbertini
executable if it cannot be called asbertini
--processors k
: the number of processes you would like to use for thebertini
solving run associated with setup--hosts name1,name2,...,namek
: list of ssh names for nodes to use for thebertini
computation. By default, thebertini
run will run only on your local machine
tdasampling is licensed under an MIT license.