JADE v6.1

com.dautelle.math.functions
Class DiscreteFunction

java.lang.Object
  extended bycom.dautelle.realtime.RealtimeObject
      extended bycom.dautelle.math.functions.Function
          extended bycom.dautelle.math.functions.DiscreteFunction
All Implemented Interfaces:
Operable, Realtime, java.io.Serializable

public final class DiscreteFunction
extends Function

This class represents a function being actually defined from a mapping between two sets.

Version:
6.0, March 24, 2004
Author:
Jean-Marie Dautelle
See Also:
Serialized Form

Nested Class Summary
 
Nested classes inherited from class com.dautelle.math.functions.Function
Function.Variable
 
Nested classes inherited from class com.dautelle.realtime.RealtimeObject
RealtimeObject.Factory
 
Method Summary
 Operable evaluate()
          Evaluates this function by replacing its variables by their current (context-local) values.
 java.lang.Object export()
          Exports this object out of the current pool context.
 java.util.Map getMapping()
          Returns the mapping of this discrete function.
 java.util.Set getVariables()
          Returns a set containing this function variables.
 java.lang.Object toHeap()
          Moves this object to the heap.
static DiscreteFunction valueOf(java.util.Map mapping, Function.Variable variable)
          Returns the DiscreteFunction defined from the specified mapping between two sets.
 
Methods inherited from class com.dautelle.math.functions.Function
appendTo, compose, differentiate, integrate, opposite, plus, pow, reciprocal, times, toString
 
Methods inherited from class com.dautelle.realtime.RealtimeObject
clone, isLocalObject, isPoolObject, recycle
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Method Detail

valueOf

public static DiscreteFunction valueOf(java.util.Map mapping,
                                       Function.Variable variable)
Returns the DiscreteFunction defined from the specified mapping between two sets.

Parameters:
mapping - the index-value mapping of this function.
variable - this function variable.
Returns:
the corresponding function.

getMapping

public java.util.Map getMapping()
Returns the mapping of this discrete function.

Returns:
the map object as specified during construction.
See Also:
valueOf(java.util.Map, com.dautelle.math.functions.Function.Variable)

evaluate

public Operable evaluate()
Description copied from class: Function
Evaluates this function by replacing its variables by their current (context-local) values.

Specified by:
evaluate in class Function
Returns:
the evaluation of this function.

getVariables

public java.util.Set getVariables()
Description copied from class: Function
Returns a set containing this function variables.

Specified by:
getVariables in class Function
Returns:
the variables for this function.

export

public java.lang.Object export()
Description copied from interface: Realtime
Exports this object out of the current pool context. Realtime members are exported as well (recursion). This method affects only objects belonging to the current pool context. To avoid pool depletion, a "free" object from the outer pool is moved to replace the object being exported.

Specified by:
export in interface Realtime
Overrides:
export in class RealtimeObject

toHeap

public java.lang.Object toHeap()
Description copied from interface: Realtime
Moves this object to the heap. Realtime members are moved to the heap as well (recursion). This method affects only objects belonging to a pool context (current or not).

Specified by:
toHeap in interface Realtime
Overrides:
toHeap in class RealtimeObject

JADE v6.1

Copyright © 2004 Jean-Marie Dautelle.