org.licas.module.h_module.cluster

## Class HM_ContainsLink

- java.lang.Object
- - java.lang.Thread
  - - org.licas.module.LicasModule
    - - org.licas.module.FrameworkModule
      - - org.licas.module.ServiceModule
        - - org.licas.module.HeuristicModule
          - - org.licas.module.h_module.HM_Cluster
            - - org.licas.module.h_module.cluster.HM_ContainsLink

- All Implemented Interfaces:
    java.lang.Runnable, ServiceDef

      public class HM_ContainsLink
      extends HM_Cluster

  Provides one implementation of a clustering process. This class can be used to evaluate two values of a simple type (int, float, string) for containment. If the second value is contained in the first value, a boolean-type reply is returned. This is a floating point value of 1.0. So the reply only verifies or not the containment. The parent service can then use this to create a permanent link between itself and the service that the matching dataset belongs to.

  For an evaluation to be true, it is required that subtract(value1 - value2) returns a result that is neither value1 or value2 and also that value1 is greater than or equal to value2. A positive result is a reply object with a data value of 1.0. A negative result is an empty reply object. See the problem solver package for other examples.

  Author:
    Kieran Greer

- - ### Nested Class Summary

    - ### Nested classes/interfaces inherited from class java.lang.Thread

      `java.lang.Thread.State, java.lang.Thread.UncaughtExceptionHandler`

  - ### Field Summary

    - ### Fields inherited from class org.licas.module.h_module.HM_Cluster

      `allData, clusterURIs, evalMetric, numberOfIterations, rnd`

    - ### Fields inherited from class org.licas.module.HeuristicModule

      `configXml`

    - ### Fields inherited from class org.licas.module.ServiceModule

      `shutDown`

    - ### Fields inherited from class org.licas.module.FrameworkModule

      `passwordHandler, service, serviceType`

    - ### Fields inherited from class org.licas.module.LicasModule

      `jarFile, syncOn, uuid`

    - ### Fields inherited from class java.lang.Thread

      `MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `HM_ContainsLink()` Create a new instance of HM_ContainsLink.
    `HM_ContainsLink(org.licas_xml.abs.Element adminXml)` Create a new instance of HM_ContainsLink.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `org.licas_xml.abs.Element` | `evaluate(DataQueryModel dataInfo)` Evaluate the behaviour, process, or action.

    - ### Methods inherited from class org.licas.module.h_module.HM_Cluster

      `alreadyLinkedTo, getMetricType, iterationsOK, resetValues`

    - ### Methods inherited from class org.licas.module.ServiceModule

      `getShutDown, interrupt, setShutDown, setShutDown`

    - ### Methods inherited from class org.licas.module.FrameworkModule

      `canAccess, canAccessTemp, getPasswordHandler, getPasswordHandler, getServerPassword, getServicePassword, getServiceType, isAdminKey, setServiceDetails, setServiceType`

    - ### Methods inherited from class org.licas.module.LicasModule

      `getJarFile, getUUID, loadObject, setJarFile, setUUID, threadAliveState`

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

      `activeCount, checkAccess, clone, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, run, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, toString, yield`

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

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

    - ### Methods inherited from interface org.licas.def.ServiceDef

      `getUUID, setJarFile, setUUID`

- - ### Constructor Detail

    - #### HM_ContainsLink

          public HM_ContainsLink()
                          throws java.lang.Exception

      Create a new instance of HM_ContainsLink.
      Throws:
        `java.lang.Exception` - any error.

    - #### HM_ContainsLink

          public HM_ContainsLink(org.licas_xml.abs.Element adminXml)
                          throws java.lang.Exception

      Create a new instance of HM_ContainsLink.
      Parameters:
        `adminXml` - configuration parameters, including metric type and setup.
      Throws:
        `java.lang.Exception` - any error.

  - ### Method Detail

    - #### evaluate

          public org.licas_xml.abs.Element evaluate(DataQueryModel dataInfo)
                                             throws java.lang.Exception

      Evaluate the behaviour, process, or action.
      Specified by:
        `evaluate` in class `HeuristicModule`
      Parameters:
        `dataInfo` - initialisation dataInfo for the evaluator.
      Returns:
        the evaluation reply.
      Throws:
        `java.lang.Exception` - and error.