Package org.gephi.graph.api
Interface Edge
-
- All Superinterfaces:
EdgeProperties,Element,ElementProperties
public interface Edge extends Element, EdgeProperties
An edge.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description NodegetSource()Returns the egde's source.NodegetTarget()Returns the edge's target.intgetType()Returns the edge's type.ObjectgetTypeLabel()Returns the edge's type label.doublegetWeight()Returns the edge's weight.doublegetWeight(double timestamp)Returns the edge's weight at the given timestamp.doublegetWeight(GraphView view)Returns the edge's weight in the given graph view.doublegetWeight(Interval interval)Returns the edge's weight at the given interval.Iterable<Map.Entry>getWeights()Returns an iterable of all weights over time.booleanhasDynamicWeight()Returns true if this edge has a dynamic weight.booleanisDirected()Returns true if this edge is directed.booleanisSelfLoop()Returns true if this edge is a self-loop.voidsetWeight(double weight)Sets the edge's weight.voidsetWeight(double weight, double timestamp)Sets the edge's weight at the given timestamp.voidsetWeight(double weight, Interval interval)Sets the edge's weight at the given interval.-
Methods inherited from interface org.gephi.graph.api.Element
addInterval, addTimestamp, clearAttributes, getAttribute, getAttribute, getAttribute, getAttribute, getAttribute, getAttribute, getAttribute, getAttribute, getAttributeColumns, getAttributeKeys, getAttributes, getAttributes, getId, getIntervals, getLabel, getStoreId, getTable, getTimeBounds, getTimestamps, hasInterval, hasTimestamp, removeAttribute, removeAttribute, removeAttribute, removeAttribute, removeAttribute, removeAttribute, removeInterval, removeTimestamp, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setLabel
-
-
-
-
Method Detail
-
getSource
Node getSource()
Returns the egde's source.- Returns:
- source node
-
getTarget
Node getTarget()
Returns the edge's target.- Returns:
- target node
-
getWeight
double getWeight()
Returns the edge's weight.- Returns:
- weight
-
getWeight
double getWeight(double timestamp)
Returns the edge's weight at the given timestamp.- Parameters:
timestamp- timestamp- Returns:
- weight
-
getWeight
double getWeight(Interval interval)
Returns the edge's weight at the given interval.- Parameters:
interval- interval- Returns:
- weight
-
getWeight
double getWeight(GraphView view)
Returns the edge's weight in the given graph view.Views can configure a time interval and therefore the edge weight over time may vary.
- Parameters:
view- graph view- Returns:
- weight
-
getWeights
Iterable<Map.Entry> getWeights()
Returns an iterable of all weights over time.- Returns:
- weights iterable
-
setWeight
void setWeight(double weight)
Sets the edge's weight.- Parameters:
weight- weight
-
setWeight
void setWeight(double weight, double timestamp)Sets the edge's weight at the given timestamp.- Parameters:
weight- weighttimestamp- timestamp
-
setWeight
void setWeight(double weight, Interval interval)Sets the edge's weight at the given interval.- Parameters:
weight- weightinterval- interval
-
hasDynamicWeight
boolean hasDynamicWeight()
Returns true if this edge has a dynamic weight.- Returns:
- true if the edge has a dynamic weight, false otherwise
-
getType
int getType()
Returns the edge's type.- Returns:
- type
-
getTypeLabel
Object getTypeLabel()
Returns the edge's type label.- Returns:
- type label
-
isSelfLoop
boolean isSelfLoop()
Returns true if this edge is a self-loop.- Returns:
- true if self-loop, false otherwise
-
isDirected
boolean isDirected()
Returns true if this edge is directed.- Returns:
- true if directed, false otherwise
-
-