Class Constant<R extends Ring<R>>
- java.lang.Object
-
- org.jscience.mathematics.function.Function<R,R>
-
- org.jscience.mathematics.function.Polynomial<R>
-
- org.jscience.mathematics.function.Constant<R>
-
- All Implemented Interfaces:
Serializable
,javolution.lang.Immutable
,javolution.lang.Realtime
,javolution.lang.ValueType
,GroupAdditive<Polynomial<R>>
,Ring<Polynomial<R>>
,Structure<Polynomial<R>>
public final class Constant<R extends Ring<R>> extends Polynomial<R>
This class represents a constant function (polynomial of degree 0).
- See Also:
- Serialized Form
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description R
getValue()
Returns the constant value for this function.static <R extends Ring<R>>
Constant<R>valueOf(R value)
Returns a constant function of specified value.-
Methods inherited from class org.jscience.mathematics.function.Polynomial
compose, compose, copy, differentiate, equals, evaluate, getCoefficient, getOrder, getTerms, getVariables, hashCode, integrate, minus, minus, opposite, plus, plus, plus, pow, times, times, times, toText, valueOf, valueOf
-
-
-
-
Method Detail
-
valueOf
public static <R extends Ring<R>> Constant<R> valueOf(R value)
Returns a constant function of specified value.- Parameters:
value
- the value returned by this function.- Returns:
- the corresponding constant function.
-
getValue
public R getValue()
Returns the constant value for this function.- Returns:
getCoefficient(Term.CONSTANT)
-
-