Skip to main content

calculator for cluster algebras

Project description

cluster algebra calculator

This library provides a calculator for cluster algebras. Especially it is useful for calculating algebraic relations and visualizing quivers

requirements

  • python >= 3.8
  • sympy
  • pandas

Installation

pip install cluster_algebra

Usage

from cluster_algebra import *

q = Quiver(vertices=range(14), 
	clusters=[(1, 13), (2, 13), (2, 12), (2, 11), (2, 10), (3, 10), (4, 10), (5, 10), (5, 9), (6, 9), (6, 8)], 
	laminations=[
	# [(0, 8)], 
	# [(4, 12)]
], is_principal=True)

Create a quiver (with vertices from 0 to 13) and make triangulations as clusters. When adding laminations, you can use indices (first 0 means the frozen edge 0-1, second 8 means frozen edge 8-9). If is_principal is True, same number of principal laminations will be added before than you added manually.

After creating a quiver instance, you can

  • flip some variables,
q.flip(edge=(3, 10))
# or
q.flip(index=3)
  • get exchange matrix,
q.get_exchange_matrix()
  • express target variable,
from IPython.display import display, Math

q2 = q.express_target()

for rel in q2.relations:
    display(Math(rel._repr_latex_()))

for rel in q2.expressions:
    display(Math(rel._repr_latex_()))
  • plotting polygon with Plotter
from math import pi

p = Plotter()

p.plot_quiver(q, rotation=pi, lamination_label_pos=0.7)

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

cluster_algebra-0.1.2.tar.gz (5.9 kB view details)

Uploaded Source

File details

Details for the file cluster_algebra-0.1.2.tar.gz.

File metadata

  • Download URL: cluster_algebra-0.1.2.tar.gz
  • Upload date:
  • Size: 5.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.9.7

File hashes

Hashes for cluster_algebra-0.1.2.tar.gz
Algorithm Hash digest
SHA256 bdc0c88ab207339e7e07022bb1a10a626c8c788b7ba5715af1e5885f088ae20b
MD5 1ae7049f1cb9d1cc0c9421d5a747ba88
BLAKE2b-256 9e8699a3959d443d0f321462ad49110ed4d3eef83085e7822efb594e5d90257f

See more details on using hashes here.

Supported by

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