jcreek.reasoning
Class CaseComparisonNew

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

public class CaseComparisonNew
extends EntityComparison

A comparison between two cases.

The comparison is comparable if the entities have one parent in common. Two entities are compared by comparing the relations of the entities, i.e. by creating relation comparisons of every possible combination, (followed by activation and explanation) and computing the strength.

Version:
1.1
Author:
Ellen Lippe, modified by Frode Sørmo of NTNU 2001-2002

Field Summary
 
Fields inherited from class jcreek.reasoning.EntityComparison
ACTIVATED_STATUS, activationStrength, EXPLAINED_STATUS, explanationStrength, INITIAL_STATUS, INITIAL_STRENGTH, origin, target
 
Constructor Summary
CaseComparisonNew(Entity problem, Entity target)
           
 
Method Summary
 void reset()
          Resets the activation/explanation.
 double updateActivationStrength()
          Computes the activation strenght of the comparison.
 double updateExplanationStrength()
          Updates the explanation strenght of the comparison.
 
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, isComparable, isCompletelyMatched, isExplained, isExplainMatched, isPartlyMatched, isUnmatched, shortExplanation, toString, toSubModel, update
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

CaseComparisonNew

public CaseComparisonNew(Entity problem,
                         Entity target)
Method Detail

reset

public void reset()
Description copied from class: EntityComparison
Resets the activation/explanation. i.e sets the status to INITIAL_STATUS and strength to INITIAL_STRENGTH.

Overrides:
reset in class EntityComparison

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

public double updateExplanationStrength()
Description copied from class: EntityComparison
Updates the explanation strenght of the comparison. This method should not be called to often. Instead, call 'explain' and then 'getStrength' When implemented by subclasses, this method should consist of the explanation between the comparing concepts

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


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