Package org.hipparchus.linear
Enum DependentVectorsHandler
- java.lang.Object
-
- java.lang.Enum<DependentVectorsHandler>
-
- org.hipparchus.linear.DependentVectorsHandler
-
- All Implemented Interfaces:
Serializable
,Comparable<DependentVectorsHandler>
public enum DependentVectorsHandler extends Enum<DependentVectorsHandler>
Enumerate to specify how dependent vectors should be handled inMatrixUtils.orthonormalize(List, double, DependentVectorsHandler)
andMatrixUtils.orthonormalize(Field, List, CalculusFieldElement, DependentVectorsHandler)
.- Since:
- 2.1
-
-
Enum Constant Summary
Enum Constants Enum Constant Description ADD_ZERO_VECTOR
Replace dependent vectors by vectors with norm 0.GENERATE_EXCEPTION
Generate aMathIllegalArgumentException
if dependent vectors are found.REDUCE_BASE_TO_SPAN
Ignore dependent vectors.
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract 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
valueOf(String name)
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 Detail
-
GENERATE_EXCEPTION
public static final DependentVectorsHandler GENERATE_EXCEPTION
Generate aMathIllegalArgumentException
if dependent vectors are found.
-
ADD_ZERO_VECTOR
public static final DependentVectorsHandler 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
public static final DependentVectorsHandler 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 Detail
-
values
public static DependentVectorsHandler[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (DependentVectorsHandler c : DependentVectorsHandler.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static DependentVectorsHandler valueOf(String name)
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
public abstract int manageDependent(int index, List<RealVector> basis)
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
-
-