|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectreasoner.Role
reasoner.Distance
public class Distance
This class represents the Role "distance"
Constructor Summary | |
---|---|
Distance(KnowledgeBase kb)
Constructs a new empty Distance |
|
Distance(java.lang.String name,
KnowledgeBase kb)
Constructs a new empty Distance |
|
Distance(java.util.TreeMap<Individual,java.lang.Double> r,
KnowledgeBase kb)
Constructs a new Distance with a given Role map |
Method Summary | |
---|---|
double |
getValue(double x1,
double x2,
double y1,
double y2)
Gets a double value as euclidean distance between two points, given cartesian coordinates |
java.lang.String |
toString()
A String representation for this Role |
Methods inherited from class reasoner.Role |
---|
add, card, card, containsInd, get, getInds, getKb, getLambda, getName, getR, intersection, print, setKb, setName, setR, totalLambda, totalLambda |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public Distance(java.lang.String name, KnowledgeBase kb)
name
- the namekb
- the KnowledgeBasepublic Distance(java.util.TreeMap<Individual,java.lang.Double> r, KnowledgeBase kb)
r
- the Role mapkb
- the KnowledgeBasepublic Distance(KnowledgeBase kb)
kb
- the KnowledgeBaseMethod Detail |
---|
public double getValue(double x1, double x2, double y1, double y2)
x1
- the x coordinate for first pointx2
- the x coordinate for second pointy1
- the y coordinate for first pointy2
- the y coordiante for second point
public java.lang.String toString()
Role
toString
in class Role
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |