jcreek.reasoning
Class PartitionComparison

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

public class PartitionComparison
extends EntityComparison


Field Summary
 
Fields inherited from class jcreek.reasoning.EntityComparison
ACTIVATED_STATUS, activationStrength, EXPLAINED_STATUS, explanationStrength, INITIAL_STATUS, INITIAL_STRENGTH, origin, target
 
Constructor Summary
PartitionComparison(Entity origin, Entity target)
          Creates a new NumberComparison, comparing the origin and target entities given as parameters.
 
Method Summary
 SubModel getOverlapModel()
          Returns a submodel containing the overlap of the partitions compared by this object.
 SubModel getUnionModel()
          Returns a submodel containing the overlap of the partitions compared by this object.
 boolean isComparable()
          Checks if the entities are comparable.
 java.lang.String shortExplanation()
          Gives a short textual representation (a sentence or so) describing the comparison.
 java.lang.String toString()
          Returns the string representation of the comparison
 SubModel toSubModel()
          Returns a submodel of the entities compared.
 double updateActivationStrength()
          The activation step attempts to find the partitions and measure the similarity between them by comparing the number og relations and entities they have in common to the total number of relations and entities in the target entity's partition.
 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, update
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

PartitionComparison

public PartitionComparison(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 the partitions and measure the similarity between them by comparing the number og relations and entities they have in common to the total number of relations and entities in the target entity's partition.

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

getUnionModel

public SubModel getUnionModel()
Returns a submodel containing the overlap of the partitions compared by this object.


getOverlapModel

public SubModel getOverlapModel()
Returns a submodel containing the overlap of the partitions compared by this object.


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.

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

toString

public java.lang.String toString()
Description copied from class: EntityComparison
Returns the string representation of the comparison

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

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