This document will be used to keep track of changes made between release versions. I'll do my best to note any breaking changes!
- None, but
Matrix::lup_decomp
has been deprecated and will be removed soon.
- Added dedicated
PermutationMatrix
. This type provides more efficent operations with permutation matrices. - Added CSV read/write functionality to
Matrix
. Underio
feature flag. - Added column iterators, accessed via
BaseMatrix::col_iter
andBaseMatrixMut::col_iter_mut
functions. - Added new
PartialPivLU
struct which contains the result of an LUP decomposition. This struct will replace theMatrix::lup_decomp
function in a future release.
- Fixed an overflow bug with
SliceIter
.
- Fixed (very) minor performance issue in
min
/max
functions.
- None
- Added new
vector!
macro forVector
construction. - Added new
min
andmax
functions to theBaseMatrix
trait. - Implemented conversion traits to convert
Row
/Column
types toVector
.
- None
- Performance improvement to
BaseMatrix::sum_rows
function. also gives passive improvement tomean
andvariance
. - Improving layout of the
vector
module. - Made
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.
- The
reslice
function forMatrixSlice
andMatrixSliceMut
has been depreciated. - Rename iterator functions to
*_iter(_mut)
. Affected functions are:iter_diag
,iter_diag_mut
,iter_rows
,iter_rows_mut
. - The
BaseMatrix
diag
function now returns an iterator. - Removed the
Metric
trait and all implementations. - Some functions now consume
self
instead of cloning internally:eigenvalues
,eigendecomp
,lup_decomp
,solve
,inverse
anddet
. - The
get_row
no longer returns a&[T]
. Instead it returns the newRow
type. - Row iterator no longer has a
&[T]
item. Instead if uses the newRow
type. - Moved the
BaseMatrix
andBaseMatrixMut
traits to a newmatrix/base
module.
- Implemented
FromIterator
forVector
. - Implemented
from_fn
forVector
. - Implemented
get_unchecked
forVector
. - Implemented
try_into
function using num'sNumCast
forMatrix
. - Added new traits to replace
Metric
;MatrixNorm
andVectorNorm
. These come withMatrixMetric
andVectorMetric
traits too. - Added new
Euclidean
andLp
norms. - The
get_row
functions now return the newRow
type. - Added a new
get_col
function which returns the newColumn
type. - The
row_iter
function uses the newRow
type as the iteratorItem
.
- Fixed a bug in the ULP comparator where only exact matches were allowed.
- The
swap_rows
andswap_cols
functions are now no-ops if given two identical indices. - Splitting out the
slice
module for developer QOL.
- None
- Added new
assert_matrix_eq!
andassert_vector_eq!
macros for easier equality checks. Provides multiple equality comparisons:ulp
,abs
,float
,exact
.
- Further improvements (performance and stability) to the LU decomposition algorithm.
- Removed import warning on
lu
module.
- None
- None
- Improved numerical stability of the LUP decomposition.
- None
- None
- Added new
iter_diag
anditer_diag_mut
functions toBaseMatrix
andBaseMatrixMut
respectively.
- The
matrix!
macro now works on empty matrices.
- Some refactoring of
decomposition
module. - More lenient error handling on triangular solvers.
They no longer
assert!
that a matrix is triangular. - All tests are now using
matrix!
macro and other tidier constructors.
- Removed the
MachineEpsilon
trait. The same functionality now exists in num.
- Implemented
From
/Into
for traits forVec
andVector
.
det()
now returns0
instead of panicking ifMatrix
is singular.
- None
- None
- SVD now returns singular values in descending order.
- Implemented a new
matrix!
macro for creating (small) matrices. - Added a
from_fn
constructor forMatrix
. - Implementing
IndexMut
forVector
. - Added
iter
anditer_mut
forVector
. - Implemented
IntoIter
forVector
.
- Fixed bug with SVD convergence (would loop endlessly).
- Singular values from SVD are now non-negative.
- None
Matrix::variance
now returns aResult
.
- Added
swap_rows
andswap_cols
function toBaseMatrixMut
.
- Implemented
Display
forVector
.
- None
- None
- Improved documentation for
sum_rows
andsum_cols
functions. - Generalized signature of
select_rows
andselect_cols
. These functions now take anExactSizeIterator
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
.
- Refactor
BaseSlice
trait asBaseMatrix
. Implement this trait forMatrix
too. - Much of the
Matrix
functionality is now implemented behind theBaseMatrix
trait. It will need to beuse
d to access this functionality.
- Add a new
BaseMatrixMut
trait forMatrix
andMatrixSliceMut
. - Many methods which were previously for
Matrix
only or forMatrixSlice(Mut)
only now work with both!
- Fixing a bug in the
sub_slice
method. - Modifying some unsafe code to use equivalent iterators instead.
- More benchmarks for wider performance regression coverage.
-None
- Vector and Matrix now derive the
Eq
trait. - Vector and Matrix now derive the
Hash
trait.
- None
- None
- Adding new
get_row_*
methods for allMatrix
types. Includes mutable and uncheckedget
functions.
- None
- Upper Hessenberg decomposition now consumes the input
Matrix
(instead of cloning at the start).
- Added Bidiagonal decomposition.
- Added Singular Value Decomposition.
- Fixed a bug where
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!