rl_matrix 0.3.0 copy "rl_matrix: ^0.3.0" to clipboard
rl_matrix: ^0.3.0 copied to clipboard

outdatedDart 1 only

Provides an immutable implementation for matrices of real numbers in Dart, based on Java's JAMA package.

RL-matrix Change Log #

0.3.0 #

BC break: as of this version, the matrix implementation uses a Float32List for value memory. This should constitute a significant performance boost, but also means that matrices now need to be instantiated with double values and can no longer be instantiated with int values:

var matrix = new Matrix([1, 2, 3,
                         4, 5, 6], 3);

// Needs to be replaced with:

var matrix = new Matrix([1.0, 2.0, 3.0,
                         4.0, 5.0, 6.0], 3);

0.2.0 #

BC break: the brackets operator [] implementation was removed from GenericMatrix and added to Matrix. It's now up to a subclass of GenericMatrix whether or not to implement the [] operator and to decide what the return type should be:

class ColumnVector extends GenericMatrix<ColumnVector, RowVector> {
  ...

  num operator [](int index) => valueAt(index, 0);
}

0.1.0 #

Adds a brackets [] operator to matrices. This allows you to get the value at a specific position in the matrix:

var matrix = new Matrix([1, 2, 3,
                         4, 5, 6], 3);
                         
print(matrix[1][2]); // 6

Rows and columns are zero indexed, so [0][0] is the top left value.

Also adds a custom equality == operator, which will find 2 matrices to be equal if their dimensions are equal and they contain the same values.

var matrix1 = new Matrix([1, 2, 3,
                          4, 5, 6], 3);
var matrix2 = new Matrix([1, 2, 3,
                          4, 5, 6], 3);
                          
print(matrix1 == matrix2); // true

It does not check the matrix object types, so an instance of a custom subclass of GenericMatrix may still be equal to an instance of Matrix if the dimensions and values match.

0
likes
0
pub points
0%
popularity

Publisher

unverified uploader

Provides an immutable implementation for matrices of real numbers in Dart, based on Java's JAMA package.

Repository (GitHub)
View/report issues

License

unknown (LICENSE)

Dependencies

collection

More

Packages that depend on rl_matrix