Class Function

java.lang.Object
mgui.interfaces.AbstractInterfaceObject
mgui.models.dynamic.functions.Function
All Implemented Interfaces:
AttributeObject, InterfaceObject, NamedObject, TreeObject, CleanableObject
Direct Known Subclasses:
DecayFunction, HardLimitFunction, ODEFunction, SigmoidFunction

public abstract class Function
extends AbstractInterfaceObject
implements AttributeObject
Abstract class for all model functions.
Author:
Andrew Reid
  • Field Details

    • attributes

      public AttributeList attributes
    • isDestroyed

      public boolean isDestroyed
  • Constructor Details

    • Function

      public Function()
  • Method Details

    • init

      protected void init()
    • evaluate

      public abstract double evaluate​(double d)
      Evaluate function with a single parameter d
      Parameters:
      d -
      Returns:
      result of the evaluation
    • evaluate

      public abstract double[] evaluate​(double[] d)
      Evaluate function with multiple parameters d
      Parameters:
      d -
      Returns:
      result of the evaluation
    • getAttribute

      public Attribute<?> getAttribute​(java.lang.String attrName)
      Description copied from interface: AttributeObject
      Returns a specific attribute for this object.
      Specified by:
      getAttribute in interface AttributeObject
      Returns:
    • getAttributes

      public AttributeList getAttributes()
      Description copied from interface: AttributeObject
      Returns the list of current attributes for this object.
      Specified by:
      getAttributes in interface AttributeObject
      Returns:
    • setAttribute

      public void setAttribute​(java.lang.String attrName, java.lang.Object newValue)
      Description copied from interface: AttributeObject
      Sets a value for a specific attribute.
      Specified by:
      setAttribute in interface AttributeObject
    • setAttributes

      public void setAttributes​(AttributeList thisList)
      Description copied from interface: AttributeObject
      Sets the list of attributes for this object.
      Specified by:
      setAttributes in interface AttributeObject
    • getAttributeValue

      public java.lang.Object getAttributeValue​(java.lang.String name)
      Description copied from interface: AttributeObject
      Gets the value of attribute name, or null if it does not exist.
      Specified by:
      getAttributeValue in interface AttributeObject
      Parameters:
      name - Name of the attribute
      Returns:
      the value of attribute name, or null if it does not exist
    • getTreeNodeCopy

      public InterfaceTreeNode getTreeNodeCopy()
    • setTreeNode

      public void setTreeNode​(InterfaceTreeNode treeNode)
      Description copied from interface: TreeObject
      Sets the children for this node's InterfaceTreeNode.
      Specified by:
      setTreeNode in interface TreeObject
      Overrides:
      setTreeNode in class AbstractInterfaceObject
    • clone

      public java.lang.Object clone()
      Overrides:
      clone in class java.lang.Object
    • toString

      public java.lang.String toString()
      Overrides:
      toString in class java.lang.Object
    • destroy

      public void destroy()
      Description copied from interface: InterfaceObject
      Destroy this object (prepare it to be removed from memory)
      Specified by:
      destroy in interface InterfaceObject
      Overrides:
      destroy in class AbstractInterfaceObject
    • isDestroyed

      public boolean isDestroyed()
      Description copied from interface: InterfaceObject
      Test whether this object has been destroyed
      Specified by:
      isDestroyed in interface InterfaceObject
      Overrides:
      isDestroyed in class AbstractInterfaceObject
      Returns: