DOC: Add example for `has_stopped`
//! }
//! ```
//!
-//! If plotting pickle data with python, then
+//! ### Simple 1D Runge-Kutta
//!
-//! ![Lorenz with Euler](https://raw.githubusercontent.com/Axect/Peroxide/master/example_data/lorenz_euler.png)
+//! $$\begin{gathered} \frac{dy}{dx} = \frac{5x^2 - y}{e^{x+y}} \\\ y(0) = 1 \end{gathered}$$
//!
-//! ![Lorenz with RK4](https://raw.githubusercontent.com/Axect/Peroxide/master/example_data/lorenz_rk4.png)
+//! ```rust
+//! #[macro_use]
+//! extern crate peroxide;
+//! use peroxide::fuga::*;
//!
-//! ![Lorenz with GL4](https://raw.githubusercontent.com/Axect/Peroxide/master/example_data/lorenz_gl4.png)
+//! fn main() {
+//! let init_state = State::<f64>::new(0f64, c!(1), c!(0));
//!
-//! ### Simple 1D Runge-Kutta
+//! let mut ode_solver = ExplicitODE::new(test_fn);
//!
-//! $$\begin{gathered} \frac{dy}{dx} = \frac{5x^2 - y}{e^{x+y}} \\\ y(0) = 1 \end{gathered}$$
+//! ode_solver
+//! .set_method(ExMethod::RK4)
+//! .set_initial_condition(init_state)
+//! .set_step_size(0.01)
+//! .set_times(1000);
+//!
+//! let result = ode_solver.integrate();
+//!
+//! // Plot or Extract..
+//! }
+//!
+//! fn test_fn(st: &mut State<f64>, _: &NoEnv) {
+//! let x = st.param;
+//! let y = &st.value;
+//! let dy = &mut st.deriv;
+//! dy[0] = (5f64 * x.powi(2) - y[0]) / (x + y[0]).exp();
+//! }
+//! ```
+//!
+//! ### With stop condition
//!
//! ```rust
//! #[macro_use]
//! .set_method(ExMethod::RK4)
//! .set_initial_condition(init_state)
//! .set_step_size(0.01)
+//! .set_stop_condition(stop) // Add stop condition
//! .set_times(1000);
//!
//! let result = ode_solver.integrate();
+//! if ode_solver.has_stopped() {
+//! println!("It reached to stop condition");
+//! } else {
+//! println!("It didn't reach to stop condition");
+//! }
//!
//! // Plot or Extract..
//! }
//! let dy = &mut st.deriv;
//! dy[0] = (5f64 * x.powi(2) - y[0]) / (x + y[0]).exp();
//! }
+//!
+//! fn stop<E: Environment>(st: &ExplicitODE<E>) -> bool {
+//! let y = &st.get_state().value[0];
+//! (*y - 2.4).abs() < 0.01
+//! }
//! ```
use self::BoundaryCondition::Dirichlet;
