npm package: @kikoqiu/groups.js
Description: This project provides a high-performance JavaScript library for computational group theory, focusing on permutation groups. It offers efficient data structures and algorithms for handling permutations, performing group operations, analyzing group structur
Author: qiu.kiko@gmail.com
Latest version: 0.1.2

# Permutation Group Theory Engine for JavaScript

This project provides a high-performance JavaScript library for computational group theory, focusing on permutation groups. It offers efficient data structures and algorithms for handling permutations, performing group operations, analyzing group structure, and generating data for visualization.

##  Features

*   **High-Performance Permutation Handling**: Optimized `PermutationRepository` for efficient storage and retrieval of unique permutations using a Trie-like structure and `Int32Array` for zero-copy views.
*   **Permutation Set Operations**: `PermutationSet` for representing collections of permutations, supporting core algebraic operations (multiplication, inverse) and set operations (union, intersection, difference).
*   **Schreier-Sims Algorithm (SSA)**: Robust implementation for computing Base and Strong Generating Sets (BSGS), membership testing, order calculation, and stabilizer subgroups.
*   **Group Structural Analysis**: Functions to check subgroup and normality, compute normal closures, commutator subgroups, lower central series, and determine properties like solvability and nilpotency.
*   **Standard Group Generators**: Factory methods for generating common groups such as Symmetric ($S_n$), Alternating ($A_n$), Cyclic ($C_n$), Dihedral ($D_n$), Klein Four ($V_4$), and Quaternion ($Q_8$) groups.
*   **Visualization Utilities**: Tools for generating human-readable names for group elements, creating Cayley multiplication tables (with HTML output), and preparing Cayley graph data for 3D plotting (e.g., with Plotly).
*   **Memory Efficiency**: Designed with `Int32Array` and optimized algorithms to reduce garbage collection overhead and improve performance.

##  Installation

Assuming you have Node.js and npm/yarn installed:

```bash
npm i @kikoqiu/groups.js
# or
yarn add @kikoqiu/groups.js
```

If you are running this project locally, you can clone the repository:

```bash
git clone https://github.com/kikoqiu/groups.js.git
cd groups.js
npm install
```

##  Usage

[HERE](https://kikoqiu.github.io/jslab/jslab.html?zcode=pVbbbttGEH3nVwyEAF4GqmRLdB8iCAUhI26AuDXCIC-u4azJkbjwcpfYXTpVFf17sBdS1MVOiz4RXM6cOXPmshyPYaGQGgQKt6iqxlDDpMjQwFLJClYoUFEjlY5yKbSBbPqwQqFhDislm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ORWLR4Fv0A)  are some examples of how to use the library.

## API Reference

Detailed API documentation can be generated from the [JSDoc](https://kikoqiu.github.io/groups.js) comments within the source code. You can use tools like JSDoc to create comprehensive documentation.

## Contributing

Contributions are welcome! Please feel free to open issues or submit pull requests.

## License

This project is licensed under the [MIT License](LICENSE).