Expand description
lcdm/src/lib.rs
ΛCDM-Rust Main Facade
§ΛCDM-Rust
A high-precision, high-performance cosmology engine written in Rust.
This crate (lcdm) acts as a single entry point (facade) that re-exports the
most commonly used components and provides a convenient prelude.
§Usage
use lcdm::prelude::*;
// 1) Build a cosmology using the builder API.
let cosmo = CosmoBuilder::new()
.flat()
.h(0.7)
.Omega_m(0.3)
.neutrino_effective(3.046, vec![0.0])
.build()
.unwrap();
// Create the background cosmology model from the built parameter set.
let model = Cosmology::new(cosmo);
// 2) Compute a distance observable (luminosity distance) at z = 1.
let d_L = model.luminosity_distance(Redshift(1.0)).unwrap();
println!("Luminosity Distance at z=1: {} Mpc", d_L.0);Re-exports§
pub use lcdm_core as core;pub use lcdm_background as background;pub use lcdm_lss as lss;pub use lcdm_boltzmann as boltzmann;