Python code for computation and experimentation with cut-generating functions
Project description
Most of the code is for the 1-dimensional Gomory-Johnson infinite group problem, including an electronic compendium of extreme functions.
See http://www.sagemath.org/doc/tutorial/ for information on how to use Sage.
License
The code is released under the GNU General Public License, version 2, or any later version as published by the Free Software Foundation.
Documentation
http://mkoeppe.github.io/cutgeneratingfunctionology/doc/html/
Using the cutgeneratingfunctionology package
There are many ways to run this package.
A. Run it online on mybinder.org
B. Install released version from PyPI and run it within conda
Install Miniconda from https://docs.conda.io/en/latest/miniconda.html
Set up the conda environment described in https://github.com/mkoeppe/cutgeneratingfunctionology/blob/master/environment.yml:
e=environment.yml; curl -o $e https://raw.githubusercontent.com/mkoeppe/cutgeneratingfunctionology/master/$e conda env create -n sage-cgf -f $e conda activate sage-cgf
This takes a while; it installs SageMath, which has many dependencies.
Install PyPI package:
pip install cutgeneratingfunctionology
Start Sage. You can either use the terminal (IPython):
sage
or a Jupyter notebook:
sage -n jupyter
At the Sage prompt, type:
import cutgeneratingfunctionology.igp as igp; from cutgeneratingfunctionology.igp import *
Follow the instructions and examples in https://github.com/mkoeppe/cutgeneratingfunctionology/blob/master/demo.rst or https://github.com/mkoeppe/cutgeneratingfunctionology/blob/master/demo.ipynb .
C. Clone from GitHub and run it within conda
Install Miniconda from https://docs.conda.io/en/latest/miniconda.html
Clone the GitHub repository https://github.com/mkoeppe/cutgeneratingfunctionology.git:
git clone https://github.com/mkoeppe/cutgeneratingfunctionology.git cd cutgeneratingfunctionology
Set up the conda environment described in https://github.com/mkoeppe/cutgeneratingfunctionology/blob/master/environment.yml:
conda env create -n sage-cgf -f environment.yml conda activate sage-cgf
This takes a while; it installs SageMath which has many dependencies.
(Optional:) Install the cutgeneratingfunctionology package using pip:
pip install .
Start Sage. You can either use the terminal (IPython):
sage
or a Jupyter notebook:
sage -n jupyter
At the Sage prompt, type:
import cutgeneratingfunctionology.igp as igp; from cutgeneratingfunctionology.igp import *
Follow the instructions and examples in https://github.com/mkoeppe/cutgeneratingfunctionology/blob/master/demo.rst or https://github.com/mkoeppe/cutgeneratingfunctionology/blob/master/demo.ipynb .
D. Run in a standalone installation of the SageMath distribution (no conda)
Install the SageMath distribution:
Either from source from http://www.sagemath.org/
or with a binary from http://www.sagemath.org/
The SageMath distribution brings its own installation of Python and many packages.
Clone the GitHub repository https://github.com/mkoeppe/cutgeneratingfunctionology.git:
git clone https://github.com/mkoeppe/cutgeneratingfunctionology.git cd cutgeneratingfunctionology
(Optional:) Install optional SageMath distribution packages:
sage -i lrslib pynormaliz
Install the cutgeneratingfunctionology package using pip:
sage -pip install .
Start SageMath. You can either use the terminal (IPython):
sage
or a Jupyter notebook:
sage -n jupyter
At the Sage prompt, type:
import cutgeneratingfunctionology.igp as igp; from cutgeneratingfunctionology.igp import *
Follow the instructions and examples in https://github.com/mkoeppe/cutgeneratingfunctionology/blob/master/demo.rst or https://github.com/mkoeppe/cutgeneratingfunctionology/blob/master/demo.ipynb .
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for cutgeneratingfunctionology-1.5.2.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3603cee91742a47b7d413eb0df04df2142c697d9ad30d3b6675b6b322d3cf357 |
|
MD5 | 6d0a9b87d949f376a912a1d377f71a2d |
|
BLAKE2b-256 | 2dcb29710f99c7bceddad43a087bad0de2ac84ea0235600313515ff2f239a73d |
Hashes for cutgeneratingfunctionology-1.5.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 78b2f9bc6c92685ece96d8503437878de8f6e5d4144a2a47738406e8d5a09581 |
|
MD5 | caad1e0cd7b396a128b00797e879ec18 |
|
BLAKE2b-256 | f8bdb1cacd49a0bdc28be3b9d46e030cab0073b5da35041616c7504b186199d6 |