Package org.flag4j.core
Interface TensorPropertiesMixin
- All Known Implementing Classes:
CMatrix
,ComplexDenseTensorBase
,ComplexSparseTensorBase
,CooCMatrix
,CooCTensor
,CooCVector
,CooMatrix
,CooTensor
,CooVector
,CsrCMatrix
,CsrMatrix
,CTensor
,CVector
,DenseTensorBase
,Matrix
,RealDenseTensorBase
,RealSparseTensorBase
,SparseTensorBase
,Tensor
,TensorBase
,Vector
interface TensorPropertiesMixin
This interface specifies methods which provide properties of a tensor. All tensors should implement this interface.
-
Method Summary
Modifier and TypeMethodDescriptionint[]
argMax()
Finds the indices of the maximum value in this tensor.int[]
argMin()
Finds the indices of the minimum value in this tensor.double
max()
Finds the maximum value in this tensor.double
maxAbs()
Finds the maximum value, in absolute value, in this tensor.double
min()
Finds the minimum value in this tensor.double
minAbs()
Finds the minimum value, in absolute value, in this tensor.
-
Method Details
-
min
double min()Finds the minimum value in this tensor. If this tensor is complex, then this method finds the smallest value in magnitude.- Returns:
- The minimum value (smallest in magnitude for a complex valued tensor) in this tensor.
-
max
double max()Finds the maximum value in this tensor. If this tensor is complex, then this method finds the largest value in magnitude.- Returns:
- The maximum value (largest in magnitude for a complex valued tensor) in this tensor.
-
minAbs
double minAbs()Finds the minimum value, in absolute value, in this tensor. If this tensor is complex, then this method is equivalent tomin()
.- Returns:
- The minimum value, in absolute value, in this tensor.
-
maxAbs
double maxAbs()Finds the maximum value, in absolute value, in this tensor. If this tensor is complex, then this method is equivalent tomax()
.- Returns:
- The maximum value, in absolute value, in this tensor.
-
argMin
int[] argMin()Finds the indices of the minimum value in this tensor.- Returns:
- The indices of the minimum value in this tensor. If this value occurs multiple times, the indices of the first entry (in row-major ordering) are returned.
-
argMax
int[] argMax()Finds the indices of the maximum value in this tensor.- Returns:
- The indices of the maximum value in this tensor. If this value occurs multiple times, the indices of the first entry (in row-major ordering) are returned.
-