https://github.com/fl03/smplx
This crate is designed to be a topological toolkit for working with simplices in Rust.
https://github.com/fl03/smplx
crates-io mathematics rust-lang simplex topology
Last synced: about 2 months ago
JSON representation
This crate is designed to be a topological toolkit for working with simplices in Rust.
- Host: GitHub
- URL: https://github.com/fl03/smplx
- Owner: FL03
- License: apache-2.0
- Created: 2024-07-24T14:45:41.000Z (10 months ago)
- Default Branch: main
- Last Pushed: 2025-02-23T22:51:08.000Z (3 months ago)
- Last Synced: 2025-03-18T05:43:59.442Z (2 months ago)
- Topics: crates-io, mathematics, rust-lang, simplex, topology
- Language: Rust
- Homepage: https://crates.io/crates/smplx
- Size: 80.1 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- License: LICENSE
- Security: SECURITY.md
Awesome Lists containing this project
README
# smplx
[](https://crates.io/crates/smplx)
[](https://docs.rs/smplx)
[](https://crates.io/crates/smplx)[](https://github.com/FL03/smplx/actions/workflows/clippy.yml)
[](https://github.com/FL03/smplx/actions/workflows/rust.yml)***
_**The library is currently in the early stages of development and is not yet ready for production use.**_
Welcome to smplx, a topologically oriented crate focused on simplexes and their complexes.
## Features
- [x] Simplex
## Background
A simplex describes the smallest (and simplest) polytope in any dimension. More specifically, $n$-simplex $\Delta^n$ is defined to be the $n$-dimensional polytope formed from the convex hull $C$ of its $n+1$ verices where the vertices are affinely independent points $u_0, u_1, \ldots, u_n \in \mathbb{R}^n$.
$C = \biggl\{ \sum_{i=0}^{k} \lambda_i v_i : \lambda_i\geq{0} \text{ for all } j \text{ and }\sum_{i=0}^{k} \lambda_i = 1 \biggr\}$
## Getting Started
### Building from the source
Start by cloning the repository
```bash
git clone https://github.com/FL03/smplx.git
cd smplx
```#### _Build the workspace_
```bash
cargo build --all-features -r --workspace
```#### _Run an exmple_
```bash
cargo run -p smplx --example {basic|complex|...|etc.}
```## Usage
Add this to your `Cargo.toml`:
```toml
[dependencies.smplx]
features = ["full"]
version = "0.0.1"
```### Examples
#### _Simplex_
```rust
extern crate smplx;use smplx::Simplex;
fn main() -> Result<(), Box> {
tracing_subscriber::fmt::init();
tracing::info!("Welcome to smplx!");let simplex = Simplex::new().dim(2).with_vertices([0, 1, 2]).build()?;
Ok(())
}
```## Contributing
Pull requests are welcome. For major changes, please open an issue first
to discuss what you would like to change.Please make sure to update tests as appropriate.