jcreek.reasoning
Class NumberComparison

java.lang.Object
  extended byjcreek.reasoning.EntityComparison
      extended byjcreek.reasoning.NumberComparison
All Implemented Interfaces:
java.lang.Comparable

public class NumberComparison
extends EntityComparison


Field Summary
protected  boolean notComparable
           
protected  java.util.ArrayList relList
           
protected  Entity valueType
           
 
Fields inherited from class jcreek.reasoning.EntityComparison
ACTIVATED_STATUS, activationStrength, EXPLAINED_STATUS, explanationStrength, INITIAL_STATUS, INITIAL_STRENGTH, origin, target
 
Constructor Summary
NumberComparison(Entity origin, Entity target)
          Creates a new NumberComparison, comparing the origin and target entities given as parameters.
 
Method Summary
protected  jcreek.reasoning.NumberNormalizer getNumberNormalizer()
           
 boolean isComparable()
          Checks if the entities are comparable.
 double normalize(java.lang.Number number)
           
 java.lang.String shortExplanation()
          Gives a short textual representation (a sentence or so) describing the comparison.
 SubModel toSubModel()
          Returns a submodel of the entities compared.
 double updateActivationStrength()
          The activation step attempts to find an entity having a "has instance" relation to both the origin and target entities.
 double updateExplanationStrength()
          Nothing is done in the explanation step.
 
Methods inherited from class jcreek.reasoning.EntityComparison
activate, addParallell, addSerial, checkIsComparable, compareTo, createComparison, explain, getActivationStrength, getExplanationStrength, getKnowledgeModel, getOrigin, getPercentageStrength, getStatus, getStatusText, getStrength, getTarget, isActivated, isComparable, isCompletelyMatched, isExplained, isExplainMatched, isPartlyMatched, isUnmatched, reset, toString, update
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

valueType

protected Entity valueType

relList

protected java.util.ArrayList relList

notComparable

protected boolean notComparable
Constructor Detail

NumberComparison

public NumberComparison(Entity origin,
                        Entity target)
Creates a new NumberComparison, comparing the origin and target entities given as parameters.

Method Detail

updateExplanationStrength

public double updateExplanationStrength()
Nothing is done in the explanation step.

Specified by:
updateExplanationStrength in class EntityComparison
Returns:
Always 0.0 .

updateActivationStrength

public double updateActivationStrength()
The activation step attempts to find an entity having a "has instance" relation to both the origin and target entities. All values from this super-entity is then used to normalize the values of the two entities.

Specified by:
updateActivationStrength in class EntityComparison
Returns:
the activation strength of the comparison

isComparable

public boolean isComparable()
Checks if the entities are comparable. In order to be so, they must both have the same comparator and also have a "value of" relation to a single common entity.

Overrides:
isComparable in class EntityComparison
Returns:
true if the comparison is comparable.

getNumberNormalizer

protected jcreek.reasoning.NumberNormalizer getNumberNormalizer()

normalize

public double normalize(java.lang.Number number)

shortExplanation

public java.lang.String shortExplanation()
Description copied from class: EntityComparison
Gives a short textual representation (a sentence or so) describing the comparison.

Overrides:
shortExplanation in class EntityComparison

toSubModel

public SubModel toSubModel()
Description copied from class: EntityComparison
Returns a submodel of the entities compared.

Overrides:
toSubModel in class EntityComparison


Created at IDI, NTNU by the Artificial Intelligence and Learning group