public enum NewtonRootType extends Enum<NewtonRootType> implements Enumeration
Enum Constant and Description |
---|
FOUND_SOLUTION
The root has a valid result after
NewtonFindRoot.findRoot(int) has successfully run. |
INITIAL_GUESS
The value of the root has just been set as an initial guess and has yet to be
solved for. |
SOLUTION_DID_NOT_CONVERGE
The attempt to solve for the location of the root failed as the solution did not converge in the
allowed number of iterations.
|
SOLVER_FAILED_DUE_TO_HORIZONTAL_SLOPE
The attempt to solve for the location of the root failed due to the derivative equaling zero, making a next guess impossible to calculate
using this algorithm.
|
Modifier and Type | Method and Description |
---|---|
static NewtonRootType |
getDefault()
Get the enum constant that is considered to be the default.
|
static NewtonRootType |
getFromValue(int value)
Get the enum constant that is associated with the given numeric value.
|
int |
getValue()
Get the numeric value associated with this enum constant.
|
static NewtonRootType |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static NewtonRootType[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final NewtonRootType INITIAL_GUESS
solved
for.public static final NewtonRootType FOUND_SOLUTION
NewtonFindRoot.findRoot(int)
has successfully run.public static final NewtonRootType SOLUTION_DID_NOT_CONVERGE
public static final NewtonRootType SOLVER_FAILED_DUE_TO_HORIZONTAL_SLOPE
BrentFindRoot
as an alternative method to solve for the root of your function.
Root
(get
) contains the location of the guess which led to the zero derivative.public static NewtonRootType[] values()
for (NewtonRootType c : NewtonRootType.values()) System.out.println(c);
public static NewtonRootType valueOf(String name)
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is nullpublic int getValue()
getValue
in interface Enumeration
@Nonnull public static NewtonRootType getFromValue(int value)
value
- a numeric value.@Nonnull public static NewtonRootType getDefault()