JScience v3.3

org.jscience.mathematics.functions
Class Constant<R extends Ring<R>>

java.lang.Object
  extended by javolution.context.RealtimeObject
      extended by org.jscience.mathematics.functions.Function<R,R>
          extended by org.jscience.mathematics.functions.Polynomial<R>
              extended by org.jscience.mathematics.functions.Constant<R>
All Implemented Interfaces:
java.io.Serializable, Realtime, Immutable, 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).

Version:
3.1, April 1, 2006
Author:
Jean-Marie Dautelle
See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class javolution.context.RealtimeObject
RealtimeObject.Factory<T extends RealtimeObject>
 
Nested classes/interfaces inherited from interface javolution.context.Realtime
Realtime.ObjectSpace
 
Method Summary
 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.functions.Polynomial
compose, compose, differentiate, equals, evaluate, getCoefficient, getOrder, getTerms, getVariables, hashCode, integrate, minus, minus, move, opposite, plus, plus, plus, pow, times, times, times, toText, valueOf, valueOf
 
Methods inherited from class org.jscience.mathematics.functions.Function
divide, evaluate, evaluate, getVariable
 
Methods inherited from class javolution.context.RealtimeObject
export, isLocal, moveHeap, preserve, toString, unpreserve
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

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)

JScience v3.3

Copyright © 2006 JScience.