Package eu.bandm.tools.ops
Class FreeMatrix<I>
- Type Parameters:
I
- the index type
A real-valued matrix over an index set with finitely many nonzero
coordinates, except perhaps for the diagonal.
-
Field Summary
FieldsFields inherited from class eu.bandm.tools.ops.AbstractFreeVector
coords
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionadd
(FreeMatrix<I> other) static <I> FreeMatrix
<I> build
(Set<Tuple2<I, I>> support, ToDoubleBiFunction<? super I, ? super I> value, double identityDefault) static <I> FreeMatrix
<I> build
(Set<I> rowSupport, Set<I> columnSupport, ToDoubleBiFunction<? super I, ? super I> value, double identityDefault) Returns a function view on one column of this matrix.double
double
static <I> FreeMatrix
<I> identity()
static void
multiply
(FreeMatrix<I> other) multiply
(FreeVector<I> other) double
multiply
(FreeVector<I> left, FreeVector<I> right) multiplyCoords
(FreeMatrix<I> other) Returns a function view on one row of this matrix.scale
(double factor) <J> FreeMatrix
<J> transformBoth
(Function<I, J> fun) Returns a copy of this matrix where rows and columns are exchanged.trim
(double epsilon) static <I> FreeMatrix
<I> unit
(I rowIndex, I columnIndex) static <I> FreeMatrix
<I> unit
(I rowIndex, I columnIndex, double value) static <I> FreeMatrix
<I> zero()
Methods inherited from class eu.bandm.tools.ops.AbstractFreeVector
addCoords, buildCoords, nearlyEqual, scaleCoords, transformCoords, trimCoords
-
Field Details
-
identityDefault
protected final double identityDefault
-
-
Constructor Details
-
FreeMatrix
-
-
Method Details
-
get
-
get
-
zero
-
identity
-
unit
-
unit
-
build
public static <I> FreeMatrix<I> build(Set<Tuple2<I, I>> support, ToDoubleBiFunction<? super I, ? super I> value, double identityDefault) -
build
public static <I> FreeMatrix<I> build(Set<I> rowSupport, Set<I> columnSupport, ToDoubleBiFunction<? super I, ? super I> value, double identityDefault) -
scale
- Specified by:
scale
in classAbstractFreeVector<Tuple2<I,
I>>
-
trim
- Specified by:
trim
in classAbstractFreeVector<Tuple2<I,
I>>
-
add
-
transformBoth
-
transpose
Returns a copy of this matrix where rows and columns are exchanged.- Returns:
- a copy of this matrix where rows and columns are exchanged
-
row
Returns a function view on one row of this matrix.- Parameters:
index
- the row index- Returns:
- a function that returns the coordinates in the specified row of this matrix
- See Also:
-
column
Returns a function view on one column of this matrix.- Parameters:
index
- the column index- Returns:
- a function that returns the coordinates in the specified column of this matrix
- See Also:
-
rowSupport
-
columnSupport
-
multiply
-
multiplyCoords
-
multiply
-
multiply
-
main
-