Skip to main content

A package for studying regular sectional curvature of one relator groups

Project description

One Relator Curvature

About

This project provides an api for studying regular sectional curvature of one-relator groups.

Installation

pip install one-relator-curvature

Usage

There are two different ways of using the project, either through a collection of command line exposed functions, or as an imported python module

CLI

Some function are exposed as command line tools.

  • solve_example
  • solve_examples
  • get_all_cycle_data
  • get_polytope
  • get_polytopes

Example Usage

Using cli script

For solving all results in te given word range, this command stores database files in the output directory.

one-relator-curvature solve_examples --output-dir /home/$USER/generated_examples --word-size-range 10 11

To export polytope for a given word. Stores json for polytope in output directory

one-relator-curvature get_polytope --word BabbAba -output-dir /home/$USER/polytope_examples

To export polytopes for cycles of a given word. Stores json for polytope in output directory

one-relator-curvature get_polytope --word BabbAba -output-dir /home/$USER/polytope_examples --cycles

Importing as Python Module

from one_relator_curvature.example import Example
import matplotlib.pyplot as plt

example = Example("Babba")
example.generate_inequalities()
example.solve()
example.plot()
plt.show()

Importing Polytopes into Polymake

The following code can be run as a polymake script passing the directory of any polytopes output by the commands get_polytope and get_polytopes


use JSON::Parse 'json_file_to_perl';
use JSON;
use Path::Class;
use application 'polytope';

sub read_inequalities_json {
  my $inequalities_file = $_[0];
  my $inequalities = json_file_to_perl ($inequalities_file);
  my $regions_inequalities = $inequalities->{"regions_inequalities"};
  my $links_inequalities = $inequalities->{"links_inequalities"};
  my $all_inequalities = ();

  push(@$all_inequalities, @$regions_inequalities);
  push(@$all_inequalities, @$links_inequalities);

  my $word_polytopes = {"regions" => new Polytope(INEQUALITIES=>$regions_inequalities),
            "links" => new Polytope(INEQUALITIES=>$links_inequalities),
            "intersection" => new Polytope(INEQUALITIES=>$all_inequalities)};

  return $word_polytopes;
}

sub main {
  my $polytopes_dir = dir($ARGV[0]);

  for my $polytope_file ($polytopes_dir->children) {
    my $word_polytopes = read_inequalities_json($polytope_file);
    my $intersection_polytope = $word_polytopes->{"intersection"};
    my $polytope_dim = $intersection_polytope->DIM;

    print "$polytope_file intersection polytope dimension $polytope_dim \n";
  }
}

main()

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

one-relator-curvature-0.3.3.tar.gz (23.1 kB view details)

Uploaded Source

Built Distribution

one_relator_curvature-0.3.3-py3-none-any.whl (30.0 kB view details)

Uploaded Python 3

File details

Details for the file one-relator-curvature-0.3.3.tar.gz.

File metadata

  • Download URL: one-relator-curvature-0.3.3.tar.gz
  • Upload date:
  • Size: 23.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/3.10.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.7.8

File hashes

Hashes for one-relator-curvature-0.3.3.tar.gz
Algorithm Hash digest
SHA256 dbb2c8bc15bf9fd019b79276d634ebb2fc95482fb2fc0485eb3242f77b481425
MD5 ce745f40f85e073cc0229adf4707d8f9
BLAKE2b-256 20dabd77085179d6d1b46eaa8db926e4dab7c7596f33be0e64b83fdfa85bb0da

See more details on using hashes here.

File details

Details for the file one_relator_curvature-0.3.3-py3-none-any.whl.

File metadata

  • Download URL: one_relator_curvature-0.3.3-py3-none-any.whl
  • Upload date:
  • Size: 30.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/3.10.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.7.8

File hashes

Hashes for one_relator_curvature-0.3.3-py3-none-any.whl
Algorithm Hash digest
SHA256 9c20952f3730ce4baa5d69c8075e4657fdb579a82a6027717e2a6ced69ad05e7
MD5 d14a8d6b2b0d38b8949954b920a8da1c
BLAKE2b-256 a792cbc1d73f6e3bf5defe9f66a6beda4500744d27672deba07265fb7cf99fd4

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page