org.licas.service.link

## Class Thresholds

- java.lang.Object
- - org.licas.service.link.Thresholds

-     public class Thresholds
      extends java.lang.Object

  This class is the base structure for the dynamic links from one source to other sources. Each link is stored as a `ThresholdSource` and relates to an association with one other source only. This class stores the references to all related sources in all of the different linking levels. It also updates these references when a new group of source references is presented.

  This class only represents the final or leaf node structures that contain the link values for each source. Any path associated with a group of linked sources is stored in the `Link`, `Link_M`, or related linking service classes. Each evaluation is now passed through an activation function that can be defined by its class name. This defaults to the linear type that simply returns the same value that is passed in. Other types can make the link value evaluation less linear, but there is no check on any correctness, as any relevant function can be added. The only exception is a check for the value of `<= 0`, which is done using the link value only, without any activation function.

  Author:
    Kieran Greer

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected float` | `decWeight` The amount to weight decrement values by
    `protected org.ai_heuristic.functs.FunctionActivate` | `functionActive` The activation function to use.
    `protected float` | `increment` The amount to increment source values by
    `protected float` | `incWeight` The amount to weight increment values by
    `protected java.lang.String` | `linkMethod` The linking method used
    `protected int` | `linkNumber` The number of links to store
    `protected LinkSpec` | `linkSpec` The original threshold config values
    `protected float` | `linkThreshold` The threshold to add a link
    `protected java.util.HashMap<java.lang.String,ThresholdSource>` | `linkValues` The actual values at the link level.
    `protected int` | `maxNegative` The maximum number of allowed negative entries for each link
    `protected int` | `monitorNumber` The number of monitors to store
    `protected float` | `monitorThreshold` The threshold to monitor the source
    `protected java.util.HashMap<java.lang.String,ThresholdSource>` | `monitorValues` The actual values at the monitor level.
    `protected Link` | `parent` The parent component
    `protected int` | `possibleNumber` The number of possible sources to store
    `protected java.util.HashMap<java.lang.String,ThresholdSource>` | `possibleValues` A source for possible values that may later be monitored.
    `protected ThresholdSource` | `reserve` The reserve source that may be added
    `protected java.util.HashMap<java.lang.String,java.lang.Long>` | `timeStamps` The times the sources were last incremented
    `protected int` | `totalMovedDown` The number of sources moved down because they fell below the threshold
    `protected int` | `totalMovedUp` The number of sources moved up / swapped next level up
    `protected java.util.ArrayList<java.lang.Object>` | `updatedSources` A list of sources that have already been updated

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `Thresholds(int thisMaxNegative, LinkSpec thisLinkSpec)` Creates a new instance of Thresholds.
    `Thresholds(int thisMaxNegative, LinkSpec thisLinkSpec, Link thisParent)` Creates a new instance of Thresholds.
    `Thresholds(LinkSpec thisLinkSpec)` Creates a new instance of Thresholds.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `protected float` | `activationValue(float sourceWeight)` Return the activation value for the specified source weight value.
    `void` | `changeLinkNumber(int changeNumber)` Change the number of link sources to store.
    `void` | `changeMonitorNumber(int changeNumber)` Change the number of monitor sources to store.
    `void` | `changePossibleNumber(int changeNumber)` Change the number of possible sources to store.
    `org.ai_heuristic.functs.FunctionActivate` | `cloneFunction()` Return a new instance of the activation function stored in this Thresholds structure.
    `protected boolean` | `contains(java.util.ArrayList<java.lang.Object> sources, java.lang.Object key)` Return true if the sources contain a source with the key specified.
    `protected void` | `createActivationFunction()` Create the activation function, from the spec description.
    `void` | `decrementReserve(java.util.ArrayList<java.lang.Object> sources)` If the reserve source is not the same name then decrement its value.
    `org.ai_heuristic.functs.FunctionActivate` | `getActivationFunction()` Get the activation function.
    `protected float` | `getDecrement()` Get the value to decrement sources by.
    `float` | `getDecWeight()` Get the decrement weight value.
    `float` | `getIncrement()` Get the increment value.
    `float` | `getIncWeight()` Get the increment weight value.
    `int` | `getLinkCount()` Get the number of sources stored as links.
    `java.lang.String` | `getLinkMethod()` Get the linking method used.
    `int` | `getLinkNumber()` Get the number of links to store.
    `java.util.ArrayList<java.lang.Object>` | `getLinkSources()` Get the link sources.
    `java.util.ArrayList<java.lang.Object>` | `getLinkSources(java.util.ArrayList<java.lang.Object> negativeSources)` Get the link sources, where the negative concepts do not apply.
    `LinkSpec` | `getLinkSpec()` Get the original linking configuration.
    `float` | `getLinkThreshold()` Get the link threshold value.
    `ThresholdSource` | `getMinSource(int thresholdType)` Return the minimum source name for the specified threshold type: link, monitor or possible.
    `int` | `getMonitorCount()` Get the number of sources stored as monitors.
    `int` | `getMonitorNumber()` Get the number of monitors to store.
    `float` | `getMonitorThreshold()` Get the monitor threshold value.
    `java.util.HashMap<java.lang.String,ThresholdSource>` | `getMonitorValues()` Get the monitor values.
    `int` | `getPossibleCount()` Get the number of sources stored as possible links.
    `int` | `getPossibleNumber()` Get the number of possible sources to store.
    `java.util.HashMap<java.lang.String,ThresholdSource>` | `getPossibleValues()` Get the possible values.
    `ThresholdSource` | `getReserve()` Get the reserve source value.
    `int` | `getSourceCount()` Return the current total number of source references in the structure.
    `int` | `getSourceLevel(java.lang.Object source)` Return the level at which the source is stored at or no level if not stored.
    `int` | `getTotalMovedDown()` Get the total number of sources last moved down a level.
    `int` | `getTotalMovedUp()` Get the total number of sources last moved up a level.
    `void` | `incAndMoveSourceUp(java.lang.Object source, long timeStamp)` Add a new source or increment its weight value and move it up the linking structure if necessary.
    `void` | `incrementReserve(long timeStamp)` Increment the reserve source value.
    `protected float` | `incrementSource(int thresholdType, java.lang.Object source)` Increment the source value stored at the specified level.
    `float` | `incrementSource(int thresholdType, java.lang.Object source, long timeStamp)` Increment the source value stored at the specified level.
    `void` | `linksToString(java.util.HashMap<java.lang.String,java.lang.String> linkStrings, boolean allLevels)` Serialize the link sources into strings and return.
    `org.licas_xml.abs.Element` | `linksToXml(boolean allLevels, boolean includeValues)` Serialize the link values into XML and return.
    `boolean` | `moveSourceDown(int thresholdType, java.lang.Object source)` Move the specified source from the specified level down to the next level.
    `boolean` | `moveSourceDown(java.lang.Object source)` Move the specified source from the level it is at, down to the next level.
    `void` | `moveSourceUp(int thresholdType, java.lang.Object source, long timeStamp)` Automatically move the specified source from the specified level up to the next level.
    `void` | `removeSource(int thresholdType, java.lang.Object source)` Remove the specified source from the specified level.
    `void` | `resetRelated()` Reset the related values structures.
    `void` | `resetUpdatedSources()` Reset values to indicate no sources have currently been updated.
    `void` | `resetValues()` Reset the thresholds to initial values.
    `void` | `setActivationFunction(org.ai_heuristic.functs.FunctionActivate thisFunctionActive)` Set the activation function.
    `void` | `setLinkSpec(LinkSpec thisLinkSpec)` Set the linking configuration.
    `void` | `setLinkValues(java.util.HashMap<java.lang.String,ThresholdSource> thisLinkValues)` Set the link values.
    `void` | `setMonitorValues(java.util.HashMap<java.lang.String,ThresholdSource> thisMonitorValues)` Set the monitor values.
    `void` | `setPossibleValues(java.util.HashMap<java.lang.String,ThresholdSource> thisPossibleValues)` Set the possible values.
    `void` | `setReserve(ThresholdSource thisReserve)` Set the reserve source value.
    `protected java.util.ArrayList<java.lang.Object>` | `sourcesToMoveDown(java.util.ArrayList<java.lang.Object> sources)` Decrement the sources in any of the structures if not the source type and return any sources that now fall below the related threshold.
    `protected java.util.ArrayList<java.lang.Object>` | `sourcesToMoveDown(int thresholdType, java.util.ArrayList<java.lang.Object> sources)` Decrement the sources in the specified structure if not the source type and return any sources that now fall below the threshold.
    `void` | `storeNegatives(java.lang.Object source, java.util.ArrayList<java.lang.Object> theSources)` Store the negative comparisons for the specified source reference.
    `void` | `swapSources(int thresholdType, java.lang.Object source1, java.lang.Object source2)` Swap the specified sources from the specified level and level below.
    `void` | `xmlToLinks(org.licas_xml.abs.Element linksElem)` Parse the xml-based description back into links for this structure.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### linkSpec

          protected LinkSpec linkSpec

      The original threshold config values

    - #### monitorThreshold

          protected float monitorThreshold

      The threshold to monitor the source

    - #### linkThreshold

          protected float linkThreshold

      The threshold to add a link

    - #### possibleNumber

          protected int possibleNumber

      The number of possible sources to store

    - #### monitorNumber

          protected int monitorNumber

      The number of monitors to store

    - #### linkNumber

          protected int linkNumber

      The number of links to store

    - #### totalMovedUp

          protected int totalMovedUp

      The number of sources moved up / swapped next level up

    - #### totalMovedDown

          protected int totalMovedDown

      The number of sources moved down because they fell below the threshold

    - #### maxNegative

          protected int maxNegative

      The maximum number of allowed negative entries for each link

    - #### increment

          protected float increment

      The amount to increment source values by

    - #### incWeight

          protected float incWeight

      The amount to weight increment values by

    - #### decWeight

          protected float decWeight

      The amount to weight decrement values by

    - #### linkMethod

          protected java.lang.String linkMethod

      The linking method used

    - #### possibleValues

          protected java.util.HashMap<java.lang.String,ThresholdSource> possibleValues

      A source for possible values that may later be monitored. Keys are source types and values are the possible values.

    - #### monitorValues

          protected java.util.HashMap<java.lang.String,ThresholdSource> monitorValues

      The actual values at the monitor level. Keys are the source ids and values are the monitor values.

    - #### linkValues

          protected java.util.HashMap<java.lang.String,ThresholdSource> linkValues

      The actual values at the link level. Keys are the source ids and values are the link values.

    - #### timeStamps

          protected java.util.HashMap<java.lang.String,java.lang.Long> timeStamps

      The times the sources were last incremented

    - #### updatedSources

          protected java.util.ArrayList<java.lang.Object> updatedSources

      A list of sources that have already been updated

    - #### reserve

          protected ThresholdSource reserve

      The reserve source that may be added

    - #### functionActive

          protected org.ai_heuristic.functs.FunctionActivate functionActive

      The activation function to use. The weight value is passed through this to produce the threshold value.

    - #### parent

          protected Link parent

      The parent component

  - ### Constructor Detail

    - #### Thresholds

          public Thresholds(LinkSpec thisLinkSpec)
                     throws java.lang.Exception

      Creates a new instance of Thresholds. The maximum allowed negative entries is set to `Const`.`DEFAULTMAXNEGATIVE`. The activation function is assumed to be a `FunctionLinear` type.
      Parameters:
        `thisLinkSpec` - the initial config specification.
      Throws:
        `java.lang.Exception` - any error.

    - #### Thresholds

          public Thresholds(int thisMaxNegative,
                            LinkSpec thisLinkSpec)
                     throws java.lang.Exception

      Creates a new instance of Thresholds. The activation function is assumed to be a `FunctionLinear` type.
      Parameters:
        `thisMaxNegative` - the maximum number of allowed negative entries.
        `thisLinkSpec` - the initial config specification.
      Throws:
        `java.lang.Exception` - any error.

    - #### Thresholds

          public Thresholds(int thisMaxNegative,
                            LinkSpec thisLinkSpec,
                            Link thisParent)
                     throws java.lang.Exception

      Creates a new instance of Thresholds. The activation function is assumed to be a `FunctionLinear` type.
      Parameters:
        `thisMaxNegative` - the maximum number of allowed negative entries.
        `thisLinkSpec` - the initial config specification.
        `thisParent` - the parent component.
      Throws:
        `java.lang.Exception` - any error.

  - ### Method Detail

    - #### createActivationFunction

          protected void createActivationFunction()
                                           throws java.lang.Exception

      Create the activation function, from the spec description.
      Throws:
        `java.lang.Exception` - any error.

    - #### resetValues

          public void resetValues()
                           throws java.lang.Exception

      Reset the thresholds to initial values.
      Throws:
        `java.lang.Exception` - any error.

    - #### resetRelated

          public void resetRelated()
                            throws java.lang.Exception

      Reset the related values structures.
      Throws:
        `java.lang.Exception` - any error.

    - #### resetUpdatedSources

          public void resetUpdatedSources()
                                   throws java.lang.Exception

      Reset values to indicate no sources have currently been updated.
      Throws:
        `java.lang.Exception` - any error.

    - #### storeNegatives

          public void storeNegatives(java.lang.Object source,
                                     java.util.ArrayList<java.lang.Object> theSources)
                              throws java.lang.Exception

      Store the negative comparisons for the specified source reference.
      Parameters:
        `source` - the source key.
        `theSources` - the negative sources to add.
      Throws:
        `java.lang.Exception` - any error.

    - #### incrementSource

          public float incrementSource(int thresholdType,
                                       java.lang.Object source,
                                       long timeStamp)
                                throws java.lang.Exception

      Increment the source value stored at the specified level.
      Parameters:
        `thresholdType` - the level the source is stored at.
        `source` - the source representation.
        `timeStamp` - the current time.
      Returns:
        float the new source value after activation function evaluation.
      Throws:
        `java.lang.Exception` - any error.

    - #### incrementSource

          protected float incrementSource(int thresholdType,
                                          java.lang.Object source)
                                   throws java.lang.Exception

      Increment the source value stored at the specified level.
      Parameters:
        `thresholdType` - the level the source is stored at.
        `source` - the source representation.
      Returns:
        float the new source value.
      Throws:
        `java.lang.Exception` - any error.

    - #### activationValue

          protected float activationValue(float sourceWeight)
                                   throws java.lang.Exception

      Return the activation value for the specified source weight value.
      Parameters:
        `sourceWeight` - the current value associated with the source.
      Returns:
        the value passed through the activation function.
      Throws:
        `java.lang.Exception` - any error.

    - #### incAndMoveSourceUp

          public void incAndMoveSourceUp(java.lang.Object source,
                                         long timeStamp)
                                  throws java.lang.Exception

      Add a new source or increment its weight value and move it up the linking structure if necessary. All sources are added automatically without any memory restrictions. The utility service must therefore check for this.
      Parameters:
        `source` - the source representation.
        `timeStamp` - the current time.
      Throws:
        `java.lang.Exception` - any error.

    - #### moveSourceUp

          public void moveSourceUp(int thresholdType,
                                   java.lang.Object source,
                                   long timeStamp)
                            throws java.lang.Exception

      Automatically move the specified source from the specified level up to the next level.
      Parameters:
        `thresholdType` - the threshold level.
        `source` - the source representation.
        `timeStamp` - the time for a source move.
      Throws:
        `java.lang.Exception` - any error.

    - #### sourcesToMoveDown

          protected java.util.ArrayList<java.lang.Object> sourcesToMoveDown(java.util.ArrayList<java.lang.Object> sources)
                                                                     throws java.lang.Exception

      Decrement the sources in any of the structures if not the source type and return any sources that now fall below the related threshold.
      Parameters:
        `sources` - the representations of the sources to add.
      Returns:
        ArrayList a list of sources that now need to be moved down a level.
      Throws:
        `java.lang.Exception` - any error.

    - #### sourcesToMoveDown

          protected java.util.ArrayList<java.lang.Object> sourcesToMoveDown(int thresholdType,
                                                                            java.util.ArrayList<java.lang.Object> sources)
                                                                     throws java.lang.Exception

      Decrement the sources in the specified structure if not the source type and return any sources that now fall below the threshold.
      Parameters:
        `thresholdType` - the threshold type: link, monitor or possible.
        `sources` - the representations of the sources to add.
      Returns:
        ArrayList a list of sources that now need to be moved down a level.
      Throws:
        `java.lang.Exception` - any error.

    - #### moveSourceDown

          public boolean moveSourceDown(java.lang.Object source)
                                 throws java.lang.Exception

      Move the specified source from the level it is at, down to the next level. This method checks all levels for the source before moving it.
      Parameters:
        `source` - the source representation.
      Returns:
        true if the source was found and moved down.
      Throws:
        `java.lang.Exception` - any error.

    - #### moveSourceDown

          public boolean moveSourceDown(int thresholdType,
                                        java.lang.Object source)
                                 throws java.lang.Exception

      Move the specified source from the specified level down to the next level.
      Parameters:
        `thresholdType` - the threshold level.
        `source` - the source representation.
      Returns:
        true if the source exists at the specified level and was moved down.
      Throws:
        `java.lang.Exception` - any error.

    - #### swapSources

          public void swapSources(int thresholdType,
                                  java.lang.Object source1,
                                  java.lang.Object source2)
                           throws java.lang.Exception

      Swap the specified sources from the specified level and level below.
      Parameters:
        `thresholdType` - the threshold level of the upper source.
        `source1` - the source representation for the source at the upper level.
        `source2` - the source representation for the source at the lower level.
      Throws:
        `java.lang.Exception` - any error.

    - #### removeSource

          public void removeSource(int thresholdType,
                                   java.lang.Object source)
                            throws java.lang.Exception

      Remove the specified source from the specified level.
      Parameters:
        `thresholdType` - the threshold level.
        `source` - the source representation.
      Throws:
        `java.lang.Exception` - any error.

    - #### getMinSource

          public ThresholdSource getMinSource(int thresholdType)
                                       throws java.lang.Exception

      Return the minimum source name for the specified threshold type: link, monitor or possible.
      Parameters:
        `thresholdType` - the threshold type.
      Returns:
        the source details as stored in thresholds.
      Throws:
        `java.lang.Exception` - any error.

    - #### getSourceLevel

          public int getSourceLevel(java.lang.Object source)
                             throws java.lang.Exception

      Return the level at which the source is stored at or no level if not stored.
      Parameters:
        `source` - the source representation. An attempt is automatically made to try to extract the source key or ID if it is a known source type. This is the key value that it would be registered under in any linking structure. If a single increment value is larger than a particular level, the level that the value would place the link at is returned instead.
      Returns:
        the level that the source is currently stored at.
      Throws:
        `java.lang.Exception` - any error.

    - #### getSourceCount

          public int getSourceCount()

      Return the current total number of source references in the structure.
      Returns:
        the total number of sources stored at any level in the linking structure.

    - #### contains

          protected boolean contains(java.util.ArrayList<java.lang.Object> sources,
                                     java.lang.Object key)
                              throws java.lang.Exception

      Return true if the sources contain a source with the key specified.
      Parameters:
        `sources` - the source representations.
        `key` - the key value to match.
      Returns:
        true if any source has the key specified.
      Throws:
        `java.lang.Exception` - any error.

    - #### incrementReserve

          public void incrementReserve(long timeStamp)
                                throws java.lang.Exception

      Increment the reserve source value.
      Parameters:
        `timeStamp` - the current time.
      Throws:
        `java.lang.Exception` - any error.

    - #### decrementReserve

          public void decrementReserve(java.util.ArrayList<java.lang.Object> sources)
                                throws java.lang.Exception

      If the reserve source is not the same name then decrement its value.
      Parameters:
        `sources` - the source representations.
      Throws:
        `java.lang.Exception` - any error.

    - #### setReserve

          public void setReserve(ThresholdSource thisReserve)
                          throws java.lang.Exception

      Set the reserve source value. Set the timestamp internally here.
      Parameters:
        `thisReserve` - the value of reserve.
      Throws:
        `java.lang.Exception` - any error.

    - #### getReserve

          public ThresholdSource getReserve()

      Get the reserve source value.
      Returns:
        the value of reserve.

    - #### setLinkValues

          public void setLinkValues(java.util.HashMap<java.lang.String,ThresholdSource> thisLinkValues)

      Set the link values.
      Parameters:
        `thisLinkValues` - the link values.

    - #### getLinkSources

          public java.util.ArrayList<java.lang.Object> getLinkSources()

      Get the link sources.
      Returns:
        the source objects stored in linkValues.

    - #### getLinkSources

          public java.util.ArrayList<java.lang.Object> getLinkSources(java.util.ArrayList<java.lang.Object> negativeSources)
                                                               throws java.lang.Exception

      Get the link sources, where the negative concepts do not apply.
      Parameters:
        `negativeSources` - the list of negative sources, representing concept(parts). Can be `null`.
      Returns:
        the objects stored in linkValues.
      Throws:
        `java.lang.Exception` - any error.

    - #### linksToXml

          public org.licas_xml.abs.Element linksToXml(boolean allLevels,
                                                      boolean includeValues)
                                               throws java.lang.Exception

      Serialize the link values into XML and return.
      Parameters:
        `allLevels` - if true, return all 3 levels, if false only return the top link level references.
        `includeValues` - if true, return the weight and timestamp as well, if false, return just the source references.
      Returns:
        the linked references in XML format.
      Throws:
        `java.lang.Exception` - any error.

    - #### linksToString

          public void linksToString(java.util.HashMap<java.lang.String,java.lang.String> linkStrings,
                                    boolean allLevels)
                             throws java.lang.Exception

      Serialize the link sources into strings and return.
      Parameters:
        `linkStrings` - list of strings to add to.
        `allLevels` - if true, return all 3 levels, if false only return the top link level references.
      Throws:
        `java.lang.Exception` - any error.

    - #### xmlToLinks

          public void xmlToLinks(org.licas_xml.abs.Element linksElem)
                          throws java.lang.Exception

      Parse the xml-based description back into links for this structure.
      Parameters:
        `linksElem` - the links element that contains all link references.
      Throws:
        `java.lang.Exception` - any error.

    - #### setActivationFunction

          public void setActivationFunction(org.ai_heuristic.functs.FunctionActivate thisFunctionActive)

      Set the activation function.
      Parameters:
        `thisFunctionActive` - the activation function.

    - #### getActivationFunction

          public org.ai_heuristic.functs.FunctionActivate getActivationFunction()

      Get the activation function.
      Returns:
        the value of functionActive.

    - #### setLinkSpec

          public void setLinkSpec(LinkSpec thisLinkSpec)

      Set the linking configuration.
      Parameters:
        `thisLinkSpec` - the config specification.

    - #### getLinkSpec

          public LinkSpec getLinkSpec()

      Get the original linking configuration.
      Returns:
        the value of linkSpec.

    - #### getDecrement

          protected float getDecrement()

      Get the value to decrement sources by.
      Returns:
        the decrement amount.

    - #### getIncWeight

          public float getIncWeight()

      Get the increment weight value.
      Returns:
        the value of incWeight.

    - #### getDecWeight

          public float getDecWeight()

      Get the decrement weight value.
      Returns:
        the value of decWeight.

    - #### getTotalMovedUp

          public int getTotalMovedUp()

      Get the total number of sources last moved up a level.
      Returns:
        the value of totalMovedUp.

    - #### getTotalMovedDown

          public int getTotalMovedDown()

      Get the total number of sources last moved down a level.
      Returns:
        the value of totalMovedDown.

    - #### getLinkCount

          public int getLinkCount()

      Get the number of sources stored as links.
      Returns:
        the number of link sources.

    - #### getMonitorCount

          public int getMonitorCount()

      Get the number of sources stored as monitors.
      Returns:
        the number of monitor sources.

    - #### getPossibleCount

          public int getPossibleCount()

      Get the number of sources stored as possible links.
      Returns:
        the number of possible sources.

    - #### getLinkThreshold

          public float getLinkThreshold()

      Get the link threshold value.
      Returns:
        the value of link.

    - #### changeLinkNumber

          public void changeLinkNumber(int changeNumber)

      Change the number of link sources to store.
      Parameters:
        `changeNumber` - the number to change by. Can be positive or negative.

    - #### getLinkNumber

          public int getLinkNumber()

      Get the number of links to store.
      Returns:
        the value of linkNumber.

    - #### getMonitorThreshold

          public float getMonitorThreshold()

      Get the monitor threshold value.
      Returns:
        the value of monitorThreshold.

    - #### changeMonitorNumber

          public void changeMonitorNumber(int changeNumber)

      Change the number of monitor sources to store.
      Parameters:
        `changeNumber` - the number to change by. Can be positive or negative.

    - #### getMonitorNumber

          public int getMonitorNumber()

      Get the number of monitors to store.
      Returns:
        the value of monitorNumber.

    - #### setMonitorValues

          public void setMonitorValues(java.util.HashMap<java.lang.String,ThresholdSource> thisMonitorValues)

      Set the monitor values.
      Parameters:
        `thisMonitorValues` - the monitor values.

    - #### getMonitorValues

          public java.util.HashMap<java.lang.String,ThresholdSource> getMonitorValues()

      Get the monitor values.
      Returns:
        the value of monitorValues.

    - #### changePossibleNumber

          public void changePossibleNumber(int changeNumber)

      Change the number of possible sources to store.
      Parameters:
        `changeNumber` - the number to change by. Can be positive or negative.

    - #### getPossibleNumber

          public int getPossibleNumber()

      Get the number of possible sources to store.
      Returns:
        the value of possibleNumber.

    - #### setPossibleValues

          public void setPossibleValues(java.util.HashMap<java.lang.String,ThresholdSource> thisPossibleValues)

      Set the possible values.
      Parameters:
        `thisPossibleValues` - the possible values.

    - #### getPossibleValues

          public java.util.HashMap<java.lang.String,ThresholdSource> getPossibleValues()

      Get the possible values.
      Returns:
        the value of possibleValues.

    - #### getIncrement

          public float getIncrement()

      Get the increment value.
      Returns:
        the value of increment.

    - #### getLinkMethod

          public java.lang.String getLinkMethod()

      Get the linking method used.
      Returns:
        the value of linkMethod.

    - #### cloneFunction

          public org.ai_heuristic.functs.FunctionActivate cloneFunction()
                                                                 throws java.lang.Exception

      Return a new instance of the activation function stored in this Thresholds structure.
      Returns:
        a clone copy, using the `newInstance` method, or null is none exists.
      Throws:
        `java.lang.Exception` - any error.