
Cytoscape 2.8.0 API  
PREV CLASS NEXT CLASS  FRAMES NO FRAMES  
SUMMARY: NESTED  FIELD  CONSTR  METHOD  DETAIL: FIELD  CONSTR  METHOD 
public interface FixedGraph
A graph topology. Edges and nodes are nonnegative integers; a given node and a given edge in a single graph can be the same integer.
Field Summary  

static byte 
DIRECTED_EDGE
A nonnegative quantity representing directedness of an edge. 
static byte 
UNDIRECTED_EDGE
A nonnegative quantity representing undirectedness of an edge. 
Method Summary  

IntEnumerator 
edges()
Returns an enumeration of all edges in this graph. 
IntEnumerator 
edgesAdjacent(int node,
boolean outgoing,
boolean incoming,
boolean undirected)
Returns a nonrepeating enumeration of edges adjacent to a node. 
IntIterator 
edgesConnecting(int node0,
int node1,
boolean outgoing,
boolean incoming,
boolean undirected)
Returns a nonrepeating iteration of edges connecting two nodes. 
int 
edgeSource(int edge)
Determines the source node of an edge. 
int 
edgeTarget(int edge)
Determines the target node of an edge. 
byte 
edgeType(int edge)
Determines the existence and directedness of an edge. 
boolean 
nodeExists(int node)
Determines whether or not a node exists in this graph. 
IntEnumerator 
nodes()
Returns an enumeration of all nodes in this graph. 
Field Detail 

static final byte DIRECTED_EDGE
static final byte UNDIRECTED_EDGE
Method Detail 

IntEnumerator nodes()
IntEnumerator edges()
boolean nodeExists(int node)
Note that this method is superfluous in this interface (that is, it could be removed without losing any functionality), because edgesAdjacent(int, boolean, boolean, boolean) can be used to test the presence of a node. However, because nodeExists(int) does not return a complicated object, its performance may be better than that of edgesAdjacent().
node
 the [potentially existing] node in this graph whose existence
we're querying.
byte edgeType(int edge)
edge
 the edge in this graph whose existence and/or
directedness we're seeking.
int edgeSource(int edge)
edge
 the edge in this graph whose source node we're seeking.
int edgeTarget(int edge)
edge
 the edge in this graph whose target node we're seeking.
IntEnumerator edgesAdjacent(int node, boolean outgoing, boolean incoming, boolean undirected)
This method returns null if and only if the specified node does not exist in this graph. Therefore, this method can be used to test the existence of a node in this graph.
node
 the node in this graph whose adjacent edges we're seeking.outgoing
 all directed edges whose source is the node specified
are included in the returned enumeration if this value is true;
otherwise, not a single such edge is included in the returned
enumeration.incoming
 all directed edges whose target is the node specified
are included in the returned enumeration if this value is true;
otherwise, not a single such edge is included in the returned
enumeration.undirected
 all undirected edges touching the specified node
are included in the returned enumeration if this value is true;
otherwise, not a single such edge is included in the returned
enumeration.
IntIterator edgesConnecting(int node0, int node1, boolean outgoing, boolean incoming, boolean undirected)
I'd like to discuss the motivation behind this interface method. I assume that most implementations of this interface will implement this method in terms of edgesAdjacent(). Why, then, is this method necessary? Because some implementations may choose to optimize the implementation of this method by using a search tree or a hashtable, for example. This method is a hook to provide such optimization.
This method returns an IntIterator as opposed to an IntEnumerator so that nonoptimized implementations would not be required to precompute the number of edges being returned.
node0
 one of the nodes in this graph whose connecting edges
we're seeking.node1
 one of the nodes in this graph whose connecting edges
we're seeking.outgoing
 all directed edges whose source is node0 and whose
target is node1 are included in the returned iteration if this value
is true; otherwise, not a single such edge is included in the returned
iteration.incoming
 all directed edges whose source is node1 and whose
target is node0 are included in the returned iteration if this value
is true; otherwise, not a single such edge is included in the returned
iteration.undirected
 all undirected edges E such that E's endpoints
are node0 and node1 are included in the returned iteration if this
value is true; otherwise, not a single such edge is incuded in the
returned iteration.

Cytoscape 2.8.0 API  
PREV CLASS NEXT CLASS  FRAMES NO FRAMES  
SUMMARY: NESTED  FIELD  CONSTR  METHOD  DETAIL: FIELD  CONSTR  METHOD 