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.
-
Nested Class Summary
Nested Classes -
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.doubledoublestatic <I> FreeMatrix<I> identity()booleanbooleanisZero()multiply(FreeMatrix<I> other) multiply(FreeVector<I> other) doublemultiply(FreeVector<I> left, FreeVector<I> right) multiplyCoords(FreeMatrix<I> other) power(long exponent) 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, hasNonNegativeCoords, hasZeroCoords, 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:
scalein classAbstractFreeVector<Tuple2<I,I>>
-
trim
- Specified by:
trimin 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
-
power
-
isZero
public boolean isZero()- Overrides:
isZeroin classAbstractFreeVector<Tuple2<I,I>>
-
isNonNegative
public boolean isNonNegative()- Overrides:
isNonNegativein classAbstractFreeVector<Tuple2<I,I>>
-