org.licas.data

## Class ComparisonQueryModel

- java.lang.Object
- - org.licas.data.DataQueryModel
  - - org.licas.data.ComparisonQueryModel

-     public class ComparisonQueryModel
      extends DataQueryModel

  Query object for defining what an evaluator should evaluate. This version creates a math comparison operator from its class name and invokes the method on that operator. It therefore requires the two datasets that are being compared and the comparison operator. It should also implement the `EvaluateMathDef` interface.
  Author:
    Kieran Greer

- - ### Field Summary

    - ### Fields inherited from class org.licas.data.DataQueryModel

      `dataSet, dataType, functionClass, params`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `ComparisonQueryModel()` Create a new instance of ComparisonQueryModel

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `org.ai_heuristic.def.EvaluateMathDef` | `compareFunction()` Create the math comparison object from the stored class name.
    `org.ai_heuristic.eval.metric.MetricDataset` | `getCompareWith()` Get the dataset object to compare with.
    `java.lang.String` | `getOperator()` Get the comparison operator.
    `void` | `setCompareWith(org.ai_heuristic.eval.metric.MetricDataset thisDataSet)` Set the dataset object to compare with.
    `void` | `setFunctionClass(java.lang.String functionClassname)` Set the class name of the evaluator.
    `void` | `setOperator(java.lang.String thisOperator)` Set the comparison operator.

    - ### Methods inherited from class org.licas.data.DataQueryModel

      `clone, distanceFunction, getDataset, getDataType, getFunctionClass, getParams, isDataQuery, setDataset, setDataType, setParams`

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

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

- - ### Constructor Detail

    - #### ComparisonQueryModel

          public ComparisonQueryModel()

      Create a new instance of ComparisonQueryModel

  - ### Method Detail

    - #### compareFunction

          public org.ai_heuristic.def.EvaluateMathDef compareFunction()
                                                               throws java.lang.Exception

      Create the math comparison object from the stored class name.
      Returns:
        the math comparison object, created using `LoadObject`, with an empty constructor.
      Throws:
        `java.lang.Exception` - any error.

    - #### setFunctionClass

          public void setFunctionClass(java.lang.String functionClassname)

      Set the class name of the evaluator. For a comparison query, the function should implement the `EvaluateMathDef` interface, so that its method list is known.
      Overrides:
        `setFunctionClass` in class `DataQueryModel`
      Parameters:
        `functionClassname` - the evaluator class name.

    - #### setOperator

          public void setOperator(java.lang.String thisOperator)

      Set the comparison operator. `Null` for evaluation on single object.
      Parameters:
        `thisOperator` - the comparison operator.

    - #### getOperator

          public java.lang.String getOperator()

      Get the comparison operator. `Null` for single evaluation.
      Returns:
        the value of operator.

    - #### setCompareWith

          public void setCompareWith(org.ai_heuristic.eval.metric.MetricDataset thisDataSet)

      Set the dataset object to compare with. Null for a single evaluation.
      Parameters:
        `thisDataSet` - the dataset object.

    - #### getCompareWith

          public org.ai_heuristic.eval.metric.MetricDataset getCompareWith()

      Get the dataset object to compare with.
      Returns:
        the value of compareWith.