Gephi Toolkit Javadoc

org.gephi.graph.api
Interface Edge

All Superinterfaces:
Attributable
All Known Subinterfaces:
MetaEdge

public interface Edge
extends Attributable

Edge interface. An edge connects two nodes and can be directed or not.

If working with several GraphView, note that source and target are always nodes in the main view. To obtain nodes in other views, do:

 GraphView view = ...;
 Node node = node.getNodeData().getNode(view.getViewId());
 

Author:
Mathieu Bastian

Method Summary
 EdgeData getEdgeData()
          Returns edge data.
 int getId()
          Returns the unique identifier of the edge.
 Node getSource()
          Returns the source of the edge.
 Node getTarget()
          Returns the target of the edge.
 float getWeight()
          Returns the weight of the edge.
 float getWeight(double low, double high)
          Returns the weight of the edge for the given time interval.
 boolean isDirected()
          Returns true if the edge is directed or false if it's undirected.
 boolean isSelfLoop()
          Returns true if edge source and target are the same.
 void setWeight(float weight)
          Set the weight of the edge.
 
Methods inherited from interface org.gephi.graph.api.Attributable
getAttributes
 

Method Detail

getId

int getId()
Returns the unique identifier of the edge.

Returns:
the Id of the edge

getSource

Node getSource()
Returns the source of the edge.

Returns:
the source of the edge

getTarget

Node getTarget()
Returns the target of the edge.

Returns:
the target of the edge

getWeight

float getWeight()
Returns the weight of the edge. Default value is 1.0.

Returns:
the weight of the edge

getWeight

float getWeight(double low,
                double high)
Returns the weight of the edge for the given time interval. If the weight is dynamic, it has several values over time. This method returns the weight for a particular interval.

Parameters:
low - the lower interval bound, can be Double.NEGATIVE_INFINITY
high - the upper interval bound, can be Double.POSITIVE_INFINITY
Returns:
the weight of the edge at this [low,high] interval

setWeight

void setWeight(float weight)
Set the weight of the edge.

Parameters:
weight - the weight of the edge

isDirected

boolean isDirected()
Returns true if the edge is directed or false if it's undirected. Default is directed. Note that value is immutable.

Special cases:

Returns:
true if the edge is directed, false otherwise

isSelfLoop

boolean isSelfLoop()
Returns true if edge source and target are the same.

Returns:
true if the edge is a self-loop, false otherwise

getEdgeData

EdgeData getEdgeData()
Returns edge data.

Returns:
edge data instance

Gephi Toolkit Javadoc