- Improve numerical stability and domain coverage of
gamma_approxandln_gamma_approx(#105) (Thanks to @jzeuzs)ln_gamma_approxnow applies Euler's reflection formula forz < 0.5, which previously onlygamma_approxdid.- Poles are handled explicitly:
gamma_approxreturnsNaNat negative integers andln_gamma_approxreturns+infat non-positive integers. - The positive-integer fast path accumulates in
f64instead of the integerfactorialhelper, and saturates to+infabovez = 171. - Adds 171 lines of tests covering poles, reflection, integer arguments and large-magnitude inputs.
- Make
ln_gammaexact at small integers andgamma(-0.0)negative infinity (#113)- Integer arguments up to 23 route through the exact factorial path, so
ln_gamma_approx(1.0)andln_gamma_approx(2.0)return exactly0instead of about-1e-11. This matters for callers that subtract two log-gammas of equal argument. gamma_approx(-0.0)returns-infwhilegamma_approx(0.0)returns+inf, matching C99tgammaand SciPy.
- Integer arguments up to 23 route through the exact factorial path, so
- Add Russell R P Senthamarai to
CITATION.cffand the manuscript author list. The manuscript andCITATION.cffnow list the same eight named authors in the same order with matching ORCIDs. - Use a single SPDX identifier for the
CITATION.cfflicensefield.MIT OR Apache-2.0is an SPDX expression, which the Citation File Format 1.2.0 schema does not accept. Zenodo validates the file with cffconvert during GitHub release archiving, so the v0.42.0 and v0.43.0 archives failed and never received a DOI. The array form is valid per the CFF spec but Zenodo has rejected it since the InvenioRDM migration (zenodo/zenodo#2515). The crate stays dual-licensed under MIT or Apache-2.0 throughCargo.tomland the twoLICENSE-*files.
- Apply editorial wording fixes to the manuscript (#114) (Thanks to @jbytecode)
- Make the
rand/rand_distrsampling stack optional behind the default-onrandfeature (#88, #104)- Existing default-feature users are unchanged.
default-features = falsenow provides a deterministic core without RNG dependencies; sampling APIs require therandfeature.- This is a breaking change for users who already disabled default features and relied on sampling APIs.
- Add the
Dirichlet(α)probability distribution (#95) - Add
O3-openblas-systemfor linking a system-installed OpenBLAS throughpkg-config(#98, #107)
- Clarify BLAS/LAPACK backend selection, OpenBLAS source versus system builds, TLS prerequisites, and HDF5 constraints (#98)
- Remove the stale
Peroxide_BLASsetup link from the main README; the archived repository is retained for historical reference - Replace the hand-maintained source-layout table with module-level docs.rs pointers and improve module descriptions (#99, #108)
- Add cargo-hack coverage for individual features and pairwise pure-Rust feature combinations (#98)
- Add dedicated CI coverage for system/source OpenBLAS, no-rand
wasm32, plotting, formatting, and clippy
- Encapsulate
Matrix/ComplexMatrixfields to fix a soundness hole (#101, 2874984)- Safe code could set
row/col/datadirectly and reach heap out-of-bounds reads and writes through the internal raw-pointer and BLAS paths - Fields are now private and the
matrix()/cmatrix()constructors assertdata.len() == row * col - Migration guide:
m.row->m.nrow()m.col->m.ncol()m.shape->m.layout()m.data->m.as_slice()/m.as_mut_slice()/m.into_vec()Matrix { data, row, col, shape }literal ->matrix(data, row, col, shape)
- Known follow-up:
serde/rkyvdeserialization can still bypass the constructor validation; tracked separately
- Safe code could set
- Fix even-order adaptive Gauss-Kronrod rules (
G10K21/G20K41/G30K61and theirRvariants) never early-exiting (#93, febd4e2)- The Gauss-sum reconstruction assumed the odd-order node layout, so even-order rules produced a corrupted error estimate and always subdivided to
max_iter, even for constant integrands - Integrating a cubic over
[0, 1]withG10K21(1e-8, 20)drops from about 87 ms to about 70 ns
- The Gauss-sum reconstruction assumed the odd-order node layout, so even-order rules produced a corrupted error estimate and always subdivided to
MatrixTrait::shape()returning(usize, usize)(#86, #103 by @ferxades12)Matrix::trace()andComplexMatrix::trace()(#87, 523185d)ComplexMatrix::h(): Hermitian conjugate (conjugate transpose) (#87)ComplexMatrix::real()/imag(): extract the real or imaginary part as a realMatrix(#87)- New accessors on both matrix types:
nrow(),ncol(),layout(),into_vec()(#101)
- Add cargo-hack feature-combinations job: every feature builds alone, plus the pairwise powerset of the pure-Rust features (#98, fcfd012)
- Add a blocking
cargo fmt --all --checkjob and format the files added after #96 (bd36784, ec37e61)
- Promote the Quickstart to the top of
README.md, condense the feature inventory, and trim theCONTRIBUTING.mdsource layout to a directory-level table (#99, 72a9e56) - Document that
O3-accelerateonly builds on Apple targets, with cargo-hack exclusion guidance (#98, 6d99f2f)
- Exclude
paper/from the published crate- JOSS paper sources (
paper.md,paper.bib) live in the git repository for transparency but are not consumed by downstream users of the library and only inflate the.cratefile uploaded to crates.io - No API or source change
- JOSS paper sources (
- Allocate
row_icswith the correctnnzlength inSPMatrix::new(9723fde)
- Add
O3-openblas/O3-netlib/O3-accelerate/O3-intel-mklconvenience features that select the BLAS/LAPACK link backend in one go (#98)
- Restructure
README.md, add quickstart and source layout (#99) - Expand optional feature documentation, document O3 backend selection and HDF5 1.x constraint (#98)
- Point
documentationURL to docs.rs, add Statement of need and examples links to the crate landing page - Fix docs.rs build (#97)
- Expand
CONTRIBUTING.md
- Test optional features in separate jobs (#98)
- Promote
cargo clippy --all-targetsto a blocking job and clear all warnings across crate / tests / examples - Add
examples/clippy_verify.rsdeterminism oracle for the Phase 2 lint refactor
- Strengthen
tests/optimize.rsandtests/integral.rssuites
- Add JOSS paper sources (
paper/paper.md,paper/paper.bib), co-authors, and Acknowledgements - Add citations and trade-off discussion (lapack, ndarray, enzyme, openblas)
- Replace
enum AD { AD0(f64), AD1(f64,f64), AD2(f64,f64,f64) }withstruct Jet<const N: usize> - Normalized Taylor coefficients — all arithmetic uses simple convolution (no binomial coefficients)
- Arbitrary-order forward AD:
Jet<1>,Jet<2>, ...,Jet<10>, etc. - Type aliases:
Dual = Jet<1>,HyperDual = Jet<2> - Direct
sqrtrecurrence (instead ofpowf(0.5))
#[ad_function]now generatesf_ad<const JET_ORDER: usize>(x: Jet<JET_ORDER>) -> Jet<JET_ORDER>— arbitrary-order differentiationad_closure!generatesJet<1>closure
ADtype alias (= Jet<2>),AD0,AD1,AD2constructor functions preservedADFn,ADVec,StableFnimpls preservedRealtrait implemented forJet<2>(viaADalias)
jacobian(),newton(),Optimizerupdated to useJet<1>internallynewton!macro works with new proc macro output
- KaTeX-rendered math in all doc comments (recurrences for exp, ln, sin/cos, sqrt, inverse trig)
- Accuracy plot:
Jet<N>vs finite differences - Taylor convergence plot:
sin(x)polynomial approximation - New examples:
jet_ad.rs,higher_order_ad.rs - Updated examples:
hessian.rs,real_trait_test.rs - 115 new Jet-specific unit tests
| Old (0.40.x) | New (0.41.0) |
|---|---|
AD1(x, dx) |
AD1(x, dx) (still works) or Jet::<1>::var(x) |
AD2(x, dx, ddx) |
AD2(x, dx, ddx) (still works) or Jet::<2>::var(x) |
fn f(x: AD) -> AD |
fn f(x: AD) -> AD (still works) or fn f(x: Jet<2>) -> Jet<2> |
f_ad(x: AD) (macro) |
f_ad::<N>(x: Jet<N>) (now generic) |
Fn(&Vec<AD>) -> Vec<AD> |
Fn(&Vec<AD>) -> Vec<AD> (still works) |
- Add
Serieshelper methodsselect_indices(&self, indices: &[usize]) -> Series: Select elements by indicesto_f64_vec(&self) -> anyhow::Result<Vec<f64>>: Convert numeric Series toVec<f64>
- Add
DataFrameshape & info methodsnrow,ncol,shape,dtypes,is_empty,contains
- Add
DataFramerow operationshead(n),tail(n),slice(offset, length)
- Add
DataFramecolumn operationsselect(columns),rename(old, new),column_names(),select_dtypes(dtypes)
- Add
Seriesstatisticssum,mean,var,sd: Numeric types only, returnsf64min,max: All ordered types, returnsScalarpreserving original type
- Add
DataFramestatisticsdescribe(): count / mean / sd / min / max for numeric columnssum(),mean(): Column-wise aggregation as single-row DataFrame
- Refactor
extract_series_by_indicesintoSeries::select_indices
- Fix numerical instability in RREF (Reduced Row Echelon Form) by comparing to epsilon instead of zero (#90) (Thanks to @developing-human)
- Update
pyo3dependency to 0.27.1 forplotfeature compatibility (#89) (Thanks to @JSorngard) - Fix adaptive step size control exponent for embedded Runge-Kutta methods
- Add
order()method toButcherTableautrait for correct exponent1/(p+1) - BS23:
1/3, RKF45/DP45/TSIT45:1/5, RKF78:1/8
- Add
- Fix misleading comments on RKF78 BU/BE coefficients
- Remove
arrow2dependency - Add
arrowandparquetdependencies - Update
WithParquetimplementation - On user side, there are almost no changes in
DataFrameAPI, but there is one change forfugauser:CompressionOptions->UNCOMPRESSED,SNAPPY,GZIP(level),LZ4,ZSTD(level),BROTLI(level),LZO,LZ4_RAW- For
prelude user, there are completely no changes. Default compression isSNAPPY.
- Implement
derivativeandintegralof B-Spline
- Fixed a bug in the adaptive step size control for all embedded Runge-Kutta methods.
- Corrected the
BUcoefficient vector for the 7th order solution in theRKF78implementation.
- Change implementation of Gauss-Legendre 4th order method
- Implement
LogNormaldistributionLogNormal(mu: f64, sigma: f64)
- Fix sampling method for
Gamma
- Add some methods for
DataFramefilter_by<F: Fn(Scalar) -> bool>(&self, column: &str, f: F) -> anyhow::Result<DataFrame>: Filter rows by a condition on a specific columnmask(&self, mask: &Series) -> anyhow::Result<DataFrame>: Filter rows by a boolean maskselect_rows(&self, indices: &[usize]) -> DataFrame: Select specific rows by indices
- New ODESolver:
RKF78- Implement
RKF78method forODESolver
- Implement
- New feature
rkyv- Implement
rkyv::{Archive, Serialize, Deserialize}forMatrix,Polynomial,Spline,ODE
- Implement
- Replace the output signature of
gauss_legendre_tableandkronrod_tableto&'static [f64]to avoid unnecessary allocations. - Hard code symmetry of weights and nodes into source code to avoid unnecessary allocations.
- New helper function -
compute_gauss_kronrod_sum_stored- Reduce the number of function calls (G+K -> K)
- Change update method of subinterval tolerance (divide by 2 -> divide by sqrt(2))
- These changes improve the performance of
integrateby 1.2x - 50x (to integrate highly oscillatory functions)
- Update
randto0.9 - Update
rand_distrto0.5
- Update
puruspeto0.4.0
- Implement
Broydenmethod forGL4
-
Add
lambert_wdoc for crate docs #82 (Thanks to @JSorngard) -
Add default signature for
linspace!#85 (Thanks to @tarolling) -
Fix a bug in
ButcherTableau::step -
Add another example for ODE (
examples/ode_test_orbit.rs)
- Decouple
initial_conditionsfromODEProblem- Now, we can define
initial_conditionsin solving phase
- Now, we can define
- Fix error in
O3feature
-
complexfeature- Implement complex vector, matrix and integral #35 (Thanks to @GComitini and @soumyasen1809)
-
parallelfeature- Implement some parallel functions #72 (Thanks to @soumyasen1809)
- Implement
MatrixTraitfor Matrix (Scalar = f64) - Implement
MatrixTraitfor ComplexMatrix (Scalar = C64) LinearAlgebraandsolvedepend onMatrixTrait
-
Update
puruspedependency to0.3.0, removelambert_wdependency #79 (Thanks to @JSorngard) -
Add
hermite_polynomialandbessel_polynomial#80 (Thanks to @jgrage)
- Fix inconsistent lambert w function name #65 (Thanks to @JSorngard)
- Integrate with lambert_w crate (#63) (Thanks to @JSorngard)
-
Write flexible wrapper for lambert_w
pub enum LambertWAccuracyMode { Simple, // Faster, 24 bits of accuracy Precise, // Slower, 50 bits of accuracy } pub fn lambert_w0(z: f64, mode: LambertWAccuracyMode) -> f64; pub fn lambert_wm1(z: f64, mode: LambertWAccuracyMode) -> f64;
-
Write default Lambert W function for
prelude(Precise as default)use peroxide::prelude::*; fn main() { lambert_w0(1.0).print(); // Same as fuga::lambert_w0(1.0, LambertWAccuracyMode::Simple) }
-
- Bump
pyo3dependency to0.22 - Fix plot functions to be compatible with
pyo3 - Add B-Spline to README
- Generic Spline trait
Spline<T>: desired output type isT
- Split
PolynomialSplinefromSplineCubicSpline&CubicHermiteSplineare nowPolynomialSpline- Implement
Spline<f64>forPolynomialSpline
- Implement B-Spline
BSpline { degree: usize, knots: Vec<f64>, control_points: Vec<Vec<f64>> }BSpline::open(degree, knots, control_points): Open B-SplineBSpline::clamped(degree, knots, control_points): Clamped B-Spline
- Implement
Spline<(f64, f64)>forBSpline
- More generic & stable root finding macros (except
Newton)
- Public ODE Integrator fields
- Add Nan/infinite guard to
gauss_kronrod_quadrature(early exit) (#59) (Thanks to @GComitini) - Add complex feature & complex module (#35)
- Implement Cubic B-Spline basis functions
UnitCubicBasisCubicBSplineBases
- Do not include legend box if there is no legend (#58) (Thanks to @GComitini)
- Add
rtolfield toBroydenMethod - Implement high-level macros for root finding
bisection!(f, (a,b), max_iter, tol)newton!(f, x0, max_iter, tol)(require#[ad_function]attribute)secant!(f, (a,b), max_iter, tol)false_position!(f, (a,b), max_iter, tol)
- Implement
BrodenMethod: Broyden's method (I>=1, O>=1, T=([f64; I], [f64; I])) - Restore citation file
- Remove all boilerplates
- Now,
RootFindingis composed of traitsRootFindingProblem<const I: usize, const O: usize, T>: Trait for defining and root finding problemI: Input dimensionO: Output dimensionT: Type of state
RootFinder: Trait for finding rootBisectionMethod: Bisection Method (I=1, O=1, T=(f64, f64))FalsePositionMethod: False Position Method (I=1, O=1, T=(f64, f64))NewtonMethod: Newton Method (I=1, O=1, T=f64)SecantMethod: Secant Method (I=1, O=1, T=(f64, f64))
- Remove
thiserrordependency - Add
anyhowfor error handling - Change error handling in
ODE,Spline,WeightedUniform
- More generic Butcher tableau
- Now, you can use
ButcherTableaufor non-embedded methods too
- Now, you can use
- More ODE integrators
RALS3, RALS4, RK5, BS23
- Hotfix : Fix
GL4algorithm
- Now, you can report current states if your constraints are violated.
ODEError::ConstraintViolation->ODEError::ConstraintViolation(f64, Vec<f64>, Vec<f64>)- for detailed information, see docs for ODEError
- Add docs for
ODEError
-
Fix all warnings in peroxide
-
Change redundant method
Vec<f64>::resize->Vec<f64>::reshape
-
Error handling for concatenation
cbind&rbindnow returnsResult<Matrix, ConcatenateError>
-
New non-macro utils
column_stack(&[Vec<f64>]) -> Result<Matrix, ConcatenateError>row_stack(&[Vec<f64>]) -> Result<Matrix, ConcatenateError>rand_with_rng(usize, usize, &mut Rng) -> Matrix
-
Generic Butcher tableau trait (now for embedded Runge-Kutta methods)
pub trait ButcherTableau { const C: &'static [f64]; const A: &'static [&'static [f64]]; const BH: &'static [f64]; const BL: &'static [f64]; fn tol(&self) -> f64; fn safety_factor(&self) -> f64; fn max_step_size(&self) -> f64; fn min_step_size(&self) -> f64; fn max_step_iter(&self) -> usize; }
-
Implement
ODEIntegratorforButcherTableau- Just declare
ButcherTableauthenstepis free
- Just declare
-
Three available embedded Runge-Kutta methods
RKF45: Runge-Kutta-Fehlberg 4/5th orderDP45: Dormand-Prince 4/5th orderTSIT45: Tsitouras 4/5th order
-
- Add
thiserrorfor error handling - Implement errors for cubic spline & cubic hermite spline.
- Implement errors for weighted uniform distribution & PRS.
- Now, all distribution has
sample_with_rngmethod. - There are two wrappers for
SeedableRngsmallrng_from_seed: Performant but not securestdrng_from_seed: Performant enough and secure enough
- Remove all boilerplates.
- Now,
ODEis composed of traits.ODEProblem: Trait for defining and ODE problem.ODEIntegrator: Trait for integrating ODE.RK4: Runge-Kutta 4th orderRKF45: Runge-Kutta-Fehlberg 4/5th orderGL4: Gauss-Legendre 4th order- You can implement your own integrator.
ODESolver: Trait for solving ODE.BasicODESolver: Basic ODE solver - define range of t, initial step size and integrate it.- You can implement your own solver.
- For more information, see docs for ode.
- Add
PlotTypeforPlot2DPlotType::ScatterPlotType::Line(default)PlotType::Bar
- Now you can set marker, line style, color, alpha option for specific element.
set_marker(vec![(usize, Marker)]):usizeis index of element (image or pair)set_line_style(vec![(usize, LineStyle)])set_color(vec![(usize, String)])set_alpha(vec![(usize, f64)])
- Make legend optional (Now, no legend is available)
- Implement
set_line_style. Here are available line styles.LineStyle::SolidLineStyle::DashedLineStyle::DottedLineStyle::DashDot
- Implement
set_color - Implement
set_alpha - More markers.
- Add explicit getter for
ExplicitODEandImplicitODEfor various fields.
- Add
auto-initializeflag forpyo3 - Add
scienceplotssupport. Here are available styles.PlotStyle::Default: default matplotlib style - no scienceplots requiredPlotStyle::Science: scienceplots default style - scienceplots requiredPlotStyle::Nature: nature style - scienceplots requiredPlotStyle::IEEE: IEEE style - scienceplots required
- Implement
xscale, yscale, xlim, ylimforPlot2D - You can check these features in Peroxide Gallery
- Derive
SerializeandDeserializeforCubicHermiteSpline
- Derive
SerializeandDeserializeforMatrix - Remove explicit implementation for
DefaultforShape
- Update
peroxide-numtov0.1.4 - Implement
ExpLogOps, PowOps, TrigOpsandNumeric<f64>forMatrix
- Add new sub-crate :
peroxide-num - Change all dependencies of
ExpLogOps, PowOps, TrigOpstoperoxide-num
- R example in
structure/matrix(#56) (Thanks to @rdavis120)
- Fix old syntax - e.g. explicit
into_iter,Vec::with_capacity&set_len
- Modify
self.sumto compatible with definition Weighted Uniform Distribution - Modify
mean&varto compatible with definition
- Implement
arg_min,max,min
-
Adapt max iteration number to Gauss-Kronrod quadrature
- Arguments of all methods related with Gauss-Kronrod quadrature are changed.
- e.g.
G7K15(1e-15)->G7K15(1e-15, 20)(20 is maximum iteration)
-
Example
use peroxide::fuga::*; fn main() { let f_integral = integrate(f, (0f64, 1f64), G7K15R(1e-4, 20)); f_integral.print(); } fn f(x: f64) -> f64 { x.powi(2) }
- Implement Gauss-Kronrod quarature with relative error
G7K15R,G10K21R,G15K31R,G20K41R,G25K51R,G30K61Rcan be used.
- Reduce warning messages
- Implement
StatisticsforWeightedUniform(#55) (Thanks to @samnaughtonb) - New trait:
FloatWithPrecisionfn round_with_precision(&self, precision: usize) -> Selffn floor_with_precision(&self, precision: usize) -> Selffn ceil_with_precision(&self, precision: usize) -> Self
- New utils:
fn seq_with_precision(start, end, step, precision: usize) -> Vec<f64>fn linspace_with_precision(start, end, length, precision: usize) -> Vec<f64>
- Implement necessary traits for
ConfusionMatrix#[derive(Debug, Clone, PartialEq)]
- Bump up dependencies version
netcdf:0.7.0->0.8.1arrow:0.14->0.17.0pyo3:0.17->0.18
- Implement
ConfusionMatrixinstatistics::stat- Implement all metrics in wikipedia
- Delete
build.rsto remove any explicit linkages to specific BLAS implementations (#54) (Thanks to @gfaster)
- Make an option for choosing compression method for parquet
- At
fuga:fn write_parquet(&self, path: &str, compression: CompressionOptions) - At
prelude:fn write_parquet(&self, path:&str)(Default:CompressionOptions::Uncompressed)
- At
- Add
parquetfeature - Add
WithParquettrait and implement it forDataFramefn write_parquet(&self, path: &str) -> Result<(), Box<dyn Error>>fn read_parquet(path: &str) -> Result<Self, Box<dyn Error>>- Update
DataFramedocs
- Change debug procedure for stop condition of
ODE(#52) (Thanks to @tchamelot)- Add
fn has_stopped(&self) -> boolforODEstruct
- Add
- Fix bug in
linspace(#51) - Change print scheme of
Vec<float>- Now, floating number in
Vecis printed byfmt_lower_exp(2)
- Now, floating number in
- Add
*_with_condforSplinetrait (See Truncated Cubic - Peroxide Gallery for an example)eval_with_cond<F: Fn(f64) -> f64>(&self, x: f64, cond: F) -> f64: Evaluate with custom conditioneval_vec_with_cond<F: Fn(f64) -> f64 + Copy>(&self, v: [&f64], cond: F) -> f64: Evaluate vector with custom condition
- New trait -
LowerExpWithPlus,UpperExpWithPlus- Now, we can print
132.45as1.3245e+2via132.45.fmt_lower_exp(4) - Now, we can print
132.45as1.3245E+2via132.45.fmt_upper_exp(4)
- Now, we can print
- Change print scheme of
DataFrame- Now, floating number in DataFrame is printed by
fmt_lower_exp(2)
- Now, floating number in DataFrame is printed by
- Fix bug in
rref(#50)
- Fix bug in
linspaceandlogspace- Now
linspace(0, 0, 1)returns[0f64]instead of[NaN] - Now
logspace(0, 0, 1, 10)returns[1f64]instead of[NaN]
- Now
- Fix assertion of
util::non_macro::seq - Implement numpy like
logspace
- Fix a bug in
spreadof DataFrame
- New trait
Spline- Move
CubicSpline::evaltoSpline::eval - Move
CubicSpline::polynomialtoSpline::polynomial_at - Move
CubicSpline::number_of_polynomialstoSpline::number_of_polynomials - Add
Spline::eval_vec - Add
Spline::get_ranged_polynomials
- Move
- Implement Cubic Hermite spline
- Add struct
CubicHermiteSpline - Implement slope estimation algorithms
SlopeMethod::AkimaSlopeMethod::Quadratic
- Add struct
- Modify
CubicSpline(Important!)- Change argument type
from_nodes(node_x: &[f64], node_y: &[f64]) -> Self
- (For developer) Remove
CubicSpline::ranged(useutil::useful::zip_rangeinstead)
- Change argument type
- Add docs for
numeric/spline.rs
- Rename
Calculus::difftoCalculus::derivative(Important!)
- Add
util::useful::{gen_range, zip_range} - Add
structure::poly::Calculus::integrate
- Update
puruspeto0.2.0(Fix a bug in gamma function)
- New distribution :
WeightedUniform - New sampling method :
PRS(Piecewise Rejection Sampling) - Documentation for these new methods will be added later.
- Control
lambdaofLevenbergMarquardt(#49)- Add
set_lambda_init&set_lambda_max(#49)
- Add
- More flexible root finding
- Add getter methods for
RootFinder - Add getter methods for
RootState
- Add getter methods for
- Implement Cholesky decomposition in
O3feature. - Implement symmetricity check method -
is_symmetricfor Matrix.
- Update
netcdfdependency to0.7- Fix
ncfeature issue - not compatible with hdf5 version 1.12.0
- Fix
- Update
pyo3dependency to1.15 - Update
float-cmpdev dependency to0.9
- Add more trigonometric ops
asin_acos(&self) -> (Self, Self)asinh_acosh(&self) -> (Self, Self)
- Update dependencies
blas:0.21.0->0.22.0lapack:0.17.0->0.19.0
- Fix errata in
col_map,row_map
- Change signature of
cubic_spline- Originally,
(Vec<f64>, Vec<f64>) -> Vec<Polynomial> - Now,
(&Vec<f64>, &Vec<f64>) -> CubicSpline
- Originally,
- Add Truncated SVD
- Add
truncated(&self)method forSVD
- Add
- Fix a bug in quantile of
statistics/stat.rs
- Update docs
prelude/mod.rs: Update default numerical integration method
- Update
matrixmultiplydependency- Add
threadingfeature - Enhance matrix multiplication performance : See matmul
- Add
- Update dependencies
rand: 0.7 -> 0.8rand_distr: 0.3 -> 0.4matrixmultiply: 0.2 -> 0.3netcdf: 0.5 -> 0.6blas: 0.20 -> 0.21lapack: 0.16 -> 0.17pyo3: 0.12 -> 0.13
- Automatic generated gradient & hessian via
proc_macro- Currently only support
Fn(f64) -> f64
- Currently only support
use peroxide::fuga::*;
fn main() {
f(2f64).print(); // x^3 = 8
f_grad(2f64).print(); // 3 * x^2 = 12
f_hess(2f64).print(); // 6 * x = 12
}
#[ad_function] // generates f_grad, f_hess
fn f(x: f64) -> f64 {
x.powi(3) // x^3
}- Implement Gauss-Kronrod Quadrature
- G7K15
- G10K21
- G15K31
- G20K41
- G25K51
- G30K61
- Now, prelude's default integration is
G7K15(1e-16)
- Implement Chebyshev polynomial
- Implement more higher order Gauss-Legendre Quadrature (Up to 30)
- Replace all
Dual,HyperDual,NumberwithAD- Remove
Dual, HyperDual, Number
- Remove
- It affected all of numerical functions
numerical/root.rsnumerical/ode.rsnumerical/optimize.rsnumerical/utils.rs
- Also many traits are changed
traits/num.rstraits/pointer.rs
- No more default in
util::non_macro::concat - Now,
VecOpshas default implmentations - It requiredFPVector
- Implements all numerical operations of
AD- Inverse trigonometric:
asin, acos, atan - Inverse hyperbolic:
asinh, acosh, atanh - Power of AD:
pow(&self, other: AD) -> Self
- Inverse trigonometric:
- Remove all
proc_macro(Remove dependency ofperoxide-ad)- Now,
ADare enumsAD0(f64)AD1(f64, f64)AD2(f64, f64, f64)
- Now,
csvbecomes optional- Remove dependency of
csv, serde, iota, ...
- Remove dependency of
- Reduce compile time via
wattintegration- Now,
peroxide-adis pre-compiled to wasm
- Now,
- Fix dimension error of
applyinO3feature - Import
structure/dataframe.rsintoprelude - Update version of
README.md
- Now,
DataFramecan contain multiple type columns. Refer to dataframe. DataFrameis merged default feature. No moredataframefeature required. Thus,dataframefeature is removed.- But if you want to
netcdffile format, thenncfeature is required.
- Fix errata in
README.md - Remove unnecessary imports
- Add doc for
Matrix::qr&Matrix::svd - Enhance doc for
Matrix::pseudo_inv - Implement
pseudo_invviasvd(O3feature only)
- Update dependencies
indexmap: 1.5 -> 1.6pyo3: 0.11 -> 0.12
- Add
printfor&Vec<T>
- Fix dimension error of
SVD.u
- Add
svdtoMatrix(Only available inO3feature)
- Remove
packed_simddependency (Fixpacked_simderror) - Add
O3version ofqr(usinglapack_dgeqrf)
- Add more sugar for
Vec<f64>ConvToMat: ConvertVec<f64>to_col: To Column matrixto_row: To Row matrix
- Add new methods for
Matrixsubmat(&self, start: (usize, usize), end: (usize, usize)): Return submatrixsubs_mat(&mut self, start, end, &Matrix): Substitute submatrix
- Update
netcdfdependencies- Now, use
netcdf = 0.5
- Now, use
- Add new methods for
DataFramehead_print(&self, n: usize): Return n lines from headtail_print(&self, n: usize): Return n lines before tail
- Change licenses : BSD-3-Clause -> MIT OR Apache-2.0
- Update version of dependencies
- Implement more Vector Products
crossouter
- Implement more Matrix Products
kroneckerhadamard
- Add assertion for matrix multiplications
- Implement Binomial distribution
- Reduce compile time
- Reduce order of
AD{i}: 10 -> 5
- Reduce order of
- Add
numerical/root.rs(See docs)- Low-level API
- High-level API
- Add
ADLift<F, T>for lifting genericADfunction
- Impl
std::opswithf64forAD{i}and vice versa - Increase Accuracy of Spline Extension (Thanks to schrieveslaach)
- Integrate
src/structure/ad.rsintoprelude - Add generic automatic differenitation trait -
AD
- Add
structure/ad.rs - Add
peroxide-ad(proc_macrofor AD) - Implement
AD1~AD10(Upto 10th order) - Modify
traits/num.rs- Change some methods to provided methods
- Add
get_env(&self)inExplicitODE - Add
get_env(&self)inImplicitODE
- Fix
set_headererror ofDataFrame
- Add
Environmenttrait innumerica/ode.rsODE->ODE<E: Environment>ExplicitODE->ExplicitODE<E: Environment>f: Fn(&mut State<f64>)->f: Fn(&mut State<f64>, &E)- Add
set_env(E)
ImplicitODE->ImplicitODE<E: Environment>f: Fn(&mut State<Dual>)->f: Fn(&mut State<Dual>, &E)- Add
set_env(E)
- Fetch
preludewith new Linear algebra- Add
SimpleLinearAlgebra
- Add
- Fix error in
LinearAlgebra::lu- Add
gepp, gecpfor partial pivoting and complete pivoting - Peroxide chooses
gecpdefault
- Add
- No more
unwraplureturnsPQLUdirectlyinvreturnsMatrixdirectlypseudo_invreturnsMatrixdirectly
- Implement two solve algorithms
- LU decomposition via Gaussian elimination with Complete pivoting (Stable)
- WAZ decomposition (Unstable)
#[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]
}- Fix errata in
SubofRedox
- Add
tests/linalg.rs: It comparesperoxideandjuliawithtest_data/*.nc
- Add
traits/sugar.rsVecOps: Vector operation with vectors and scalarsScalable: Easy to resize vector or matrix and also concatenation
- Add
col_reduce,row_reduce
[Caution!] Huge Update!
No more direct re-exporting. Below code is not allowed.
extern crate peroxide;
use peroxide::*;Now, peroxide has two re-export options - prelude and fuga.
prelude: To use simplefuga: To control numerical algorithms
For example,
// Prelude
#[macro_use]
extern crate peroxide;
use peroxide::prelude::*;
fn main() {
let a = c!(1, 2, 3);
assert_eq!(a.norm(), 14f64.sqrt());
}// Fuga
#[macro_use]
extern crate peroxide;
use peroxide::fuga::*;
fn main() {
let a = c!(1, 2, 3);
assert_eq!(a.norm(Norm::L2), 14f64.sqrt());
}- Remove
operation - Create
traits
traits contains below submodules.
fp.rs: Functional Programming toolboxgeneral.rs: General algorithmsmath.rs: Mathematical traitsmutable.rs: Mutable toolboxnum.rs:Real&Number& VariousOpspointer.rs:Redox<T: Vector>&MatrixPtr
- From Ver
0.23.0, peroxide uses 2018 edition.
- From ver 0.23.0,
Matrix * Vec<f64> = Vec<f64>and vice versa.
- Replace
norm_l*()asnorm(Norm::L*) - Move
interp::lagrange_polynomial,special::legendre::legendre_polynomialtostructure/polynomial.rs - Remove
LinearOpsinstructure/matrix.rs- Replace
to_matrix(&self)withInto<Matrix> - Replace
from_matrix(&self)withInto<Vec<f64>> - Move
transpose(), t()toMatrix::transpose(), Matrix::t()
- Replace
- Remove
VecOpsinstructure/vec.rs- Replace
add, sub, s_mulwithtraits::math::Vector - Replace
norm()withtraits::math::Normed - Replace
dot()withtraits::math::InnerProduct - Use
Redox<T: Vector>rather thanVecOps(Refer totraits/pointer.rs)
- Replace
- Remove
special/legendre.rs - Add
gemv,gevminstructure/matrix.rs
numerical/integral.rs- Newton Cotes quadrature -
integrate(f, (a, b), NewtonCotes(usize)) - Gauss Legendre quadrature -
integrate(f, (a, b), GaussLegendre(usize))
- Newton Cotes quadrature -
swap_with_perm: Swap with permutation
More CubicSpline (By schrieveslaach)
polynomial(&self, x: T) -> Polynomial: Returns a reference thePolynomialat the given pointx.
More Vector::norm (By nateckert)
- Add more
normforVec<f64>:norm_l1(&self), norm_l2(&self), norm_linf(&self), norm_lp(&self)
- Gaussian elimination with LU decomposition
Perm * Matrix: Syntactic sugar forswap_with_perm(_, Row)Matrix * Perm: Syntactic sugar forswap_with_perm(_, Col)- More numerical integrations
- Unify vector norms
- Make
csvtooptional
- QR Decomposition
- Add
qr(&self) -> QRinLinearAlgebratrait - Add
QRto represent QR decomposition
- Add
- Reduced Row Echelon Form
- Add
rref(&self) -> MatrixinLinearAlgebratrait
- Add
- Modify Polynomial evaluate algorithm via Horner's Method (Thanks to Nateckert)
- Create
util/wrapper.rs: Wrapper for other crates.- Trait
SampleRNG: Extract random sample fromVec<T>sample(&self, n: usize) -> Vec<Self::Item>
- Trait
- More
PrintableVec<usize>,Vec<u32>,Vec<u64>Vec<isize>,Vec<i32>,Vec<i64>
- Fix a bug for
det,inv&pseudo_invfor large matrix- Set precision of
luto more lower :1e-7to1e-40
- Set precision of
- QR decomposition
- Effective pseudo inverse algorithm using QR
- Enhance performance of
Matrix
- New dependency -
matrixmultiply - Change default matrix multiplication behavior - depend on
matrixmultiply - If size of matrix is smaller than
1000 x 1000,defaultis faster thanO3 - New function -
gemm: Wrapper ofdgemmofmatrixmultiplygemm(alpha, A, B, beta, C):C = alpha * A * B + beta * C
- Add
operation/row_ops.rs- Add
RawMatrix row_ptr(&self, usize) -> Vec<*const f64>col_ptr(&self, usize) -> Vec<*const f64>
- Add
- Add
as_slice, as_mut_sliceforMatrix - Add
ptr_to_vecinutil/low_level
- Add
Eigen- Implement jacobi method
extern crate peroxide;
use peroxide::fuga::*;
fn main() {
let a = MATLAB::new("1 2; 2 3");
let eigen = eigen(&a, Jacobi);
let (eig_val, eig_vec) = eigen.extract();
eig_val.print();
eig_vec.print();
}- Modify
PowOps- Rename
powf(&self, Self)topow(&self, Self) - Create
powf(&self, f64)
- Rename
- Implement
std::opsforRedoxVector - Implement
PowOpsforRedoxVector - Update Documents
- Remove dependencies -
special,special-fun- Now, use special functions & distributions for WASM.
- New dependency - puruspe (PURe RUSt SPEcial function library)
- Re-implement special functions by
puruspe-
ln_gamma -
gamma -
inc_gamma -
inv_inc_gamma -
beta -
inc_beta -
inv_inc_beta -
erf -
erfc -
inv_erf -
inv_erfc
-
- Add
DivforMatrix
- Revert
cfg(feature="special")ascfg(feature="specials")for WASM.specials = ["special", "special-fun"]
- Implement special functions by pure Rust.
- Add Accessoires to
CubicSpline(By schrieveslaach)- return number of polynomials
- access element through
std::ops::Index
- Move
docsdomain : https://peroxide.surge.sh - Add more R macros
rtdtpt
- New dependencies
order-stat: For ordered statisticsfloat-cmp: To compare floating numbers convenientlyspecial-fun: To use additional special functions
OrderedStat- Now, we can calculate quantile (perfectly matched with R quantile)
- Implemented list
- Type1
- Type2
- Type3, ... , Type 9
- Remove
specialfeature - Now,special,special-funare necessary dependencies. - New method over
RNGtrait. -cdf
- Some additional R macros
rnormdnormprorm
- Some additional special functions
inc_beta: Regularized incomplete Beta integralinc_gamma: Regularized incomplete lower Gamma integralhyp2f1: Hypergeometric function
- Update
REAME.md - Fix comments of
plot.rs
- Modify
vector- Replace last
nativewithO3 - Add
sumtoVecOps
- Replace last
- Modify documentation of
dist- Remove checkbox
- Replace
~with<del>tag
- Remove travis-ci error in
examples - Remove some legacy codes
- No differences with
0.19.2
- Remove test errors of
dataframe.rs
- New dependency -
rand_distr- Now, any distributions are depend on
rand_distr
- Now, any distributions are depend on
- Add
StudentTdistribution - Rename
exampletoexamples- Now use
cargo build --examples. But it should require all features so, not recommended. Instead of this, you can see real examples in Peroxide Gallery.
- Now use
- New dependency in
dataframefeature -json - Add
WithJSONtrait indataframe.rs - Implement
WithJSONforDataFrame-
to_json_value -
from_json_value
-
- Add missing trait bound for
Realtrait - Fix error of
plot.rs- Change python library dependency :
pylab->matplotlib.pyplot
- Change python library dependency :
- [Hotfix] Fix spacing bug for
r>100cases.
- Fix spacing constraint - space should be larger than length of key
- Fix global spacing of
dataframeto column-wise spacing.
- Improve generic of
jacobian
- Fix limitation of key length: 5 -> unlimited
- Rename feature :
oxidize->O3
- Cubic spline structure (By schrieveslaach)
- Add documentation for
DataFrame
structure::DataFrame::WithNetCDF- Modify
read_nc(file_path: &str, header: Vec<&str>)->read_nc(file_path: &str) - Add
read_nc_by_header(file_path: &str, header: Vec<&str>)
- Modify
- Implement
StatisticsforDataFrame
- With surge, new documentation web sites available - peroxide.info
structure/dataframe.rs
indexmapnetcdf
dataframe
- Pretty print
- Able to print different length
- Convert to Col matrix
- Initialize with header
- Call by header (
Indexwith header) - Call by row
- Insert pair
- Insert row
-
IndexMutwith header - Any column operations
- Read from csv
- Write to csv
- Read from netcdf
- Write to netcdf
- Remove
NumErrorforNumber - Add
PartialOrdforNumber, Dual, HyperDual
structure::dual::ExpLogOps::lnstructure::hyperdual::Divstructure::hyperdual::ExpLogOps::ln
numerical::optimizeF: Fn(&Vec<f64>, Vec<Number>) -> Option<Vec<Number>>
util::low_levelunsafe fn copy_vec_ptr(dst: &mut Vec<*mut f64>, src: &Vec<f64>)unsafe fn swap_vec_ptr(lhs: &mut Vec<*mut f64>, rhs: &mut Vec<*mut f64>)
structure::matrix::Matrix::swap->operation::mut_ops::MutMatrix::swap- Now
swapbecomes mutable function
- Now
- Now, we can insert pair of data to
plotfn insert_pair(&self, pait: (Vec<f64>, Vec<f64>)) -> &mut Self
- More generic
optimize- function pointer ->
Box<F>
- function pointer ->
operation::mut_ops::MutMatrixfn col_mut(&mut self, idx: usize) -> Vec<*mut f64>fn row_mut(&mut self, idx: usize) -> Vec<*mut f64>
structure::Matrix::FP::{col_mut_map, row_mut_map}
structure::matrix::Matrixfn ptr(&self) -> *const f64fn mut_ptr(&self) -> *mut f64Index for MatrixIndexMut for Matrix
fn main() {
// ===================================
// Low Level
// ===================================
let mut a = ml_matrix("1 2; 3 4");
a.print();
// c[0] c[1]
// r[0] 1 2
// r[1] 3 4
unsafe {
let mut p: Vec<*mut f64> = a.col_mut(1); // Mutable second column
for i in 0 .. p.len() {
*p[i] = i as f64;
}
}
a.print();
// c[0] c[1]
// r[0] 1 0
// r[1] 3 1
// ===================================
// High Level
// ===================================
let mut b = ml_matrix("1 2 3; 4 5 6");
b.col_mut_map(|x| x.normalize());
b.print();
// c[0] c[1] c[2]
// r[0] 0.2425 0.3714 0.4472
// r[1] 0.9701 0.9285 0.8944
}- Smart pointer of Vector -
RedoxVector - SIMD integrated -
packed_simd - Revive Gauss-Legendre 4th order ODE solver
- Come back to Travis-CI (only default feature)
- Legendre Polynomial (
legendre_polynomial(n: usize) -> Polynomial) - Gauss-Legendre Quadrature based on numerical table (up to
n=16)
- More optimization of
vector.rs - Can use
openblasfeature inode.rs
- [Important] More features
- You can choose next features
openblas: BLAS & LAPACK back-endplot: Plot with matplotlib (depends onpyo3- should use nightly compiler)
- You can choose next features
- More BLAS
- Vector & Vector Addition/Subtraction (
daxpy) - Vector & Scalar multiplication (
dscal) - Vector & Vector dot product (
ddot) - Vector Euclidean norm (
dnrm2)
- Vector & Vector Addition/Subtraction (
- More LAPACK
- QR decomposition (
dgeqrf)- get Q,R (
dorgqr)
- get Q,R (
- get Condition number (
dgecon)
- QR decomposition (
- [Important] Finally, BLAS integrated.
-
You can choose
blas, lapackbynativefeatures.cargo build --features native
-
Default features are no BLAS (Pure Rust)
cargo build
-
To use BLAS in Rust can be bothered. Should refer to OpenBLAS for Rust
-
BLAS implemented Ops
- Matrix & Matrix Addition/Subtraction (
daxpy) - Matrix & Scalar Addition/Subtraction (
daxpy) - Matrix & Matrix Multiplication (
dgemm) - Matrix & Vector Multiplication (
dgemv)
- Matrix & Matrix Addition/Subtraction (
-
LAPACK implemented ops
- LU Factorization (
dgetrf) - Inverse by LU (
dgetri) - Solve by LU (
dgetrs)
- LU Factorization (
-
- Move unnecessary
binfiles to example directory
- [Important] Remove inefficient things
- Remove
util/pickle.rs - Remove
serde,serde-pickledependencies
- Remove
- Optimize original code
- Matrix
change_shapecol(usize), row(usize)diagsubs_col, subs_rowAdd<Matrix>Mul<Matrix>- Block matrix multiplication
- Matrix
- Add
normalizeforVec<f64> - Add
col_mapforMatrix - Add
row_mapforMatrix
- Add
get_errorforOptimizer- Now, we can see root mean square error of
Optimizer
- Now, we can see root mean square error of
- Optimizer documents
- Change non-reasonable syntax
set_legends->set_legend(inutil/plot.rs)
- Add
set_markersforPlot2D- Can support
Point,Circle,Line
- Can support
- Fix error of
powfinPowOpsforNumber- Cover all cases
- Change output type of
optimize- Original:
Matrix - Changed:
Vec<f64>
- Original:
- [Important] Change the definition of
powfinPowOpspowf(&self, Self) -> Self- Apply this definition to
DualHyperDualNumber
- And remove
PowOpsofVec<f64>
- More utils
max<T>(v: Vec<T>) -> T where T: PartialOrd + Copy + Clonemin<T>(v: Vec<T>) -> T where T: PartialOrd + Copy + Clone
- Implement Levenberg-Marquardt Algorithm (Refer to
bin/optimize.rs) to_diagforMatrixto_diag: Extract diagonal matrix from a matrix
- Add non-linear regression algorithms (Optimizations) to
numerical/optimize.rs- Gradient Descent
- Gauss Newton (Not yet implemented)
- Levenberg Marquardt
- Add julia-like macros
hstack!: Vectors to Column matrixvstack!: Vectors to Row matrix
- Modify
jacobian- Receive
Fn(Vec<Number>) -> Vec<Number>
- Receive
- Remove
bdf.rs,gauss_legendre.rs - More extended functional programming for
Vec- Extend
zip_withto any real vector
- Extend
- Add
extractforPQLUextract: PQLU -> (p, q, l, u)
- Update whole documentations - part 2.
- For convenience
- New method -
to_vecofMatrixMatrixtoVec<Vec<f64>>
- Change input type of
set_legendsofplot.rsVec<String>->Vec<&str>
- New method -
- Update whole documentations - part 1.
- Fix performance issue in
0.11.2- Fix non-efficient parts of
takeofMatrix
- Fix non-efficient parts of
- Exclude
bindirectory - Apply
stop_conditionforODE
- Remove dependency of
inline-python
- [Important] Now, only nightly support (Because of
pyo3) - Integrate with
inline-python - Update
README.md
- Now, we can draw & save plot
- New dependency -
pyo3 - Plot is implemented in
util/plot.rs
- New dependency -
- Modify
integrateofnumerical/ode.rs- Now,
integrateprovides [param|values] matrix.
- Now,
- Change
randcrate version -0.7.0
- Add
Numberenum for generic function input to ODE.Numberis composed ofF(f64), D(Dual), E(NumError)- It replace
Realtrait
- Modify
State<T>structure. (state->value)pub struct State<T> { param: T, value: Vec<T>, deriv: Vec<T> }
- Modify
ExplicitODE- Remove
countfield
- Remove
- Gitbook & README update
- [Important!] Re-define ode structure
- Great improve UI - Like
SimpleWriter - Implement
ExMethod::Euler - Implement
ExMethod::RK4
- Great improve UI - Like
- Fix bug in
SimpleWriter- Fix "always header" bug
std::opsfor&Dualstd::opsfor&HyperDual
- [Important!] Remove
RemforMatrix(Thanks to russellb23) - [Important!] Change
MulforMatrixMul<Matrix> for Matrixis Matrix multiplication!
- Now, we can use
std::opsfor&Matrixextern crate peroxide; use peroxide::fuga::*; fn main() { let a = ml_matrix("1 2;3 4"); (&a + &a).print(); (&a * &a).print(); (&a - &a).print(); }
RealTrait is appeared & implemented for some types.Realforf64RealforDualRealforHyperDual
extern crate peroxide; use peroxide::*; fn main() { let x_f64 = 2f64; let x_dual = dual(2, 1); let x_hyper = hyper_dual(2, 1, 0); f(x_f64).print(); f(x_dual).print(); f(x_hyper).print(); } fn f<T: Real>(x: T) -> T { return x.powi(2); }
- Implement dot product for
Vec<Dual>(Thanks to russellb23)
- Add
log(&self, base: f64)toExpLogOps
- Implement
PrintabletoOPDist<T>, TPDist<T> - New trait
ParametricDistforOPDist<T>, TPDist<T>(Just extract parameters) - New module:
util/writer.rs- You can write pickle file with pipelines.
- Implement Arnoldi iteration & Gram-schmidt (Not yet merged)
bin/arnoldi.rsbin/schmidt.rs
- Add
Debug, ClonetoOPDist<T>, TPDist<T>
- Add
zeros_shape,eye_shapetoutil/non_macro.rs - Fix
Matrix::from_index- You should use index function which returns
f64
- You should use index function which returns
- Modify
Pickletrait - Allow multiple data to one pickle filewrite_single_pickle: Just write vector or matrix to one pickle file.write_pickle(&self, writer: &mut Write)extern crate peroxide; use peroxide::*; use std::fs::File; use std::io::Write; fn main () { let mut w: Box<Write>; match File::create(path) { Ok(p) => writer = Box::new(p), Err(e) => (), } let a = ml_matrix("1 2;3 4"); a.write_pickle(&mut w).expect("Can't write pickle file"); }
- Implement matrix norm (usage:
a.norm(<input_norm>))PQ(p, q):L_pqnormOne:L_1normInfinity:L_∞normFrobenius: Frobenius norm (=PQ(2,2))
HyperDualfor 2nd order Automatic Differentiation
- Implement Tri-Diagonal Matrix Algorithm
- Add
tdmatonumerical/utils.rs
- Add
- Modify
matrix/luto correct doolittle algorithm
- Add two dependencies in
Cargo.tomlserdeserde_pickle
- Add
pickle.rstoutil- Write
Vec<f64>to pickle file easily - Write
Matrixto pickle file (Caution: It depends on shape of matrix)
- Write
- Fix all warnings from compiler
- New constructor in
matrix.rs- Matrix from index operations -
from_index<F>(F, (usize, usize))
- Matrix from index operations -
- Update print of Matrix
- Extend limit from
10x10to100x10or10x100or20x20
- Extend limit from
- Fix bug of
takeofFPMatrix- Early return if size is smaller than row or column
- Add
ops.rstostatistics- Factorial:
factorial(n) - Permutation:
P(n,r) - Combination:
C(n,r) - Combination with Repetition:
H(n,r)
- Factorial:
- Add constraint to uniform distribution
- Reduce & modify
README.md- Add missing modules to module structure
- Remove
Usagesection (Move to Peroxide Gitbook)
- Add Peroxide Gitbook link to
README - Fix
statistics/rand.rs,statistics/dist.rs- pub use rand crate to private use
- Now you can use
rand(usize, usize)function inutil/non_macro.rs
- Fix bugs of
cbind,rbind - Add Linear Discriminant (Least Square) example
- Fix complete pivoting
- Add
dettest intests - Add
tovinbin- Tolman-Oppenheimer-Volkoff equation
- Fix error of
Sub<Dual> for f64 - Fix error of
Div<Dual> for f64
- Bump
randdependency to 0.6 (Thanks to koute) - Fix error of
powfoperation ofdual- Now, it works fine.
- Fix errors of test
- Fix
write,write_with_header- Move
roundparameter towrite_round,write_with_header_round
- Move
- Add
solve_with_conditiontoode.rs- Now, you can give stop condition to ode solver.
- Add various distributions in
dist.rsBernoulli(mu)Beta(a, b)
- Modify
write,write_with_header- Now there is round option
- Fix error of
bdf.rs
- Modify
bdf.rs- Put
max_iter = 10 - Simplify non-autonomous jacobian
- Put
- Move distributions(
Uniform,Normal) fromrand.rstodist.rs- Now
Uniform&Normalare enums - Remove
Uniform::new&Normal::new
- Now
- Add
special/function.rs- Add
gaussian
- Add
- Implement
GL4- Gauss-Legendre 4th order- Add
GL4(f64)toODEMethod
- Add
- Add
taketoFPtrait for Matrix - Add
skiptoFPtrait for Matrix - Fix
fmt::DisplayofMatrix- If larger than 10x10 -> Only print 10x10 part
- Add
ode.rstonumeric- Add
solve- numerical solve ODE - Now you can choose two methods
RK4BDF1
- Add
- Change
rk4- All functions should have form
f(Dual, Vec<Dual>) -> Vec<Dual>
- All functions should have form
- Fix error of
spread
- Modify matrix declaration
p_matrix->py_matrixm_matrix->ml_matrix- Add
r_matrix(same asmatrix)
- Add
util/api.rs- Can choose various coding style
MATLABPYTHONR
- Can choose various coding style
- Remove
CreateMatrix- Deprecated
Matrix::new-> Usematrixinstead
- Deprecated
- Update
matrix.rs- Add
p_matrix,m_matrix- Pythonic matrix
- MATLAB matrix
- Add
write_with_headerformatrix.rs- Now, can write matrix with header
- Add
- Add
runge_kutta.rs- Implement RK4 algorithm for Non-autonomous equation
- Add
grave - Move
rok4a.rstograve
- Fix error of
DivforDual
- Add
rok4a.rs- Now, deprecated
- Add
non_auto_jacobianto utils- TODO: Generalize jacobian
- Add
bdf.rs- Implement Backward Euler Method
- Add comfortable tools for
Vec<Dual> - Add
jacobianinnumerical/utils - Add
newtoninnumerical- Newton-Raphson Method
- Fix error of
inv- Reverse order of permutations
- Update
Dual- Also add
Ops<Dual> for f64
- Also add
- Add
multinomial.rs- Implement
print,eval - TODO: Partial eval?
- Implement
- Update
Dual- Add
Add<f64> for Dual - Add
Sub<f64> for Dual - Add
Mul<f64> for Dual - Add
Div<f64> for Dual
- Add
- Update
FPVector- Add
filter, take, drop
- Add
- Update
read- Move
readtoMatrix::read - Can set
delimiter
- Move
- Add
pseudo_invmethod forMatrix - New
useful.rsin util- Move
tab, quot_rem, nearly_eqfrommatrix.rstouseful.rs - Move
choose_*frompolynomial.rstouseful.rs
- Move
- Fix error of
VectorOps-dot
- Fix typo of
fmt::DisplayforPolynomial - Fix module structures - Thanks to md-file-tree
- Implement Horner's Algorithm -
Divfor Polynomial - TODO: Fix
printof Polynomial (Fixed!) - Add
Dualfor Automatic Differentiation to structure- structure
- matrix
- vector
- polynomial
- dual
- structure
- Make
operationdirectory & addextra_ops.rs
- Fix
README
- Implement
CalculusforPolynomial - Re-construct all module structures
- structure
- matrix.rs
- vector.rs
- polynomial.rs
- statistics
- stat.rs
- rand.rs
- macros
- r_macro.rs
- matlab_macro.rs
- util
- print.rs
- structure
- Add
numericaldirectory- Add interp.rs
- Lagrange Polynomial (
lagrange_polynomial) - Chebyshev Nodes (
chebyshev_nodes)
- Lagrange Polynomial (
- Add spline.rs
- Natural Cubic Spline (
cubic_spline)
- Natural Cubic Spline (
- Add interp.rs
- Impl
powfor Polynomial - Fixed
fmt::Displayfor Polynomial
- Add
print.rsfor print any values conveniently- Implement
printfor Vector - Implement
printfor Matrix - Implement
printforf32, f64, usize, u32, u64, i32, i64
- Implement
- Add
poly.rsto dealPolynomial- Implement
fmt::Displayfor Polynomial - Add
new - Implement
evalfor Polynomial - Implement
Neg, Add, Sub, Mul<T>for Polynomial - Implement
Mul, Add<T>, Sub<T>, Div<T>for Polynomial
- Implement
- Change gaussian generate method
marsaglia_polartoziggurat
- Add comments and examples to
rand.rs
- Add
linspacetomatlab_macro - Fixed
linspaceexport error - Add
rand.rs- Generic
Randstructure samplemethod- Marsaglia Polar
RandtoUniformandNormal
- Generic
- Extend
matrixmacro to single valued matrix - Make
lm - And also make
lmmacro -lm!(y ~ x) - Make
LinearOpsTrait - But not necessary
- Add badges to README
- Fix README - add cargo.toml
- Modify
std::opsfor Matrixf64to generic- Add comments
- Matmul for
MatrixvsVectorvice versa
- Add
eyetomatlab_macro - Extend
zerosto matrix - Fix
covforVec<f64>- not consume anymore - Add
cor - Update
README
- Add
matlab_macro
- Add
read- Can read matrix from csv
- Add comment to
write,read - Fix all README
- Add
writeforMatrix- Can write matrix to csv!
- Modify
block,inv_u,combine- Just change code syntax
- Modify
lu- Just change code syntax
- Add
IndexMutimplementation forMatrix - Modify
Rem- Just using
IndexMut - Very fast!
- Just using
- Fixed
block&combine- Only squared matrices -> Every matrices
- More add R-like macro
cbindrbind
- README update
- Refactor structure
- Move all macro to
r_macro.rs
- Move all macro to
- Add
stat.rsmean, var, sd
- Modify
spread- Fix bugs of all cases
- Use modern syntax
- Fix
Cargo.toml
- Replace
luwithplu - Make Algorithm trait for Vector
rank, sign, arg_max
- Change
PartialEqforMatrix- Add
nearly_eqfunction - Use
nearly_eqforMatrix::eq
- Add
- Add
swap - Make
PQLUstructure - Remove
pivot,to_perm - Replace
pluwithlulureturnsOption<PQLU>
- Enhance error handling with
lu, det, inv - Complete Pivoting LU Decomposition
- Fix error of
lu- initializeu
- Remove non-necessary comments
- Remove
vec2mat, mat2vec - Change
col,rowfunctionscol, rowreturnsVec<f64>
- Add
diag - Add
det - Add
reduceinvector_macro - Add
inv_l,inv_u - Add
block,combine - Fix error of
block,combine - Fix error of
inv_l - Add
inv
- Remove
Vectorstruct- Replace with
vector_macro c!&seq!
- Replace with
- Make R-like matrix macro
matrix!(1;4;1, 2, 2, Row)
- Vector
seq: moved from matrix to vector- Rename
Generictrait -CreateMatrix
- LU Decomposition
matrixfunction - Same as R- Fix
README.md - More documentation
seqfunction - Same as R- Extract Col & Row
a.col(1): Extract 1st column ofaas Column matrixa.row(1): Extract 1st row ofaas Row matrix
- Update Documentation
- Update README
- Change structure
- remove
ozone
- remove