Space Crate
A Rust library providing mathematical structures and operations for topological spaces, simplicial complexes, and graphs. This crate is designed to support computational topology and geometry applications.
Features
-
Topological Spaces: Implementation of fundamental topological concepts
- Sets with basic operations (union, intersection, difference)
- Topological spaces with neighborhoods and open sets
- Metric spaces with distance functions
- Normed and inner product spaces
-
Simplicial Complexes: Tools for working with simplicial complexes
- Simplex representation (points, edges, triangles, etc.)
- Chain complexes with boundary operations
- Support for arbitrary coefficient rings
-
Graph Theory: Flexible graph data structures
- Support for both directed and undirected graphs
- Basic graph operations and set operations
- Vertex and edge point representation
Usage
Topological Spaces
use ;
// Define your own space type
Simplicial Complexes
use ;
// Create a simplex (e.g., a triangle)
let triangle = new;
// Create a simplicial complex
let mut complex = new;
complex.join_element;
Graphs
use ;
use HashSet;
// Create a graph
let mut vertices = new;
vertices.insert;
vertices.insert;
let mut edges = new;
edges.insert;
let graph = new;