This document will be used to keep track of changes made between release versions. I'll do my best to note any breaking changes!
Matrix::lup_decomp
has been deprecated and will be removed soon.PermutationMatrix
. This type provides more efficent operations with permutation matrices.Matrix
. Under io
feature flag.BaseMatrix::col_iter
and BaseMatrixMut::col_iter_mut
functions.PartialPivLU
struct which contains the result of an LUP decomposition. This struct will replace the Matrix::lup_decomp
function in a future release.SliceIter
.min
/max
functions.vector!
macro for Vector
construction.min
and max
functions to the BaseMatrix
trait.Row
/Column
types to Vector
.BaseMatrix::sum_rows
function. also gives passive improvement to mean
and variance
.vector
module.matrix!
macro use square brackets consistently.This release includes mostly quality of life changes for users of rulinalg. We do some work to conform more to community standards with naming, for example iter_rows
becoming row_iter
. Additionally several Matrix
functions now consume self
where before they took a reference and immediately cloned self
.
Another noticable change is the addition of new Row
and Column
types. These types are returned by functions which access single rows or columns in a matrix. With these new types we aim to make it easy for users to do matrix operations on single rows and columns while maintaining performance where necessary.
This release also welcomes an overhaul of the Metric
trait. This trait didn't really make sense and only allowed computation of the euclidean norm. We have created new Norm
and Metric
traits for both Vector
and matrix types (we would like a single pair of traits but this is not possible without specialization). These new traits allow users to write code which is generic over norms and specify their own norms. We also provide Metric
implementations for all Norm
implementors by computing the norm of the difference between the objects.
The full release notes are below.
reslice
function for MatrixSlice
and MatrixSliceMut
has been depreciated.*_iter(_mut)
. Affected functions are: iter_diag
, iter_diag_mut
, iter_rows
, iter_rows_mut
.BaseMatrix
diag
function now returns an iterator.Metric
trait and all implementations.self
instead of cloning internally: eigenvalues
, eigendecomp
, lup_decomp
, solve
, inverse
and det
.get_row
no longer returns a &[T]
. Instead it returns the new Row
type.&[T]
item. Instead if uses the new Row
type.BaseMatrix
and BaseMatrixMut
traits to a new matrix/base
module.FromIterator
for Vector
.from_fn
for Vector
.get_unchecked
for Vector
.try_into
function using num's NumCast
for Matrix
.Metric
; MatrixNorm
and VectorNorm
. These come with MatrixMetric
and VectorMetric
traits too.Euclidean
and Lp
norms.get_row
functions now return the new Row
type.get_col
function which returns the new Column
type.row_iter
function uses the new Row
type as the iterator Item
.swap_rows
and swap_cols
functions are now no-ops if given two identical indices.slice
module for developer QOL.assert_matrix_eq!
and assert_vector_eq!
macros for easier equality checks. Provides multiple equality comparisons: ulp
, abs
, float
, exact
.lu
module.iter_diag
and iter_diag_mut
functions to BaseMatrix
and BaseMatrixMut
respectively.matrix!
macro now works on empty matrices.decomposition
module.assert!
that a matrix is triangular.matrix!
macro and other tidier constructors.MachineEpsilon
trait. The same functionality now exists in num.From
/Into
for traits for Vec
and Vector
.det()
now returns 0
instead of panicking if Matrix
is singular.matrix!
macro for creating (small) matrices.from_fn
constructor for Matrix
.IndexMut
for Vector
.iter
and iter_mut
for Vector
.IntoIter
for Vector
.Matrix::variance
now returns a Result
.swap_rows
and swap_cols
function to BaseMatrixMut
.Display
for Vector
.sum_rows
and sum_cols
functions.select_rows
and select_cols
. These functions now take an ExactSizeIterator
instead of a slice.This is a large release which refactors most of the matrix
module. We modify the BaseSlice
trait to encompass Matrix
functionality too - hence renaming it BaseMatrix
. The motivation behind this is to allow us to be generic over Matrix
/MatrixSlice
/MatrixSliceMut
.
BaseSlice
trait as BaseMatrix
. Implement this trait for Matrix
too.Matrix
functionality is now implemented behind the BaseMatrix
trait. It will need to be use
d to access this functionality.BaseMatrixMut
trait for Matrix
and MatrixSliceMut
.Matrix
only or for MatrixSlice(Mut)
only now work with both!sub_slice
method.-None
Eq
trait.Hash
trait.get_row_*
methods for all Matrix
types. Includes mutable and unchecked get
functions.Matrix
(instead of cloning at the start).get_unchecked_mut
returned &T
instead of &mut T
.This release marks the separation of rulinalg from rusty-machine.
Rulinalg is now its own crate!