edu.mit.sketch.ddg
Class ConstraintGraphEdge

java.lang.Object
  |
  +--edu.mit.sketch.ddg.ConstraintGraphEdge

public class ConstraintGraphEdge
extends Object

Represents a directed edge from one Primitive to another in the constraint graph. Stores:
- primitive to which the edge points to
- number representing the confidence (in the interval [0;1]) that the constraint holds
- number representing the belief in the relevance of the constraint ([0;1])
Constraint objects store a list of outcoming edges for each primitive.

If the constraint represents a property instead of a relationship, the primitive will have a self loop.

ConstraintGraphEdge.java Created: Sat Nov 21 18:26:00 2001


Constructor Summary
ConstraintGraphEdge(Primitive primitive, double confidence, double relevance)
          Constructs an edge.
 
Method Summary
 double confidence()
          Get confidence
 Primitive primitive()
          Get primitive.
 void print(Primitive p1)
          Print the edge.
 double relevance()
          Get relevance
 void setConfidence(double confidence)
          Set confidence
 void setPrimitive(Primitive primitive)
          Set primitive
 void setRelevance(double relevance)
          Set relevance
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ConstraintGraphEdge

public ConstraintGraphEdge(Primitive primitive,
                           double confidence,
                           double relevance)
Constructs an edge. Confidence and relevnce should be in the interval from [0;1].
Method Detail

primitive

public Primitive primitive()
Get primitive.

confidence

public double confidence()
Get confidence

relevance

public double relevance()
Get relevance

setPrimitive

public void setPrimitive(Primitive primitive)
Set primitive

setConfidence

public void setConfidence(double confidence)
Set confidence

setRelevance

public void setRelevance(double relevance)
Set relevance

print

public void print(Primitive p1)
Print the edge. If the edge is just a self loop, print the primitive only once.