|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectedu.iu.cnets.klatsch.model.Edge
public abstract class Edge
This is the basic class for representing an edge from a feed of social events.
Field Summary | |
---|---|
protected Node |
dst
the destination node |
protected int |
endTime
the timestamp of the latest data contributing to the weight of the edge |
protected Node |
src
the source node |
protected int |
startTime
the timestamp of the earliest data contributing to the weight of the edge |
protected double |
trust
the trusted weight of the edge |
protected double |
weight
the weight of the edge |
Constructor Summary | |
---|---|
protected |
Edge()
Default constructor for internal use. |
|
Edge(Edge a,
Edge b)
Builds a new edge by merging two existing edges, which should have the same endpoints. |
|
Edge(Node src,
Node dst)
Simplied constructor with a default weight of 1.0, that is completely trusted. |
|
Edge(Node src,
Node dst,
double weight,
double trust)
Simplified constructor that uses "now" as a timestamp. |
|
Edge(Node src,
Node dst,
int startTime,
int endTime,
double weight,
double trust)
Constructor specifying all fields. |
Method Summary | |
---|---|
int |
compareTo(Edge other)
Implemented for Comparable. |
Node |
dst()
Returns the destination node for this edge. |
int |
endTime()
Returns the ending timestamp for the edge. |
boolean |
equals(java.lang.Object obj)
Implemented for use with Hashtable . |
int |
hashCode()
Implemented for use with Hashtable . |
Node |
src()
Returns the source node for this edge. |
int |
startTime()
Returns the beginning timestamp for the edge. |
double |
trust()
Return the trusted weight of the edge. |
double |
weight()
Return the weight of the edge. |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected Node src
protected Node dst
protected int startTime
protected int endTime
protected double weight
protected double trust
Constructor Detail |
---|
protected Edge()
public Edge(Node src, Node dst, int startTime, int endTime, double weight, double trust)
src
- the source nodedst
- the destination nodestartTime
- the start time for the edgeendTime
- the end time for the edgeweight
- the weight of the edgetrust
- the trusted weight of the edgepublic Edge(Node src, Node dst, double weight, double trust)
src
- the source nodedst
- the destination nodeweight
- the weight of the edgetrust
- the trusted weight of the edgepublic Edge(Node src, Node dst)
src
- the source nodedst
- the destination nodepublic Edge(Edge a, Edge b)
a
- the first edgeb
- the second edgeMethod Detail |
---|
public Node src()
public Node dst()
public int startTime()
public int endTime()
public double weight()
public double trust()
public int compareTo(Edge other)
compareTo
in interface java.lang.Comparable<Edge>
public boolean equals(java.lang.Object obj)
Hashtable
.
equals
in class java.lang.Object
public int hashCode()
Hashtable
.
hashCode
in class java.lang.Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |