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 Node
getSource()
Returns the egde's source.Node
getTarget()
Returns the edge's target.int
getType()
Returns the edge's type.Object
getTypeLabel()
Returns the edge's type label.double
getWeight()
Returns the edge's weight.double
getWeight(double timestamp)
Returns the edge's weight at the given timestamp.double
getWeight(GraphView view)
Returns the edge's weight in the given graph view.double
getWeight(Interval interval)
Returns the edge's weight at the given interval.Iterable<Map.Entry>
getWeights()
Returns an iterable of all weights over time.boolean
hasDynamicWeight()
Returns true if this edge has a dynamic weight.boolean
isDirected()
Returns true if this edge is directed.boolean
isSelfLoop()
Returns true if this edge is a self-loop.void
setWeight(double weight)
Sets the edge's weight.void
setWeight(double weight, double timestamp)
Sets the edge's weight at the given timestamp.void
setWeight(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
-
-