Added a prelude
This commit is contained in:
@@ -34,10 +34,7 @@ For now, here is a simple example of using the propagator to solve a simple syst
|
||||
|
||||
```rust
|
||||
use nalgebra::Vector3;
|
||||
use differential_equations::integrator::dormand_prince::DormandPrince45;
|
||||
use differential_equations::controller::PIController;
|
||||
use differential_equations::callback::stop;
|
||||
use differential_equations::problem::*;
|
||||
use differential_equations::prelude::*;
|
||||
|
||||
// Define the system (parameters, derivative, and initial state)
|
||||
type Params = (f64, bool);
|
||||
|
||||
13
src/lib.rs
13
src/lib.rs
@@ -6,16 +6,19 @@ pub mod controller;
|
||||
pub mod callback;
|
||||
pub mod problem;
|
||||
|
||||
pub mod prelude {
|
||||
pub use super::ode::ODE;
|
||||
pub use super::integrator::dormand_prince::DormandPrince45;
|
||||
pub use super::controller::PIController;
|
||||
pub use super::callback::{Callback, stop};
|
||||
pub use super::problem::{Problem, Solution};
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use nalgebra::{Vector3, Vector6};
|
||||
use approx::assert_relative_eq;
|
||||
use crate::integrator::dormand_prince::DormandPrince45;
|
||||
use crate::controller::PIController;
|
||||
use crate::callback::{Callback, stop};
|
||||
use crate::ode::ODE;
|
||||
use crate::problem::Problem;
|
||||
use crate::prelude::*;
|
||||
use std::f64::consts::PI;
|
||||
|
||||
#[test]
|
||||
|
||||
Reference in New Issue
Block a user