iterative_solvers/
lib.rs

1#![doc = include_str!(concat!(env!("CARGO_MANIFEST_DIR"), "/README.md"))]
2//!
3//! ## Features
4//!
5//! This crate supports three different linear algebra backends through feature flags:
6//!
7//! ### `nalgebra` feature (default)
8//!
9//! Uses the [nalgebra](https://docs.rs/nalgebra) crate for matrix operations.
10//! This is the traditional and widely-used linear algebra library in Rust.
11//!
12//! ```toml
13//! [dependencies]
14//! iterative-solvers = "0.2"
15//! ```
16//!
17//! ### `faer` feature
18//!
19//! Uses the [faer](https://docs.rs/faer) crate for matrix operations.
20//! This is a newer, high-performance linear algebra library.
21//!
22//! ```toml
23//! [dependencies]
24//! iterative-solvers = { version = "0.2", default-features = false, features = ["faer"] }
25//! ```
26//!
27//! ### `ndarray` feature
28//!
29//! Uses the [ndarray](https://docs.rs/ndarray) crate for matrix operations.
30//!
31//! ```toml
32//! [dependencies]
33//! iterative-solvers = { version = "0.2", default-features = false, features = ["ndarray"] }
34//! ```
35//!
36//! ### Using Different Features
37//!
38//! Each function in this crate provides examples for all backends.
39//! Look for sections marked:
40//! - **"With nalgebra feature:"** - Examples using nalgebra matrices
41//! - **"With faer feature:"** - Examples using faer matrices
42//! - **"With ndarray feature:"** - Examples using ndarray matrices
43//!
44//!
45//! ### Current Documentation
46//!
47#![cfg_attr(
48    feature = "nalgebra",
49    doc = "This documentation was generated with the `nalgebra` feature enabled."
50)]
51#![cfg_attr(
52    feature = "faer",
53    doc = "This documentation was generated with the `faer` feature enabled."
54)]
55#![cfg_attr(
56    feature = "ndarray",
57    doc = "This documentation was generated with the `ndarray` feature enabled."
58)]
59//!
60//! **Note**: The features are mutually exclusive - you can only use one at a time.
61
62pub mod error;
63pub use error::*;
64
65pub mod cg;
66pub use cg::*;
67
68pub mod utils;
69
70pub mod ops;
71pub use ops::*;
72
73#[cfg(feature = "ndarray")]
74extern crate blas_src;