jcreek.reasoning
Class SymbolComparison

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

public class SymbolComparison
extends EntityComparison

Defines a comparison between two symbols. This is the default comparator of entities in a domain.

Version:
1.0
Author:
Frode Sørmo of NTNU 2002

Field Summary
protected  boolean notComparable
           
protected  java.util.Vector symbolConvergenceList
           
protected  Entity valueType
           
 
Fields inherited from class jcreek.reasoning.EntityComparison
ACTIVATED_STATUS, activationStrength, EXPLAINED_STATUS, explanationStrength, INITIAL_STATUS, INITIAL_STRENGTH, origin, target
 
Constructor Summary
SymbolComparison(Entity origin, Entity target)
          Creates a new comparison between the origin and target entities.
 
Method Summary
 SymbolConvergence[] getSymbolConvergences()
          Returning the list of FindingConvergence instances found for this FindingComparison.
 boolean isComparable()
          Checks if the entities are comparable.
static boolean isComparable(Entity e1, Entity e2)
           
 java.lang.String shortExplanation()
          Gives a short textual representation (a sentence or so) describing the comparison.
 java.lang.String shortExplanation(java.lang.String buf)
          Returns a short explanation.
 SubModel toCompleteSubModel()
           
 java.lang.String toString()
          Returns the string representation of the finding comparison
 SubModel toSubModel()
          Returns a submodel of the entities compared.
 double updateActivationStrength()
          Computes the activation strenght of the comparison.
protected  double updateExplanationStrength()
          Returns the explanation strength of leaf findings.
 
Methods inherited from class jcreek.reasoning.EntityComparison
activate, addParallell, addSerial, checkIsComparable, compareTo, createComparison, explain, getActivationStrength, getExplanationStrength, getKnowledgeModel, getOrigin, getPercentageStrength, getStatus, getStatusText, getStrength, getTarget, isActivated, isCompletelyMatched, isExplained, isExplainMatched, isPartlyMatched, isUnmatched, reset, update
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

symbolConvergenceList

protected java.util.Vector symbolConvergenceList

valueType

protected Entity valueType

notComparable

protected boolean notComparable
Constructor Detail

SymbolComparison

public SymbolComparison(Entity origin,
                        Entity target)
Creates a new comparison between the origin and target entities.

Parameters:
origin - the entity to compare from
target - the entity to compare to
Method Detail

updateActivationStrength

public double updateActivationStrength()
Description copied from class: EntityComparison
Computes the activation strenght of the comparison. This method should not be called to often. Instead, call 'activate' and then 'getActivationStrength' When implemented by subclasses, this method should consist of the activation between the comparing concepts

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

updateExplanationStrength

protected double updateExplanationStrength()
Returns the explanation strength of leaf findings.

Specified by:
updateExplanationStrength in class EntityComparison
Returns:
the explanation strength of the comparison

getSymbolConvergences

public SymbolConvergence[] getSymbolConvergences()
Returning the list of FindingConvergence instances found for this FindingComparison.


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

shortExplanation

public java.lang.String shortExplanation(java.lang.String buf)
Returns a short explanation.


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.

isComparable

public static boolean isComparable(Entity e1,
                                   Entity e2)

toString

public java.lang.String toString()
Returns the string representation of the finding comparison

Overrides:
toString in class EntityComparison
Returns:
the string representation of the finding comparison

toSubModel

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

Overrides:
toSubModel in class EntityComparison

toCompleteSubModel

public SubModel toCompleteSubModel()


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