SuanShu, a Java numerical and statistical library

com.numericalmethod.suanshu.analysis.function.polynomial.root
Enum Solver.Type

java.lang.Object
  extended by java.lang.Enum<Solver.Type>
      extended by com.numericalmethod.suanshu.analysis.function.polynomial.root.Solver.Type
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable<Solver.Type>
Enclosing interface:
Solver

public static enum Solver.Type
extends java.lang.Enum<Solver.Type>

the type of polynomials the solver can solve


Enum Constant Summary
CUBIC
          can solve polynomial equations up to degree 3
GENERAL
          can solve zeros for any polynomials
LINEAR
          can solve linear equations
QUADRATIC
          can solve quadratic equations
QUARTIC
          can solve polynomial equations up to degree 4
 
Method Summary
static Solver.Type fromDegree(int degree)
           
static Solver.Type valueOf(java.lang.String name)
          Returns the enum constant of this type with the specified name.
static Solver.Type[] values()
          Returns an array containing the constants of this enum type, in the order they are declared.
 
Methods inherited from class java.lang.Enum
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

GENERAL

public static final Solver.Type GENERAL
can solve zeros for any polynomials


LINEAR

public static final Solver.Type LINEAR
can solve linear equations


QUADRATIC

public static final Solver.Type QUADRATIC
can solve quadratic equations


CUBIC

public static final Solver.Type CUBIC
can solve polynomial equations up to degree 3


QUARTIC

public static final Solver.Type QUARTIC
can solve polynomial equations up to degree 4

Method Detail

values

public static Solver.Type[] 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 (Solver.Type c : Solver.Type.values())
    System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they are declared

valueOf

public static Solver.Type valueOf(java.lang.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:
java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
java.lang.NullPointerException - if the argument is null

fromDegree

public static Solver.Type fromDegree(int degree)

SuanShu, a Java numerical and statistical library

Copyright © 2011 Numerical Method Inc. Ltd. All Rights Reserved.