1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155
//! Do not disturbed. Just use. //! //! # Philosophy //! //! For complicated computations like as physics, statistics and etc, too many options of library disturbes theory. //! Many computations where numerical algorithms are not very critical do not require many options. //! L2 norm is enough, and what integration algorithms you use is not important. //! `prelude` makes you free. //! //! # Usage //! //! ```ignore //! #[macro_use] //! extern crate peroxide; //! use peroxide::prelude::*; //! //! // Then you can use almost everything in peroxide. //! ``` //! //! # Compare with `fuga` //! //! * Norm //! ``` //! #[macro_use] //! extern crate peroxide; //! use peroxide::prelude::*; //! //! fn main() { //! let a = c!(1, 2, 3); //! let l2 = a.norm(); // L2 is default vector norm //! //! assert_eq!(l2, 14f64.sqrt()); //! } //! ``` //! //! ``` //! #[macro_use] //! extern crate peroxide; //! use peroxide::fuga::*; //! //! fn main() { //! let a = c!(1, 2, 3); //! let l2 = a.norm(Norm::L2); //! assert_eq!(l2, 14f64.sqrt()); //! } //! ``` //! //! * Numerical integration //! //! ``` //! #[macro_use] //! extern crate peroxide; //! use peroxide::prelude::*; //! use std::f64::consts::PI; //! //! fn main() { //! let sin = |x: f64| x.sin(); //! integrate(sin, (0f64, PI)).print(); //! // Default integration = GaussLegendre(15) //! } //! ``` //! //! ``` //! #[macro_use] //! extern crate peroxide; //! use peroxide::fuga::*; //! use std::f64::consts::PI; //! //! fn main() { //! let sin = |x: f64| x.sin(); //! integrate(sin, (0f64, PI), GaussLegendre(15)).print(); //! } //! ``` //! //! * Solve //! //! ``` //! #[macro_use] //! extern crate peroxide; //! use peroxide::fuga::*; //! //! fn main() { //! let a = ml_matrix("1 2;3 4"); //! let b = c!(3, 7); //! a.solve(&b, LU).print(); // [1, 1] //! a.solve(&b, WAZ).print(); // [1, 1] //! } //! ``` //! //! ``` //! #[macro_use] //! extern crate peroxide; //! use peroxide::prelude::*; //! //! fn main() { //! let a = ml_matrix("1 2;3 4"); //! let b = c!(3, 7); //! // Prelude can only solve with LU //! a.solve(&b).print(); // [1, 1] //! } //! ``` #[allow(unused_imports)] pub use crate::macros::{julia_macro::*, matlab_macro::*, r_macro::*}; pub mod simpler; pub use crate::traits::{ fp::{FPMatrix, FPVector}, general::Algorithm, math::{InnerProduct, LinearOp, MatrixProduct, Vector, VectorProduct}, mutable::{MutFP, MutMatrix}, num::{ExpLogOps, PowOps, Real, TrigOps}, pointer::{MatrixPtr, Oxide, Redox, RedoxCommon}, sugar::{Scalable, ScalableMut, VecOps, ConvToMat}, }; pub use simpler::SimpleNorm; #[allow(unused_imports)] pub use crate::structure::{ ad::*, ad::AD::*, matrix::{ combine, diag, gemm, gemv, gen_householder, inv_l, inv_u, matrix, ml_matrix, py_matrix, r_matrix, Col, Matrix, Row, Shape, PQLU, QR, WAZD, }, polynomial::*, vector::*, dataframe::*, }; pub use simpler::{solve, SimplerLinearAlgebra}; #[allow(unused_imports)] pub use crate::util::{api::*, low_level::*, non_macro::*, print::*, useful::*, wrapper::*}; #[allow(unused_imports)] pub use crate::statistics::{dist::*, ops::*, rand::*, stat::*}; #[allow(unused_imports)] pub use crate::special::function::*; #[allow(unused_imports)] pub use crate::numerical::{ eigen::Eigen, interp::*, ode::*, optimize::*, root::{bisection, false_position, newton, secant}, spline::*, utils::*, }; pub use simpler::{eigen, integrate};