|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectabsurdist.Relation
Class Relation Specifies the data structure for a relation, which contains its involved concepts and some features.
| Field Summary | |
java.util.Vector |
concepts
Concepts involved in this relation. |
RelationModel |
model
Relation model of this relation. |
double |
weight
Strength measurement of this relation ( 0 < weight (quantitative) <= 1 ). |
| Constructor Summary | |
Relation()
Creates an empty relation. |
|
Relation(Relation relation)
Creates a copy of a relation sharing the same concepts. |
|
Relation(Relation relation,
Concept c1,
Concept c2)
Creates a copy of a relation, using the specified concepts. |
|
Relation(Relation relation,
Concept c1,
Concept c2,
double noise)
Creates a copy of a relation, using the specified concepts, with some noise. |
|
Relation(RelationModel model,
Concept c1,
Concept c2)
Creates a relation of the specified model with default weight between two concepts. |
|
Relation(RelationModel model,
Concept c1,
Concept c2,
boolean weighted)
Creates a relation of the specified model with random weight if weighted between two concepts. |
|
Relation(RelationModel model,
Concept c1,
Concept c2,
double weight)
Creates a relation with full features between two concepts. |
|
| Method Summary | |
void |
addNoise(double noise)
Adds some noise to the relation's weight. |
int |
compareTo(Relation relation)
Compares the lexicographical order of this relation and the specified one, according to their label. |
double |
difWeight(Relation relation)
Return the difference between the weight of this relation and the specified one. |
Concept |
getConcept1()
Returns the 1st concept in the relation. |
Concept |
getConcept2()
Returns the 2nd concept in the relation. |
java.lang.String |
getLabel()
Returns the label of the relation. |
boolean |
isDirected()
Checks whether this relation is directed. |
boolean |
isWeighted()
Checks whether this relation is weighted. |
java.lang.String |
toString()
Returns a string representation of this relation. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
public RelationModel model
public java.util.Vector concepts
public double weight
| Constructor Detail |
public Relation()
public Relation(RelationModel model,
Concept c1,
Concept c2)
public Relation(RelationModel model,
Concept c1,
Concept c2,
boolean weighted)
public Relation(RelationModel model,
Concept c1,
Concept c2,
double weight)
public Relation(Relation relation)
public Relation(Relation relation,
Concept c1,
Concept c2)
public Relation(Relation relation,
Concept c1,
Concept c2,
double noise)
| Method Detail |
public void addNoise(double noise)
public Concept getConcept1()
public Concept getConcept2()
public java.lang.String getLabel()
public boolean isDirected()
public boolean isWeighted()
public int compareTo(Relation relation)
public double difWeight(Relation relation)
public java.lang.String toString()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||