//! # Dynamical Triangulation
//! Dynamical Triangulation (DT) in Rust.
//!
//! The `dyntri-core` crate aims to form a base and provide standard triangulation
//! and graph structures, which DT generators can use to provide interoperability
//! and make use of the provided observables.
//! Currently, this crate only provides 2D functionality, but the goals is to provide
//! 3D and 4D structures as well in the near future.
//!
//! ## Triangulation Generators
//! Currently, there are two companion crates [`dyntri-edt2d`](https://crates.io/crates/dyntri-edt2d)
//! and [`dyntri-cdt2d`](https://crates.io/crates/dyntri-cdt2d) that provide implementations
//! of 2D Euclidean and Causal Dynamical Triangulation (EDT/CDT) generators respectively.
//!
//! ## Using the crate
//! The central structures of this crate are the [Triangulation2D](triangulation::triangulation2d::Triangulation2D)
//! and [CausalTriangulation2D](triangulation::causal_triangulation2d::CausalTriangulation2D), providing
//! the base functionality to work with triangulations.
//!
//! Additionally, there is the [Graph](graph::Graph) structure, which provides a standard graph
//! implementation. This [Graph](graph::Graph) implements most of the interesting
//! [quantities/observables](graph::observables), like the sphere volume profile and the
//! average sphere distance, as well as many breadth-first search functions that can be used
//! for many distance based measurements like correlations.
//!
//! ## Example of use
//! Here is an example using the [`dyntri-edt2d`](https://crates.io/crates/dyntri-edt2d)
//! generator. Crucially a [Triangulation2D](triangulation::triangulation2d::Triangulation2D)
//! `triangulation` is constructed, which can then be used to perform any measurement one would like.
//! ```
//! use dyntri_edt2d::generator::random_uniform_triangulation;
//! use dyntri_core::graph::observables::asd;
//! # use rand::SeedableRng;
//! use rand_xoshiro::Xoshiro256StarStar;
//!
//! // Create RNG
//! let mut rng = Xoshiro256StarStar::seed_from_u64(42);
//!
//! // Generate an 2D EDT triangulation using direct sampling (as [`PlanarMap`])
//! let planar_map = random_uniform_triangulation(1000, &mut rng);
//! // Construct triangulation
//! let triangulation = planar_map.construct_triangulation();
//! // Check the Euler characteristic formula for spherical topology
//! assert_eq!(triangulation.num_vertices(), 1000 / 2 + 2);
//!
//! // Get the vertex graph of the triangulation
//! let graph = triangulation.vertex_graph();
//! // Measure the average sphere distance (epsilon=0)
//! let asd = asd::asd(&graph, 0, 10);
//! println!("{:?}", asd);
//! ```
//!
//! ## Implementing custom generator
//! To make use of `dyntri-core` using a custom generator, all one needs to do is implement
//! a function to construct a [Triangulation2D](triangulation::triangulation2d::Triangulation2D) or
//! [CausalTriangulation2D](triangulation::causal_triangulation2d::CausalTriangulation2D) from
//! whatever generator one has.
//! From these all the functionality coming from this crate is available.
//! If so desired one can also directly implement the construction of a [Graph](graph::Graph)
//! from one's generator, which may be more effecient then indirectly constructing it
//! from a triangulation.

pub mod graph;
pub mod triangulation;
#[cfg(feature = "visualization")]
pub mod visualization;
