Skip to main content

Module prelude

Module prelude 

Source
Expand description

Common imports for ergonomic usage.

This prelude re-exports the primary types and common constants: Matrix, DeterminantWithErrorBound, Interval, IntervalMatrix, IntervalDeterminantSign, ScalarWithErrorBound, Vector, Lu, Ldlt, Tolerance, and LaError. It also includes gram_matrix for constructing a symmetric matrix of pairwise vector inner products. Its typed error categories include ArithmeticOperation, FactorizationKind, IntervalBound, IntervalOperand, InvalidToleranceReason, NonFiniteLocation, NonFiniteOrigin, PositiveSemidefiniteViolation, SingularityReason, and UnrepresentableReason. It also re-exports DEFAULT_SINGULAR_TOL, MAX_STACK_MATRIX_DISPATCH_DIM, MAX_INTERVAL_MATRIX_DIM, try_with_stack_matrix!, and try_with_interval_matrix! for runtime-to-const matrix dispatch. Advanced custom-filter code should import ERR_COEFF_2, ERR_COEFF_3, and ERR_COEFF_4 explicitly from the crate root; those raw coefficients intentionally stay out of the prelude.

When the exact feature is enabled, RationalMatrix, RationalVector, DeterminantSign, ExactF64Conversion, BigInt, and BigRational are also re-exported, together with MAX_RATIONAL_MATRIX_DISPATCH_DIM and try_with_rational_matrix! for runtime-to-const exact-matrix dispatch. ExactF64Conversion converts an already-computed exact determinant or solution under either the strict or explicitly rounded binary64 contract, without repeating exact elimination. The number types let callers construct expected exact values without adding num-bigint / num-rational to their own dependencies. The most commonly needed num-traits items are re-exported alongside them: FromPrimitive for BigRational::from_f64 / from_i64, ToPrimitive for BigRational::to_f64 / to_i64, and Signed for is_positive / is_negative / abs.

Re-exports§

pub use crate::ArithmeticOperation;
pub use crate::DEFAULT_SINGULAR_TOL;
pub use crate::DeterminantWithErrorBound;
pub use crate::FactorizationKind;
pub use crate::Interval;
pub use crate::IntervalBound;
pub use crate::IntervalDeterminantSign;
pub use crate::IntervalMatrix;
pub use crate::IntervalOperand;
pub use crate::InvalidToleranceReason;
pub use crate::LaError;
pub use crate::Ldlt;
pub use crate::Lu;
pub use crate::MAX_INTERVAL_MATRIX_DIM;
pub use crate::MAX_STACK_MATRIX_DISPATCH_DIM;
pub use crate::Matrix;
pub use crate::NonFiniteLocation;
pub use crate::NonFiniteOrigin;
pub use crate::PositiveSemidefiniteViolation;
pub use crate::ScalarWithErrorBound;
pub use crate::SingularityReason;
pub use crate::Tolerance;
pub use crate::UnrepresentableReason;
pub use crate::Vector;
pub use crate::gram_matrix;
pub use crate::DeterminantSign;exact
pub use crate::ExactF64Conversion;exact
pub use crate::MAX_RATIONAL_MATRIX_DISPATCH_DIM;exact
pub use crate::RationalMatrix;exact
pub use crate::RationalVector;exact

Macros§

try_with_interval_matrix
Fallibly dispatch a runtime dimension to a concrete interval matrix.
try_with_rational_matrixexact
Fallibly dispatch a runtime dimension to a concrete exact rational matrix.
try_with_stack_matrix
Fallibly dispatch a runtime dimension to a concrete stack-allocated matrix.

Structs§

BigIntexact
A big signed integer type.

Traits§

FromPrimitiveexact
A generic trait for converting a number to a value.
Signedexact
Useful functions for signed numbers (i.e. numbers that can be negative).
ToPrimitiveexact
A generic trait for converting a value to a number.

Type Aliases§

BigRationalexact
Alias for arbitrary precision rationals.