Package com.irurueta.algebra
Class InfinityNormComputer
java.lang.Object
com.irurueta.algebra.NormComputer
com.irurueta.algebra.InfinityNormComputer
Class in charge of computing infinity norms of vectors and matrices.
Infinity norm is defined as the maximum row sum on a matrix or vector.
For the case of arrays, this library considers arrays as column matrices with one column and array length rows, hence absolute value of first element in array is returned as infinity norm.
-
Field Summary
Fields inherited from class com.irurueta.algebra.NormComputer
DEFAULT_NORM_TYPE
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiondouble
getNorm
(double[] array) Computes norm of provided array.double
Computes norm of provided matrix.Returns norm type being used by this class.static double
norm
(double[] array) Computes norm of provided array.static double
Computes norm of provided array and stores the jacobian into provided instance.static double
Computes norm of provided matrix.Methods inherited from class com.irurueta.algebra.NormComputer
create, create, getNorm
-
Constructor Details
-
InfinityNormComputer
public InfinityNormComputer()Constructor of this class.
-
-
Method Details
-
getNormType
Returns norm type being used by this class.- Specified by:
getNormType
in classNormComputer
- Returns:
- Norm type being used by this class.
-
norm
Computes norm of provided matrix.- Parameters:
m
- matrix being used for norm computation.- Returns:
- norm of provided matrix.
-
norm
Computes norm of provided array and stores the jacobian into provided instance.- Parameters:
array
- array being used for norm computation.jacobian
- instance where jacobian will be stored. Must be 1xN, where N is length of array.- Returns:
- norm of provided vector.
- Throws:
WrongSizeException
- if provided jacobian is not 1xN, where N is length of array.
-
getNorm
Computes norm of provided matrix.- Specified by:
getNorm
in classNormComputer
- Parameters:
m
- Matrix being used for norm computation.- Returns:
- Norm of provided matrix.
-
norm
public static double norm(double[] array) Computes norm of provided array.- Parameters:
array
- array being used for norm computation.- Returns:
- norm of provided vector.
-
getNorm
public double getNorm(double[] array) Computes norm of provided array.- Specified by:
getNorm
in classNormComputer
- Parameters:
array
- Array being used for norm computation.- Returns:
- Norm of provided vector.
-