Package org.hipparchus.linear
Enum DependentVectorsHandler
- All Implemented Interfaces:
Serializable
,Comparable<DependentVectorsHandler>
,java.lang.constant.Constable
Enumerate to specify how dependent vectors should be handled in
MatrixUtils.orthonormalize(List, double, DependentVectorsHandler)
and
MatrixUtils.orthonormalize(Field, List, CalculusFieldElement, DependentVectorsHandler)
.- Since:
- 2.1
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantDescriptionReplace dependent vectors by vectors with norm 0.Generate aMathIllegalArgumentException
if dependent vectors are found.Ignore dependent vectors. -
Method Summary
Modifier and TypeMethodDescriptionabstract int
manageDependent
(int index, List<RealVector> basis) Manage a dependent vector.abstract <T extends CalculusFieldElement<T>>
intmanageDependent
(Field<T> field, int index, List<FieldVector<T>> basis) Manage a dependent vector.static DependentVectorsHandler
Returns the enum constant of this type with the specified name.static DependentVectorsHandler[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
Enum Constant Details
-
GENERATE_EXCEPTION
Generate aMathIllegalArgumentException
if dependent vectors are found. -
ADD_ZERO_VECTOR
Replace dependent vectors by vectors with norm 0.This behavior matches the Wolfram language API. It keeps the number of output vectors equal to the number of input vectors. The only two norms output vectors can have are 0 and 1.
-
REDUCE_BASE_TO_SPAN
Ignore dependent vectors.This behavior ensures the output vectors form an orthonormal basis, i.e. all vectors are independent and they all have norm 1. The number of output vectors may be smaller than the number of input vectors, this number corresponds to the dimension of the span of the input vectors.
-
-
Method Details
-
values
Returns an array containing the constants of this enum type, in the order they are declared.- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is null
-
manageDependent
Manage a dependent vector.- Parameters:
index
- of the vector in the basisbasis
- placeholder for basis vectors- Returns:
- next index to manage
-
manageDependent
public abstract <T extends CalculusFieldElement<T>> int manageDependent(Field<T> field, int index, List<FieldVector<T>> basis) Manage a dependent vector.- Type Parameters:
T
- type of the vectors components- Parameters:
field
- field to which the vectors belongindex
- of the vector in the basisbasis
- placeholder for basis vectors- Returns:
- next index to manage
-