Download rust/crates/hyperkitty-jordan/src/lib.rs from Snapkitty/hyperkitty-constraint-dsl: direct link, hf CLI and curl.
- Browser
- Download file 727 Bytes
-
https://huggingface.co/Snapkitty/hyperkitty-constraint-dsl/resolve/main/rust/crates/hyperkitty-jordan/src/lib.rs
- Command line
-
hf download hf://Snapkitty/hyperkitty-constraint-dsl/rust/crates/hyperkitty-jordan/src/lib.rs
-
curl -L -o lib.rs https://huggingface.co/Snapkitty/hyperkitty-constraint-dsl/resolve/main/rust/crates/hyperkitty-jordan/src/lib.rs
727 Bytes
| pub mod spin_factor; | |
| pub mod idempotent; | |
| pub mod density; | |
| pub mod topology; | |
| pub mod convergence; | |
| pub use spin_factor::SpinFactor; | |
| pub use idempotent::PrimitiveIdempotents; | |
| pub use density::DensityMatrix; | |
| pub use topology::{Topology, find_best_topology}; | |
| pub use convergence::ConvergenceTrace; | |
| use hyperkitty_core::{GOLDEN_RATIO_INV, GOLDEN_RATIO_INV_SQ, float_eq}; | |
| pub fn validate_coefficient_invariants() -> bool { | |
| float_eq(GOLDEN_RATIO_INV + GOLDEN_RATIO_INV_SQ, 1.0, 1e-15) | |
| && float_eq(GOLDEN_RATIO_INV_SQ, GOLDEN_RATIO_INV * GOLDEN_RATIO_INV, 1e-15) | |
| } | |
| mod tests { | |
| use super::*; | |
| fn coefficient_invariants_hold() { | |
| assert!(validate_coefficient_invariants()); | |
| } | |
| } | |