Thanks to visit codestin.com
Credit goes to github.com

Skip to content

a-zh/cayleypy

 
 

Repository files navigation

CaleyPy

Library for studying Cayley graphs and Schreier coset graphs.

Overview

This is a library for studying Schreier coset graphs and Caley graphs.

This what we plan to support:

  • BFS from given state (growth function, adjacency matrix, last layers).
  • Efficient path finding (beam search).
  • Random walk generation.
  • Library of graphs and generators (LRX, TopSpin, Rubik Cubes, wreath, globe etc., see here).
  • Efficient computing on CPU, GPU, TPU (with JAX), usable on Kaggle.
  • Library of datasets with solutions to some problems (e.g. growth functions like here).

Usage

See this demo Kaggle notebook for examples on how this library can be used.

Development

To start development, run:

git clone https://github.com/cayleypy/cayleypy.git
cd cayleypy
pip install -r requirements.txt
pip install -r requirements-dev.txt

To run only quick tests:

FAST=1 pytest

Before commiting, run these checks:

./lint.sh
pytest 

To check coverage, run:

coverage run -m pytest && coverage html

Formatting

This repository uses the Black formatter. If you are getting error saying that some files "would be reformatted", you need to format your code using Black. There are few convenient ways to do that:

  • From command line: run black .
  • In PyCharm: go to Setting>Tools>Black, and check "Use Black formatter": "On code reformat" (then it will run on Ctrl+Alt+L), or "On save", or both.
  • In Visual Studio code: install the Black Formatter extension, then use Ctrl+Shift+I to format code. If you are asked to configure default formatter, pick the Black formatter.

Credits

The initial code for this library is based on cayleypy by Ivan Koltsov, which is itself based on code by Alexander Chervov and Kirill Khoruzhii.

Also, code from the following Kaggle notebooks was used:

About

Library for studying Cayley graphs and Schreier coset graphs

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 99.8%
  • Shell 0.2%