Cytoscape 2.6.2 (c) 2006,2007 ISB, MSKCC, UCSD

giny.model
Interface GraphPerspective

All Known Subinterfaces:
CyNetwork
All Known Implementing Classes:
FingCyNetwork, FingExtensibleGraphPerspective

public interface GraphPerspective


Method Summary
 void addGraphPerspectiveChangeListener(GraphPerspectiveChangeListener listener)
           
 Object clone()
           
 boolean containsEdge(Edge edge)
          Return true if the given Edge is in this GraphPerspective.
 boolean containsEdge(Edge edge, boolean recurse)
          Return true if the given Edge is in this GraphPerspective.
 boolean containsNode(Node node)
          Return true if the given Node is in this GraphPerspective.
 boolean containsNode(Node node, boolean recurse)
          Return true if the given Node is in this GraphPerspective.
 GraphPerspective createGraphPerspective(Filter filter)
          Create a new GraphPerspective with all of the Nodes from this one that pass the given filter and all of the Edges from this one that pass the filter (and all Nodes incident on those edges).
 GraphPerspective createGraphPerspective(int[] node_indices)
          Create a new GraphPerspective given a list of Nodes.
 GraphPerspective createGraphPerspective(int[] node_indices, int[] edge_indices)
          Deprecated. Use RootGraph.createGraphPerspective(int[], int[]) instead.
 GraphPerspective createGraphPerspective(Node[] nodes, Edge[] edges)
          Deprecated. Use RootGraph.createGraphPerspective(int[], int[]) instead.
 boolean edgeExists(int from_node_index, int to_node_index)
          This method returns true if and only if either 1) there exists a directed edge E in this GraphPerspective such that from_node_index is E's source node's index and to_node_index is E's target node's index or 2) there exists an undirected edge E in this GraphPerspective such that E's endpoint nodes have indices from_node_index and to_node_index.
 boolean edgeExists(Node from, Node to)
          This method returns true if and only if either 1) there exists a directed edge E in this GraphPerspective such that the from node specified is E's source node and the target node specified is E's target node or 2) there exists an undirected edge E in this GraphPerspective such that E's endpoints are the from and to nodes specified.
 List edgeMetaChildrenList(int node_index)
          Nodes and Edges comprise an additional directed graph through the contains-a relationship, in which a MetaParent Node contains each of its MetaChild Nodes and Edges.
 List edgeMetaChildrenList(Node node)
          Nodes and Edges comprise an additional directed graph through the contains-a relationship, in which a MetaParent Node contains each of its MetaChild Nodes and Edges.
 List edgeMetaParentsList(int edge_index)
          Nodes and Edges comprise an additional directed graph through the contains-a relationship, in which a MetaParent Node contains each of its MetaChild Nodes and Edges.
 Iterator edgesIterator()
           
 List edgesList()
          Returns a list of Edge objects.
 List edgesList(int from_node_index, int to_node_index, boolean include_undirected_edges)
          Deprecated. Use getAdjacentEdgeIndicesArray(int, boolean, boolean, boolean) instead.
 List edgesList(Node from, Node to)
          Return a new List of the Edges in this GraphPerspective from the first given Node to the second given Node.
 int[] getAdjacentEdgeIndicesArray(int node_index, boolean undirected_edges, boolean incoming_directed_edges, boolean outgoing_directed_edges)
          Returns [RootGraph] indices of all Edges in this GraphPerspective adjacent to the Node at specified [RootGraph] index.
 List getAdjacentEdgesList(Node node, boolean include_undirected_edges, boolean incoming_edges, boolean outgoing_edges)
          Deprecated. Use getAdjacentEdgeIndicesArray(int, boolean, boolean, boolean) instead.
 int[] getConnectingEdgeIndicesArray(int[] node_indices)
          This will return an array of Edge indices that are the Edges between Nodes.
 List getConnectingEdges(List nodes)
          This will return a List of giny.model.Edge objects that are the Edges between Nodes.
 int[] getConnectingNodeIndicesArray(int[] edge_indices)
          Deprecated. Use getEdgeSourceIndex(int) and getEdgeTargetIndex(int) instead.
 int getDegree(int node_index)
          Return the number of distinct Edges in this GraphPerspective incident on the Node with the given index.
 int getDegree(Node node)
          Return the number of distinct Edges in this GraphPerspective incident on the given Node.
 Edge getEdge(int index)
          Return an Edge which is in this GraphPerspective.
 int getEdgeCount()
          Returns number of active edges in this perspective.
 int getEdgeCount(int from_node_index, int to_node_index, boolean count_undirected_edges)
          Count the number of edges from the Node with index from_index to the Node with index to_index (where this.getIndex( to_node ) == to_index).
 int getEdgeCount(Node from, Node to, boolean count_undirected_edges)
          Count the number of edges from the first Node to the second.
 int getEdgeIndex(int root_graph_edge_index)
          Deprecated. Use getRootGraphEdgeIndex(int), whose functionality is identical.
 int[] getEdgeIndicesArray()
          Returns an array of length getEdgeCount(); the array contains RootGraph indices of Edge objects in this GraphPerspective, in some undefined order.
 int[] getEdgeIndicesArray(int from_node_index, int to_node_index, boolean include_undirected_edges)
          Deprecated. Use getAdjacentEdgeIndicesArray(int, boolean, boolean, boolean) instead.
 int[] getEdgeIndicesArray(int from_node_index, int to_node_index, boolean include_undirected_edges, boolean include_both_directions)
          Deprecated. Use getAdjacentEdgeIndicesArray(int, boolean, boolean, boolean) instead.
 int[] getEdgeMetaChildIndicesArray(int node_index)
          Nodes and Edges comprise an additional directed graph through the contains-a relationship, in which a MetaParent Node contains each of its MetaChild Nodes and Edges.
 int[] getEdgeMetaParentIndicesArray(int edge_index)
          Nodes and Edges comprise an additional directed graph through the contains-a relationship, in which a MetaParent Node contains each of its MetaChild Nodes and Edges.
 int getEdgeSourceIndex(int edge_index)
          Retrieve the index of the Node that is the source of the Edge in this GraphPerspective with the given index.
 int getEdgeTargetIndex(int edge_index)
          Retrieve the index of the Node that is the target of the Edge in this GraphPerspective with the given index.
 int getInDegree(int node_index)
          Return the number of Edges e in this GraphPerspective such that e.getTarget().equals( node ).
 int getInDegree(int node_index, boolean count_undirected_edges)
          Return the number of Edges e in this GraphPerspective such that e.getSource().equals( node ).
 int getInDegree(Node node)
          Return the number of Edges e in this GraphPerspective such that e.getTarget().equals( node ).
 int getInDegree(Node node, boolean count_undirected_edges)
          Return the number of Edges e in this GraphPerspective such that e.getSource().equals( node ).
 int getIndex(Edge edge)
          Return the index of the given Edge in the underlying RootGraph.
 int getIndex(Node node)
          Return the index of the given Node in the underlying RootGraph.
 Node getNode(int index)
          Return a Node which is in this GraphPerspective.
 int getNodeCount()
          Returns number of active nodes in this perspective.
 int getNodeIndex(int root_graph_node_index)
          Deprecated. Use getRootGraphNodeIndex(int), whose functionality is identical.
 int[] getNodeIndicesArray()
          Returns an array of length getNodeCount(); the array contains RootGraph indices of Node objects in this GraphPerspective, in some undefined order.
 int[] getNodeMetaChildIndicesArray(int node_index)
          Nodes and Edges comprise an additional directed graph through the contains-a relationship, in which a MetaParent Node contains each of its MetaChild Nodes and Edges.
 int[] getNodeMetaParentIndicesArray(int node_index)
          Nodes and Edges comprise an additional directed graph through the contains-a relationship, in which a MetaParent Node contains each of its MetaChild Nodes and Edges.
 int getOutDegree(int node_index)
          Return the number of Edges e in this GraphPerspective such that e.getSource().equals( node ).
 int getOutDegree(int node_index, boolean count_undirected_edges)
          Return the number of Edges e in this GraphPerspective such that e.getSource().equals( node ).
 int getOutDegree(Node node)
          Return the number of Edges e in this GraphPerspective such that e.getSource().equals( node ).
 int getOutDegree(Node node, boolean count_undirected_edges)
          Return the number of Edges e in this GraphPerspective such that e.getSource().equals( node ).
 RootGraph getRootGraph()
          Return the root Graph for this GraphPerspective
 int getRootGraphEdgeIndex(int root_graph_edge_index)
          This method returns the input parameter if and only if an Edge at the specified RootGraph index exists in this GraphPerspective; otherwise 0 is returned.
 int getRootGraphNodeIndex(int root_graph_node_index)
          This method returns the input parameter if and only if a Node at the specified RootGraph index exists in this GraphPerspective; otherwise 0 is returned.
 Edge hideEdge(Edge edge)
          If this GraphPerspective does not hide the given Edge, change it so that it does hide the edge.
 int hideEdge(int edge_index)
          If this GraphPerspective does not hide the Edge with the given index in the RootGraph, change it so that it does hide the edge.
 int[] hideEdges(int[] edge_indices)
          If this GraphPerspective does not hide any of the Edges corresponding to the indices in the given array, change it so that it does hide those edges.
 List hideEdges(List edges)
          Deprecated. Use hideEdge(Edge) or hideEdges(int[]) instead.
 int hideNode(int node_index)
          If this GraphPerspective does not hide the Node with the given index in the underlying RootGraph, change it so that it does hide the node and all of its incident edges.
 Node hideNode(Node node)
          If this GraphPerspective does not hide the given Node, change it so that it does hide the node and all of its incident edges.
 int[] hideNodes(int[] node_indices)
          If this GraphPerspective does not hide any of the Nodes corresponding to the indices in the given array, change it so that it does hide those nodes and all Edges incident on them.
 List hideNodes(List nodes)
          Deprecated. Use hideNode(Node) or hideNodes(int[]) instead.
 boolean isEdgeDirected(int edge_index)
          Retrieve the directedness of the Edge in this GraphPerspective with the given [RootGraph] index.
 boolean isEdgeMetaChild(int parent_index, int child_edge_index)
          Nodes and Edges comprise an additional directed graph through the contains-a relationship, in which a MetaParent Node contains each of its MetaChild Nodes and Edges.
 boolean isEdgeMetaParent(int child_edge_index, int parent_index)
          Nodes and Edges comprise an additional directed graph through the contains-a relationship, in which a MetaParent Node contains each of its MetaChild Nodes and Edges.
 boolean isMetaChild(Node parent, Edge child)
          Nodes and Edges comprise an additional directed graph through the contains-a relationship, in which a MetaParent Node contains each of its MetaChild Nodes and Edges.
 boolean isMetaChild(Node parent, Node child)
          Nodes and Edges comprise an additional directed graph through the contains-a relationship, in which a MetaParent Node contains each of its MetaChild Nodes and Edges.
 boolean isMetaParent(Edge child, Node parent)
          Nodes and Edges comprise an additional directed graph through the contains-a relationship, in which a MetaParent Node contains each of its MetaChild Nodes and Edges.
 boolean isMetaParent(Node child, Node parent)
          Nodes and Edges comprise an additional directed graph through the contains-a relationship, in which a MetaParent Node contains each of its MetaChild Nodes and Edges.
 boolean isNeighbor(int a_node_index, int another_node_index)
          Please note that the definition of "node neighbor" is such: Node A is a "node neighbor" of node B if and only if there exists an edge [directed or undirected] E such that A is E's target and B is E's source, or A is E's source and B is E's target; this method then returns true if and only if node at index a_node_index is a "node neighbor" of node at index another_node_index in this GraphPerspective.
 boolean isNeighbor(Node a_node, Node another_node)
          Please note that the definition of "node neighbor" is such: Node A is a "node neighbor" of node B if and only if there exists an edge [directed or undirected] E such that A is E's target and B is E's source, or A is E's source and B is E's target; this method then returns true if and only if a_node is a "node neighbor" of another_node in this GraphPerspective.
 boolean isNodeMetaChild(int parent_index, int child_node_index)
          Nodes and Edges comprise an additional directed graph through the contains-a relationship, in which a MetaParent Node contains each of its MetaChild Nodes and Edges.
 boolean isNodeMetaParent(int child_node_index, int parent_index)
          Nodes and Edges comprise an additional directed graph through the contains-a relationship, in which a MetaParent Node contains each of its MetaChild Nodes and Edges.
 GraphPerspective join(GraphPerspective peer)
          Creates a union GraphPerspective.
 List metaParentsList(Edge edge)
          Nodes and Edges comprise an additional directed graph through the contains-a relationship, in which a MetaParent Node contains each of its MetaChild Nodes and Edges.
 List metaParentsList(Node node)
          Nodes and Edges comprise an additional directed graph through the contains-a relationship, in which a MetaParent Node contains each of its MetaChild Nodes and Edges.
 int[] neighborsArray(int node_index)
          Please note that the definition of "node neighbor" is such: Node A is a "node neighbor" of node B if and only if there exists an edge [directed or undirected] E such that A is E's target and B is E's source, or A is E's source and B is E's target; this method then returns a non-repeating list of indices of all nodes N in this GraphPerspective such that N is a "node neighbor" of the node at specified index, or null if no node at specified index exists in this GraphPerspective.
 List neighborsList(Node node)
          Deprecated. Use neighborsArray(int) instead;
 List nodeMetaChildrenList(int parent_index)
          Nodes and Edges comprise an additional directed graph through the contains-a relationship, in which a MetaParent Node contains each of its MetaChild Nodes and Edges.
 List nodeMetaChildrenList(Node node)
          Nodes and Edges comprise an additional directed graph through the contains-a relationship, in which a MetaParent Node contains each of its MetaChild Nodes and Edges.
 List nodeMetaParentsList(int node_index)
          Nodes and Edges comprise an additional directed graph through the contains-a relationship, in which a MetaParent Node contains each of its MetaChild Nodes and Edges.
 Iterator nodesIterator()
          Returns an Iterator over all giny.model.Node objects in this GraphPerspective.
 List nodesList()
          Returns a list of Node objects.
 void removeGraphPerspectiveChangeListener(GraphPerspectiveChangeListener listener)
           
 Edge restoreEdge(Edge edge)
          If this GraphPerspective hides the given Edge, change it so that it does not hide the edge or the Nodes on which the edge is incident.
 int restoreEdge(int edge_index)
          If this GraphPerspective hides the Edge with the given index in the underlying RootGraph, change it so that it does not hide the edge or the Nodes on which the edge is incident.
 int[] restoreEdges(int[] edge_indices)
          If this GraphPerspective hides any of the Edges corresponding to the indices in the given array, change it so that it does not hide those edges or any of the Nodes on which they are incident.
 List restoreEdges(List edges)
          Deprecated. Use restoreEdges(int[]) instead.
 int restoreNode(int node_index)
          If this GraphPerspective hides the Node with the given index in the underlying RootGraph, change it so that it does not hide the node.
 Node restoreNode(Node node)
          If this GraphPerspective hides the given Node, change it so that it does not hide the node.
 int[] restoreNodes(int[] node_indices)
          If this GraphPerspective hides any of the Nodes corresponding to the indices in the given array, change it so that it does not hide those nodes.
 int[] restoreNodes(int[] node_indices, boolean restore_incident_edges)
          Deprecated. Use restoreNodes(int[]) and restoreEdges(int[]) instead; to get edges incident to specified nodes, use RootGraph.getConnectingEdgeIndicesArray(int[]).
 List restoreNodes(List nodes)
          Deprecated. Use restoreNode(Node) restoreNodes(int[]) instead.
 List restoreNodes(List nodes, boolean restore_incident_edges)
          Deprecated. Use restoreNodes(int[]) and restoreEdges(int[]) instead; to get edges incident to specified nodes, use RootGraph.getConnectingEdgeIndicesArray(int[]).
 

Method Detail

addGraphPerspectiveChangeListener

void addGraphPerspectiveChangeListener(GraphPerspectiveChangeListener listener)

removeGraphPerspectiveChangeListener

void removeGraphPerspectiveChangeListener(GraphPerspectiveChangeListener listener)

clone

Object clone()

getRootGraph

RootGraph getRootGraph()
Return the root Graph for this GraphPerspective


getNodeCount

int getNodeCount()
Returns number of active nodes in this perspective.


getEdgeCount

int getEdgeCount()
Returns number of active edges in this perspective.


nodesIterator

Iterator nodesIterator()
Returns an Iterator over all giny.model.Node objects in this GraphPerspective.

TECHNICAL DETAIL: Iterating over the set of all nodes in a GraphPerspective and manipulating a GraphPerspective's topology (by calling hideXXX() and restoreXXX() methods) concurrently will have undefined effects on the returned Iterator.

Returns:
an Iterator over the Nodes in this graph; each Object in the returned Iterator is of type giny.model.Node.

nodesList

List nodesList()
Returns a list of Node objects.

See Also:
nodesIterator()

getNodeIndicesArray

int[] getNodeIndicesArray()
Returns an array of length getNodeCount(); the array contains RootGraph indices of Node objects in this GraphPerspective, in some undefined order.

See Also:
nodesIterator(), GraphObject.getRootGraphIndex()

edgesIterator

Iterator edgesIterator()
Returns:
an Iterator over the Edges in this graph.

edgesList

List edgesList()
Returns a list of Edge objects.

See Also:
edgesIterator()

getEdgeIndicesArray

int[] getEdgeIndicesArray()
Returns an array of length getEdgeCount(); the array contains RootGraph indices of Edge objects in this GraphPerspective, in some undefined order.

See Also:
edgesIterator(), GraphObject.getRootGraphIndex()

getEdgeIndicesArray

int[] getEdgeIndicesArray(int from_node_index,
                          int to_node_index,
                          boolean include_undirected_edges,
                          boolean include_both_directions)
Deprecated. Use getAdjacentEdgeIndicesArray(int, boolean, boolean, boolean) instead.

Returns:
null is returned if either of the specified Nodes is not in this GraphPerspective.
See Also:
getAdjacentEdgeIndicesArray(int, boolean, boolean, boolean)

hideNode

Node hideNode(Node node)
If this GraphPerspective does not hide the given Node, change it so that it does hide the node and all of its incident edges.

Parameters:
node - The Node to hide.
Returns:
The given node, unless it was already hidden, in which case null.

hideNode

int hideNode(int node_index)
If this GraphPerspective does not hide the Node with the given index in the underlying RootGraph, change it so that it does hide the node and all of its incident edges.

Parameters:
node_index - The index in the underlying RootGraph of the Node to hide.
Returns:
The given index, unless the corresponding Node was already hidden or does not exist in the underlying RootGraph, in which case 0.

hideNodes

List hideNodes(List nodes)
Deprecated. Use hideNode(Node) or hideNodes(int[]) instead.

See Also:
hideNode(Node), hideNodes(int[])

hideNodes

int[] hideNodes(int[] node_indices)
If this GraphPerspective does not hide any of the Nodes corresponding to the indices in the given array, change it so that it does hide those nodes and all Edges incident on them. Returns an array of equal length to the one given, in which each corresponding position is either the same as in the argument array or is 0, indicating that the node with that index was already hidden.

Parameters:
node_indices - The int array of indices in the underlying RootGraph of the Nodes to hide.
Returns:
An int array of equal length to the argument array, and with equal values except at positions that in the input array contain indices corresponding to Nodes that were already hidden; at these positions the result array will contain the value 0.

restoreNode

Node restoreNode(Node node)
If this GraphPerspective hides the given Node, change it so that it does not hide the node.

Parameters:
node - The Node to restore.
Returns:
The given node, unless it was not hidden or it doesn't exist in the RootGraph, in which case null.

restoreNode

int restoreNode(int node_index)
If this GraphPerspective hides the Node with the given index in the underlying RootGraph, change it so that it does not hide the node.

Parameters:
node_index - The index in the underlying RootGraph of the Node to restore.
Returns:
The given index, unless the corresponding Node was already restored or does not exist in the RootGraph, in which case 0.

restoreNodes

List restoreNodes(List nodes)
Deprecated. Use restoreNode(Node) restoreNodes(int[]) instead.

See Also:
restoreNode(Node), restoreNodes(int[])

restoreNodes

List restoreNodes(List nodes,
                  boolean restore_incident_edges)
Deprecated. Use restoreNodes(int[]) and restoreEdges(int[]) instead; to get edges incident to specified nodes, use RootGraph.getConnectingEdgeIndicesArray(int[]).

See Also:
restoreNodes(int[]), restoreEdges(int[]), RootGraph.getConnectingEdgeIndicesArray(int[])

restoreNodes

int[] restoreNodes(int[] node_indices,
                   boolean restore_incident_edges)
Deprecated. Use restoreNodes(int[]) and restoreEdges(int[]) instead; to get edges incident to specified nodes, use RootGraph.getConnectingEdgeIndicesArray(int[]).

If this GraphPerspective hides any of the Nodes with the given RootGraph indices change it so that it does not hide those nodes.

Parameters:
node_indices - The Node indices.
restore_incident_edges - Whether or not the incident edges to the restored nodes should also be restored.
Returns:
An array of length equal to the length of the argument array, and with equal values except at positions that in the input array contain indices corresponding to Nodes that were already restored or don't exist in the RootGraph; at these positions the result array will contain the value 0.
See Also:
restoreNodes(int[]), restoreEdges(int[]), RootGraph.getConnectingEdgeIndicesArray(int[])

restoreNodes

int[] restoreNodes(int[] node_indices)
If this GraphPerspective hides any of the Nodes corresponding to the indices in the given array, change it so that it does not hide those nodes. Returns an array of equal length to the one given, in which each corresponding position is either the same as in the argument array or is 0, indicating that the node with that index was already restored or does not exist in the RootGraph.

Parameters:
node_indices - The int array of indices in the underlying RootGraph of the Nodes to restore.
Returns:
An int array of equal length to the argument array, and with equal values except at positions that in the input array contain indices corresponding to Nodes that were already restored or don't exist in the RootGraph; at these positions the result array will contain the value 0.

hideEdge

Edge hideEdge(Edge edge)
If this GraphPerspective does not hide the given Edge, change it so that it does hide the edge.

Parameters:
edge - The Edge to hide.
Returns:
The given edge, unless it was already hidden, in which case null.

hideEdge

int hideEdge(int edge_index)
If this GraphPerspective does not hide the Edge with the given index in the RootGraph, change it so that it does hide the edge.

Parameters:
edge_index - The index in the underlying RootGraph of the Edge to hide.
Returns:
The given index, unless the corresponding Edge was already hidden or does not exist in the underlying RootGraph, in which case 0.

hideEdges

List hideEdges(List edges)
Deprecated. Use hideEdge(Edge) or hideEdges(int[]) instead.

See Also:
hideEdge(Edge), hideEdges(int[])

hideEdges

int[] hideEdges(int[] edge_indices)
If this GraphPerspective does not hide any of the Edges corresponding to the indices in the given array, change it so that it does hide those edges. Returns an array of equal length to the one given, in which each corresponding position is either the same as in the argument array or is 0, indicating that the edge with that index was already hidden.

Parameters:
edge_indices - The int array of indices in the underlying RootGraph of the Edges to hide.
Returns:
An int array of equal length to the argument array, and with equal values except at positions that in the input array contain indices corresponding to Edges that were already hidden; at these positions the result array will contain the value 0.

restoreEdge

Edge restoreEdge(Edge edge)
If this GraphPerspective hides the given Edge, change it so that it does not hide the edge or the Nodes on which the edge is incident.

Parameters:
edge - The Edge to restore.
Returns:
The given edge, unless it was not hidden or does not exist in the underlying RootGraph, in which case null.

restoreEdge

int restoreEdge(int edge_index)
If this GraphPerspective hides the Edge with the given index in the underlying RootGraph, change it so that it does not hide the edge or the Nodes on which the edge is incident.

Parameters:
edge_index - The index in the underlying RootGraph of the Edge to restore.
Returns:
The given index, unless the corresponding Edge was already restored or does not exist in the RootGraph, in which case 0.

restoreEdges

List restoreEdges(List edges)
Deprecated. Use restoreEdges(int[]) instead.

See Also:
restoreEdges(int[])

restoreEdges

int[] restoreEdges(int[] edge_indices)
If this GraphPerspective hides any of the Edges corresponding to the indices in the given array, change it so that it does not hide those edges or any of the Nodes on which they are incident.

Parameters:
edge_indices - An array of indices in the underlying RootGraph of the Edges to restore.
Returns:
An int array of equal length to the argument array, and with equal values except at positions that in the input array contain indices corresponding to Edges that were already restored or don't exist in the underlying RootGraph; at these positions the result array will contain the value 0.

containsNode

boolean containsNode(Node node)
Return true if the given Node is in this GraphPerspective. False otherwise. This method is recursive, so even if this GraphPerspective does hide the Node, this method will return true if the given Node is contained within any non-hidden Node (via the MetaParent->MetaChild relationship) at any depth. This method is equivalent to calling containsNode(Node, boolean) with a true boolean argument.

Returns:
true iff the given Node is in this GraphPerspective.
See Also:
containsNode(Node, boolean)

containsNode

boolean containsNode(Node node,
                     boolean recurse)
Return true if the given Node is in this GraphPerspective. False otherwise. If the recurse flag is true then this method will be recursive, so even if this GraphPerspective does hide the Node, this method will return true if the given Node is contained within any non-hidden Node (via the MetaParent->MetaChild relationship) at any depth. If recurse is false then this method will return false iff the given Node is hidden in this GraphPerspective.

Returns:
true iff the given Node is in this GraphPerspective.

containsEdge

boolean containsEdge(Edge edge)
Return true if the given Edge is in this GraphPerspective. False otherwise. This method is recursive, so even if this GraphPerspective does hide the Edge, this method will return true if the given Edge is contained within any non-hidden Node (via the MetaParent->MetaChild relationship) at any depth. This method calls containsEdge( Edge, boolean ) with a true recurse boolean argument.

Returns:
true iff the given Edge is in this GraphPerspective.

containsEdge

boolean containsEdge(Edge edge,
                     boolean recurse)
Return true if the given Edge is in this GraphPerspective. False otherwise. If the recurse flag is true then this method will be recursive, so even if this GraphPerspective does hide the Edge, this method will return true if the given Edge is contained within any non-hidden Node (via the MetaParent->MetaChild relationship) at any depth. If recurse is false then this method will return false iff the given Edge is hidden in this GraphPerspective.


join

GraphPerspective join(GraphPerspective peer)
Creates a union GraphPerspective. The given GraphPerspective must have the same RootGraph as this one.

Returns:
a new GraphPerspective that contains the union of Nodes and Edges from this GraphPerspective and the given GraphPerspective, or null if the input GraphPerspective does not have the same RootGraph as this one.

createGraphPerspective

GraphPerspective createGraphPerspective(Node[] nodes,
                                        Edge[] edges)
Deprecated. Use RootGraph.createGraphPerspective(int[], int[]) instead.

Create a new GraphPerspective with just the given Nodes and Edges (and all Nodes incident on the given Edges).

Parameters:
nodes - A [possibly null] array of Nodes in this GraphPerspective to include in the new GraphPerspective.
edges - A [possibly null] array of Edges in this GraphPerspective to include in the new GraphPerspective.
Returns:
a new GraphPerspective on this GraphPerspective containing only the given Nodes and Edges, plus any Nodes incident on the given Edges array but omitted from the given Nodes array; returns null if any of the specified Nodes or Edges are not in this GraphPerspective.
See Also:
RootGraph.createGraphPerspective(int[], int[])

createGraphPerspective

GraphPerspective createGraphPerspective(int[] node_indices,
                                        int[] edge_indices)
Deprecated. Use RootGraph.createGraphPerspective(int[], int[]) instead.

Create a new GraphPerspective with just the Nodes with the given node_indices and just the Edges with the given edge_indices (and all Nodes incident on the given Edges).

Parameters:
node_indices - A [possibly null] array of [RootGraph] indices of Nodes in this GraphPerspective to include in the new GraphPerspective.
edge_indices - A [possibly null] array of [RootGraph] indices of Edges in this GraphPerspective to include in the new GraphPerspective.
Returns:
a new GraphPerspective on this GraphPerspective containing only Nodes and Edges with the given indices, including all Nodes incident on those Edges; returns null if any of the specified Node or Edge indices do not correspond to Nodes or Edges existing in this GraphPerspective.
See Also:
RootGraph.createGraphPerspective(int[], int[])

createGraphPerspective

GraphPerspective createGraphPerspective(Filter filter)
Create a new GraphPerspective with all of the Nodes from this one that pass the given filter and all of the Edges from this one that pass the filter (and all Nodes incident on those edges).


neighborsList

List neighborsList(Node node)
Deprecated. Use neighborsArray(int) instead;

See Also:
neighborsArray(int)

neighborsArray

int[] neighborsArray(int node_index)
Please note that the definition of "node neighbor" is such: Node A is a "node neighbor" of node B if and only if there exists an edge [directed or undirected] E such that A is E's target and B is E's source, or A is E's source and B is E's target; this method then returns a non-repeating list of indices of all nodes N in this GraphPerspective such that N is a "node neighbor" of the node at specified index, or null if no node at specified index exists in this GraphPerspective.

Parameters:
node_index - The node whose neighbors you're looking for.

isNeighbor

boolean isNeighbor(Node a_node,
                   Node another_node)
Please note that the definition of "node neighbor" is such: Node A is a "node neighbor" of node B if and only if there exists an edge [directed or undirected] E such that A is E's target and B is E's source, or A is E's source and B is E's target; this method then returns true if and only if a_node is a "node neighbor" of another_node in this GraphPerspective.

Parameters:
a_node - Source node.
another_node - Possible target node.

isNeighbor

boolean isNeighbor(int a_node_index,
                   int another_node_index)
Please note that the definition of "node neighbor" is such: Node A is a "node neighbor" of node B if and only if there exists an edge [directed or undirected] E such that A is E's target and B is E's source, or A is E's source and B is E's target; this method then returns true if and only if node at index a_node_index is a "node neighbor" of node at index another_node_index in this GraphPerspective.

Parameters:
a_node_index - Source node index.
another_node_index - Possible target node index.

edgeExists

boolean edgeExists(Node from,
                   Node to)
This method returns true if and only if either 1) there exists a directed edge E in this GraphPerspective such that the from node specified is E's source node and the target node specified is E's target node or 2) there exists an undirected edge E in this GraphPerspective such that E's endpoints are the from and to nodes specified.

Parameters:
from - Source node.
to - Possible target node.

edgeExists

boolean edgeExists(int from_node_index,
                   int to_node_index)
This method returns true if and only if either 1) there exists a directed edge E in this GraphPerspective such that from_node_index is E's source node's index and to_node_index is E's target node's index or 2) there exists an undirected edge E in this GraphPerspective such that E's endpoint nodes have indices from_node_index and to_node_index.

Parameters:
from_node_index - Source node index.
to_node_index - Possible target node index.

getEdgeCount

int getEdgeCount(Node from,
                 Node to,
                 boolean count_undirected_edges)
Count the number of edges from the first Node to the second. Note that if count_undirected_edges is false, any Edge e such that e.isDirected() == false will not be included in the count.

Parameters:
from - the Node in this GraphPerspective that is the source of the edges to be counted.
to - the Node in this GraphPerspective that is the target of the edges to be counted.
count_undirected_edges - Undirected edges will be included in the count iff count_undirected_edges is true.
Returns:
the number of Edges from the from Node to the to Node; returns -1 if either the from or the to Node is not in this GraphPerspective.

getEdgeCount

int getEdgeCount(int from_node_index,
                 int to_node_index,
                 boolean count_undirected_edges)
Count the number of edges from the Node with index from_index to the Node with index to_index (where this.getIndex( to_node ) == to_index). Note that if count_undirected_edges is false, any Edge e such that e.isDirected() == false will not be included in the count.

Parameters:
from_node_index - the index in this GraphPerspective of the Node to count edges from.
to_node_index - the index in this GraphPerspective of the Node to find edges to.
count_undirected_edges - Undirected edges will be included in the count iff count_undirected_edges is true.
Returns:
the number of Edges from the Node with index from_index to the Node with index to_index; returns -1 if either one of the two specified nodes is not in this GraphPerspective.

edgesList

List edgesList(Node from,
               Node to)
Return a new List of the Edges in this GraphPerspective from the first given Node to the second given Node.

Parameters:
from - the Node in this GraphPerspective that is the source of the Edges to be returned.
to - the Node in this GraphPerspective that is the target of the Edges to be returned.
Returns:
a new List of the Edges from the from Node to the to Node, or the empty List if none exist; null is returned if either of the specified nodes is not in this GraphPerspective.

edgesList

List edgesList(int from_node_index,
               int to_node_index,
               boolean include_undirected_edges)
Deprecated. Use getAdjacentEdgeIndicesArray(int, boolean, boolean, boolean) instead.

Return an array of the indices in this GraphPerspective of all Edges from the Node with the first given index to the Node with the second given index.

Parameters:
from_node_index - the index in this GraphPerspective of the Node to return edges from.
to_node_index - the index in this GraphPerspective of the Node to return edges to.
include_undirected_edges - Undirected edges will be included in the List iff include_undirected_edges is true.
Returns:
a new List of the Edges from the Node corresponding to from_node_index to the Node corresponding to to_node_index, or the empty List if none exist; null is returned if either of the specified nodes does not exist in this GraphPerspective.
See Also:
getAdjacentEdgeIndicesArray(int, boolean, boolean, boolean)

getEdgeIndicesArray

int[] getEdgeIndicesArray(int from_node_index,
                          int to_node_index,
                          boolean include_undirected_edges)
Deprecated. Use getAdjacentEdgeIndicesArray(int, boolean, boolean, boolean) instead.

Return an array of the indices in this GraphPerspective of all Edges from the Node with the first given index to the Node with the second given index.
The result should be considered final; it must not be modified by the receiver.

Parameters:
from_node_index - the index in this GraphPerspective of the Node to return edges from.
to_node_index - the index in this GraphPerspective of the Node to return edges to.
include_undirected_edges - Undirected edges will be included in the array iff include_undirected_edges is true.
Returns:
an array of indices corresponding to Edges from the Node at index from_node_index to the Node at index to_node_index; the empty array is returned if no such Edges exist; null is returned if either of the specified Nodes does not exist in this GraphPerspective.
See Also:
getAdjacentEdgeIndicesArray(int, boolean, boolean, boolean)

getInDegree

int getInDegree(Node node)
Return the number of Edges e in this GraphPerspective such that e.getTarget().equals( node ). Note that this includes undirected edges, so it will not always be the case that getInDegree( node ) + getOutDegree( node ) == getDegree( node ).

Parameters:
node - the Node to count in-edges of.
Returns:
the in-degree of the given Node, or -1 if the specified Node is not in this GraphPerspective.

getInDegree

int getInDegree(int node_index)
Return the number of Edges e in this GraphPerspective such that e.getTarget().equals( node ). Note that this includes undirected edges, so it will not always be the case that getInDegree( node ) + getOutDegree( node ) == getDegree( node ).

Parameters:
node_index - the index of the Node to count in-edges of.
Returns:
the in-degree of the Node with the given index, or -1 if this GraphPerspective has no Node with specified index.

getInDegree

int getInDegree(Node node,
                boolean count_undirected_edges)
Return the number of Edges e in this GraphPerspective such that e.getSource().equals( node ). Note that if count_undirected_edges is true, this includes undirected edges, so it will not always be the case that getInDegree( node, true ) + getOutDegree( node, true ) == getDegree( node ), but it will always be the case that getInDegree( node, true ) + getOutDegree( node, false ) == getDegree( node ).

Parameters:
node - the Node to count in-edges of.
count_undirected_edges - Undirected edges will be included in the count iff count_undirected_edges is true.
Returns:
the in-degree of the given Node or -1 if specified Node is not in this GraphPerspective.

getInDegree

int getInDegree(int node_index,
                boolean count_undirected_edges)
Return the number of Edges e in this GraphPerspective such that e.getSource().equals( node ). Note that if count_undirected_edges is true, this includes undirected edges, so it will not always be the case that getInDegree( node, true ) + getOutDegree( node, true ) == getDegree( node ), but it will always be the case that getInDegree( node, true ) + getOutDegree( node, false ) == getDegree( node ).

Parameters:
node_index - the index of the Node to count in-edges of.
count_undirected_edges - Undirected edges will be included in the count iff count_undirected_edges is true.
Returns:
the in-degree of the Node with the given index or -1 if this GraphPerspective has no Node at specified index.

getOutDegree

int getOutDegree(Node node)
Return the number of Edges e in this GraphPerspective such that e.getSource().equals( node ). Note that this includes undirected edges, so it will not always be the case that getInDegree( node ) + getOutDegree( node ) == getDegree( node ).

Parameters:
node - the Node to count out-edges of.
Returns:
the out-degree of the given Node, or -1 if specified Node is not in this GraphPerspective.

getOutDegree

int getOutDegree(int node_index)
Return the number of Edges e in this GraphPerspective such that e.getSource().equals( node ). Note that this includes undirected edges, so it will not always be the case that getInDegree( node ) + getOutDegree( node ) == getDegree( node ).

Parameters:
node_index - the index of the Node to count out-edges of.
Returns:
the out-degree of the Node with the given index or -1 if index specified does not correspond to a Node in this GraphPerspective.

getOutDegree

int getOutDegree(Node node,
                 boolean count_undirected_edges)
Return the number of Edges e in this GraphPerspective such that e.getSource().equals( node ). Note that if count_undirected edges is true, this includes undirected edges, so it will not always be the case that getInDegree( node, true ) + getOutDegree( node, true ) == getDegree( node ), but it will always be the case that getInDegree( node, true ) + getOutDegree( node, false ) == getDegree( node ).

Parameters:
node - the Node to count out-edges of.
count_undirected_edges - Undirected edges will be included in the count iff count_undirected_edges is true.
Returns:
the out-degree of the given Node or -1 if specified Node is not in this GraphPerspective.

getOutDegree

int getOutDegree(int node_index,
                 boolean count_undirected_edges)
Return the number of Edges e in this GraphPerspective such that e.getSource().equals( node ). Note that if count_undirected edges is true, this includes undirected edges, so it will not always be the case that getInDegree( node, true ) + getOutDegree( node, true ) == getDegree( node ), but it will always be the case that getInDegree( node, true ) + getOutDegree( node, false ) == getDegree( node ).

Parameters:
node_index - the index of the Node to count out-edges of.
count_undirected_edges - Undirected edges will be included in the count iff count_undirected_edges is true.
Returns:
the out-degree of the Node with the given index or -1 if this GraphPerspective has no Node with specified RootGraph index.

getDegree

int getDegree(Node node)
Return the number of distinct Edges in this GraphPerspective incident on the given Node. By 'distinct' we mean that no Edge will be counted twice, even if it is undirected.

Returns:
the degree, in this GraphPerspective, of the given Node, or -1 if specified Node is not in this GraphPerspective.

getDegree

int getDegree(int node_index)
Return the number of distinct Edges in this GraphPerspective incident on the Node with the given index. By 'distinct' we mean that no Edge will be counted twice, even if it is undirected.

Returns:
the degree, in this GraphPerspective, of the Node with the given index, or -1 if this GraphPerspective has no Node with specified [RootGraph] index.

getIndex

int getIndex(Node node)
Return the index of the given Node in the underlying RootGraph. If the Node is hidden in this perspective, the result will be 0.

Parameters:
node - the Node to find a corresponding index for.
Returns:
the index of the given Node in the RootGraph (node.getRootGraphIndex()), or 0 if it is hidden or does not exist in the underlying RootGraph.

getNodeIndex

int getNodeIndex(int root_graph_node_index)
Deprecated. Use getRootGraphNodeIndex(int), whose functionality is identical.

See Also:
getRootGraphNodeIndex(int)

getRootGraphNodeIndex

int getRootGraphNodeIndex(int root_graph_node_index)
This method returns the input parameter if and only if a Node at the specified RootGraph index exists in this GraphPerspective; otherwise 0 is returned.


getNode

Node getNode(int index)
Return a Node which is in this GraphPerspective. in this GraphPerspective.

Parameters:
index - the index into the underlying RootGraph to find a corresponding GraphPerspective Node for.
Returns:
the Node in this GraphPerspective, or null if no such Node exists in this GraphPerspective.

getIndex

int getIndex(Edge edge)
Return the index of the given Edge in the underlying RootGraph. If the Edge is hidden in this perspective, the result will be 0.

Parameters:
edge - the Edge to find a corresponding index for.
Returns:
the index of the given Edge in the RootGraph (edge.getRootGraphIndex()), or 0 if it is hidden or does not exist in the underlying RootGraph.

getEdgeIndex

int getEdgeIndex(int root_graph_edge_index)
Deprecated. Use getRootGraphEdgeIndex(int), whose functionality is identical.

See Also:
getRootGraphEdgeIndex(int)

getRootGraphEdgeIndex

int getRootGraphEdgeIndex(int root_graph_edge_index)
This method returns the input parameter if and only if an Edge at the specified RootGraph index exists in this GraphPerspective; otherwise 0 is returned.


getEdge

Edge getEdge(int index)
Return an Edge which is in this GraphPerspective.

Parameters:
index - the index into the underlying RootGraph to find a corresponding GraphPerspective Edge for.
Returns:
the Edge in this GraphPerspective, or null if no such Edge exists in this GraphPerspective.

getEdgeSourceIndex

int getEdgeSourceIndex(int edge_index)
Retrieve the index of the Node that is the source of the Edge in this GraphPerspective with the given index. Note that if the edge is undirected, the edge also connects the target to the source.

Parameters:
edge_index - the [RootGraph] index of the Edge in this GraphPerspective.
Returns:
the index of the Edge's source Node, or 0 if the Edge is not in this GraphPerspective.

getEdgeTargetIndex

int getEdgeTargetIndex(int edge_index)
Retrieve the index of the Node that is the target of the Edge in this GraphPerspective with the given index. Note that if the edge is undirected, the edge also connects the target to the source.

Parameters:
edge_index - the [RootGraph] index of the Edge in this GraphPerspective.
Returns:
the index of the Edge's target Node, or 0 if the Edge is not in this GraphPerspective.

isEdgeDirected

boolean isEdgeDirected(int edge_index)
Retrieve the directedness of the Edge in this GraphPerspective with the given [RootGraph] index. Note that if the edge is undirected, the edge also connects the target to the source.

Parameters:
edge_index - the [RootGraph] index of the Edge in this GraphPerspective.
Returns:
true iff the edge is directed; if no Edge at specified index exists in this GraphPerspective, the result of this method is undefined.

isMetaParent

boolean isMetaParent(Node child,
                     Node parent)
Nodes and Edges comprise an additional directed graph through the contains-a relationship, in which a MetaParent Node contains each of its MetaChild Nodes and Edges. A Node may have any number of MetaParents. isMetaParent returns true iff the second argument (parent) is an MetaParent of the first argument (child) and both Nodes are in this GraphPerspective.

Parameters:
child - the Node that is the child (the containee) in the contains-a relationship that we are querying.
parent - the Node that is the parent (the container) in the contains-a relationship that we are querying.
Returns:
true iff the latter argument is a MetaParent of the former argument in this GraphPerspective.

isNodeMetaParent

boolean isNodeMetaParent(int child_node_index,
                         int parent_index)
Nodes and Edges comprise an additional directed graph through the contains-a relationship, in which a MetaParent Node contains each of its MetaChild Nodes and Edges. A Node may have any number of MetaParents. isMetaParent returns true iff the Node corresponding to the second argument (parent_index) is a MetaParent of the Node corresponding to the first argument (child_index) and both Nodes are in this GraphPerspective.

Parameters:
child_node_index - the index in the RootGraph of the Node that is the child (the containee) in the contains-a relationship that we are querying.
parent_index - the index in the RootGraph of the Node that is the parent (the container) in the contains-a relationship that we are querying.
Returns:
true iff the Node corresponding to the latter argument is an MetaParent (in this GraphPerspective) of the Node corresponding to the former argument.

metaParentsList

List metaParentsList(Node node)
Nodes and Edges comprise an additional directed graph through the contains-a relationship, in which a MetaParent Node contains each of its MetaChild Nodes and Edges. A Node may have any number of MetaParents. metaParentsList returns a new List of the MetaParents (in this GraphPerspective) of the given Node. If there are no MetaParents then the result will be the empty List - null is returned of the specified Node is not in this GraphPerspective.

Parameters:
node - the Node that is the child (the containee) in the contains-a relationship that we are querying.
Returns:
a new List of the Nodes in this GraphPerspective that contain the given Node.

nodeMetaParentsList

List nodeMetaParentsList(int node_index)
Nodes and Edges comprise an additional directed graph through the contains-a relationship, in which a MetaParent Node contains each of its MetaChild Nodes and Edges. A Node may have any number of MetaParents. nodeMetaParentsList returns a new List of the MetaParents (in this GraphPerspective) of the Node in this GraphPerspective with the given index. If there are no MetaParents then the result will be the empty List; null is returned if there is no Node in this GraphPerspective with the specified RootGraph index.

Parameters:
node_index - the index in the RootGraph of the Node that is the child (the containee) in the contains-a relationship that we are querying.
Returns:
a new List of the Nodes in this GraphPerspective that contain the Node with the given index.

getNodeMetaParentIndicesArray

int[] getNodeMetaParentIndicesArray(int node_index)
Nodes and Edges comprise an additional directed graph through the contains-a relationship, in which a MetaParent Node contains each of its MetaChild Nodes and Edges. A Node may have any number of MetaParents. getNodeMetaParentIndicesArray returns an array of the MetaParents (in this GraphPerspective) of the Node with the given index. If there are no MetaParents then the result will be the empty array; null is returned if there is no Node in this GraphPerspective with specified RootGraph index.

Parameters:
node_index - the index in the underlying RootGraph of the Node that is the child (the containee) in the contains-a relationship that we are querying.
Returns:
an array of the indices of the Nodes in this GraphPerspective that contain the Node with the given index.

isMetaChild

boolean isMetaChild(Node parent,
                    Node child)
Nodes and Edges comprise an additional directed graph through the contains-a relationship, in which a MetaParent Node contains each of its MetaChild Nodes and Edges. A Node may have any number of MetaChildren. isMetaChild returns true iff the second argument (child) is an MetaChild of the first argument (parent) and both Nodes are in this GraphPerspective.

Parameters:
parent - the Node that is the parent (the container) in the contains-a relationship that we are querying.
child - the Node that is the child (the containee) in the contains-a relationship that we are querying.
Returns:
true iff the latter argument is a MetaChild of the former argument in this GraphPerspective.

isNodeMetaChild

boolean isNodeMetaChild(int parent_index,
                        int child_node_index)
Nodes and Edges comprise an additional directed graph through the contains-a relationship, in which a MetaParent Node contains each of its MetaChild Nodes and Edges. A Node may have any number of MetaChildren. isMetaChild returns true iff the Node corresponding to the second argument (child_index) is a MetaChild of the Node corresponding to the first argument (parent_index) in this GraphPerspective.

Parameters:
parent_index - the index in the RootGraph of the Node that is the parent (the container) in the contains-a relationship that we are querying.
child_node_index - the index in the RootGraph of the Node that is the child (the containee) in the contains-a relationship that we are querying.
Returns:
true iff the Node corresponding to the latter argument is an MetaChild (in this GraphPerspective) of the Node corresponding to the former argument.

nodeMetaChildrenList

List nodeMetaChildrenList(Node node)
Nodes and Edges comprise an additional directed graph through the contains-a relationship, in which a MetaParent Node contains each of its MetaChild Nodes and Edges. A Node may have any number of MetaChildren. nodeMetaChildrenList returns a new List of the MetaChildren (in this GraphPerspective) of the given Node. If there are no MetaChildren then the result will be the empty List; null is returned if the specified Node does not exist in this GraphPerspective.

Parameters:
node - the Node that is the parent (the container) in the contains-a relationship that we are querying.
Returns:
a new List of the Nodes in this GraphPerspective that are contained by the given Node.

nodeMetaChildrenList

List nodeMetaChildrenList(int parent_index)
Nodes and Edges comprise an additional directed graph through the contains-a relationship, in which a MetaParent Node contains each of its MetaChild Nodes and Edges. A Node may have any number of MetaChildren. nodeMetaChildrenList returns a new List of the Node MetaChildren (in this GraphPerspective) of the Node in this GraphPerspective with the given index. If there are no MetaChildren then the result will be the empty List; null is returned if no Node at specified [RootGraph] index exists in this GraphPerspective.

Parameters:
parent_index - the index in the underlying RootGraph of the Node that is the parent (the container) in the contains-a relationship that we are querying.
Returns:
a new List of the Nodes in this GraphPerspective that are contained by the Node with the given index.

getNodeMetaChildIndicesArray

int[] getNodeMetaChildIndicesArray(int node_index)
Nodes and Edges comprise an additional directed graph through the contains-a relationship, in which a MetaParent Node contains each of its MetaChild Nodes and Edges. A Node may have any number of MetaChildren. getNodeMetaChildIndicesArray returns an array of the MetaChildren (in this GraphPerspective) of the Node with the given index. If there are no MetaChildren then the result will be the empty array; null is returned if this GraphPerspetive has no Node at specified RootGraph index.

Parameters:
node_index - the index in the RootGraph of the Node that is the parent (the containee) in the contains-a relationship that we are querying.
Returns:
an array of the indices of the Nodes in this GraphPerspective that are contained by the Node with the given index.

isMetaParent

boolean isMetaParent(Edge child,
                     Node parent)
Nodes and Edges comprise an additional directed graph through the contains-a relationship, in which a MetaParent Node contains each of its MetaChild Nodes and Edges. An Edge may have any number of MetaParents. isMetaParent returns true iff the second argument (parent) is an MetaParent of the first argument (child) and both elements are in this GraphPerspective.

Parameters:
child - the Edge that is the child (the containee) in the contains-a relationship that we are querying.
parent - the Node that is the parent (the container) in the contains-a relationship that we are querying.
Returns:
true iff the latter argument is a MetaParent of the former argument in this GraphPerspective.

isEdgeMetaParent

boolean isEdgeMetaParent(int child_edge_index,
                         int parent_index)
Nodes and Edges comprise an additional directed graph through the contains-a relationship, in which a MetaParent Node contains each of its MetaChild Nodes and Edges. An Edge may have any number of MetaParents. isMetaParent returns true iff the Node corresponding to the second argument (parent_index) is a MetaParent of the Edge corresponding to the first argument (child_index) and both Edge and Node are in this GraphPerspective.

Parameters:
child_edge_index - the index in the RootGraph of the Edge that is the child (the containee) in the contains-a relationship that we are querying.
parent_index - the index in the RootGraph of the Node that is the parent (the container) in the contains-a relationship that we are querying.
Returns:
true iff the Node corresponding to the latter argument is an MetaParent (in this GraphPerspective) of the Edge corresponding to the former argument.

metaParentsList

List metaParentsList(Edge edge)
Nodes and Edges comprise an additional directed graph through the contains-a relationship, in which a MetaParent Node contains each of its MetaChild Nodes and Edges. An Edge may have any number of MetaParents. metaParentsList returns a new List of the MetaParents (in this GraphPerspective) of the given Edge. If there are no MetaParents then the result will be the empty List; null is returned if specified Edge is not in this GraphPerspective.

Parameters:
edge - the Edge that is the child (the containee) in the contains-a relationship that we are querying.
Returns:
a new List of the Nodes in this GraphPerspective that contain the given Edge.

edgeMetaParentsList

List edgeMetaParentsList(int edge_index)
Nodes and Edges comprise an additional directed graph through the contains-a relationship, in which a MetaParent Node contains each of its MetaChild Nodes and Edges. An Edge may have any number of MetaParents. EdgeMetaParentsList returns a new List of the MetaParents (in this GraphPerspective) of the Edge in this GraphPerspective with the given index. If there are no MetaParents then the result will be the empty List; null is returned if no Edge at specified RootGraph index exists in this GraphPerspective.

Parameters:
edge_index - the index in the RootGraph of the Edge that is the child (the containee) in the contains-a relationship that we are querying.
Returns:
a new List of the Nodes in this GraphPerspective that contain the Edge with the given index.

getEdgeMetaParentIndicesArray

int[] getEdgeMetaParentIndicesArray(int edge_index)
Nodes and Edges comprise an additional directed graph through the contains-a relationship, in which a MetaParent Node contains each of its MetaChild Nodes and Edges. An Edge may have any number of MetaParents. getEdgeMetaParentIndicesArray returns an array of the MetaParents (in this GraphPerspective) of the Edge with the given index. If there are no MetaParents then the result will be the empty array; null is returned if no Edge at specified RootGraph index exists in this GraphPerspective.

Parameters:
edge_index - the index in the RootGraph of the Edge that is the child (the containee) in the contains-a relationship that we are querying.
Returns:
an array of the indices of the Nodes in this GraphPerspective that contain the Edge with the given index.

isMetaChild

boolean isMetaChild(Node parent,
                    Edge child)
Nodes and Edges comprise an additional directed graph through the contains-a relationship, in which a MetaParent Node contains each of its MetaChild Nodes and Edges. A Node may have any number of MetaChildren. isMetaChild returns true iff the second argument (child) is an MetaChild of the first argument (parent) and both Node and Edge are in this GraphPerspective.

Parameters:
parent - the Node that is the parent (the container) in the contains-a relationship that we are querying.
child - the Edge that is the child (the containee) in the contains-a relationship that we are querying.
Returns:
true iff the latter argument is a MetaChild of the former argument in this GraphPerspective.

isEdgeMetaChild

boolean isEdgeMetaChild(int parent_index,
                        int child_edge_index)
Nodes and Edges comprise an additional directed graph through the contains-a relationship, in which a MetaParent Node contains each of its MetaChild Nodes and Edges. A Node may have any number of MetaChildren. isMetaChild returns true iff the Edge corresponding to the second argument (child_index) is a MetaChild of the Node corresponding to the first argument (parent_index) in this GraphPerspective.

Parameters:
parent_index - the index in the RootGraph of the Node that is the parent (the container) in the contains-a relationship that we are querying.
child_edge_index - the index in the RootGraph of the Edge that is the child (the containee) in the contains-a relationship that we are querying.
Returns:
true iff the Edge corresponding to the latter argument is an MetaChild (in this GraphPerspective) of the Node corresponding to the former argument.

edgeMetaChildrenList

List edgeMetaChildrenList(Node node)
Nodes and Edges comprise an additional directed graph through the contains-a relationship, in which a MetaParent Node contains each of its MetaChild Nodes and Edges. A Node may have any number of MetaChildren. edgeMetaChildrenList returns a new List of the Edge MetaChildren (in this GraphPerspective) of the given Node. If there are no Edge MetaChildren then the result will be the empty List; returns null if specified Node is not in this GraphPerspective.

Parameters:
node - the Node that is the parent (the container) in the contains-a relationship that we are querying.
Returns:
a new List of the Edges in this GraphPerspective that are contained by the given Node.

edgeMetaChildrenList

List edgeMetaChildrenList(int node_index)
Nodes and Edges comprise an additional directed graph through the contains-a relationship, in which a MetaParent Node contains each of its MetaChild Nodes and Edges. A Node may have any number of MetaChildren. edgeMetaChildrenList returns a new List of the Edge MetaChildren (in this GraphPerspective) of the Node in this GraphPerspective with the given index. If there are no Edge MetaChildren then the result will be the empty List; null is returned if no Node exists in this GraphPerspective at specified RootGraph index.

Parameters:
node_index - the index in the RootGraph of the Node that is the parent (the container) in the contains-a relationship that we are querying.
Returns:
a new List of the Edges in this GraphPerspective that are contained by the Node with the given index.

getEdgeMetaChildIndicesArray

int[] getEdgeMetaChildIndicesArray(int node_index)
Nodes and Edges comprise an additional directed graph through the contains-a relationship, in which a MetaParent Node contains each of its MetaChild Nodes and Edges. A Node may have any number of MetaChildren. getEdgeMetaChildIndicesArray returns an array of the MetaChildren (in this GraphPerspective) of the Node with the given index. If there are no MetaChildren then the result will be the empty array; null is returned if no Node exists in this GraphPerspective at the specified RootGraph index.

Parameters:
node_index - the index in the RootGraph of the Node that is the parent (the containee) in the contains-a relationship that we are querying.
Returns:
an array of the indices of the Edges in this GraphPerspective that are contained by the Node with the given index.

getAdjacentEdgesList

List getAdjacentEdgesList(Node node,
                          boolean include_undirected_edges,
                          boolean incoming_edges,
                          boolean outgoing_edges)
Deprecated. Use getAdjacentEdgeIndicesArray(int, boolean, boolean, boolean) instead.

Returns all Adjacent Edges to the given node.

Parameters:
node - the node
include_undirected_edges - should we include undirected edges
incoming_edges - Include incoming edges
outgoing_edges - Include outgoing edges
Returns:
a List of giny.model.Edge objects; an empty List is returned if no adjacent Edges are found; null is returned if the specified Node does not exist in this GraphPerspective.
See Also:
getAdjacentEdgeIndicesArray(int, boolean, boolean, boolean)

getAdjacentEdgeIndicesArray

int[] getAdjacentEdgeIndicesArray(int node_index,
                                  boolean undirected_edges,
                                  boolean incoming_directed_edges,
                                  boolean outgoing_directed_edges)
Returns [RootGraph] indices of all Edges in this GraphPerspective adjacent to the Node at specified [RootGraph] index. See definitions of adjacency below.

Parameters:
node_index - the [RootGraph] index of the Node whose adjacent Edge information we're seeking.
undirected_edges - Edge indices of all adjacent undirected Edges are included in the return value of this method if this value is true, otherwise not a single index corresponding to an undirected Edge is returned; undirected Edge E is an adjacent undirected Edge to Node N [definition:] if and only if E's source is N or E's target is N.
incoming_directed_edges - Edge indices of all incoming directed Edges are included in the return value of this method if this value is true, otherwise not a single index corresponding to an incoming directed Edge is returned; directed Edge E is an incoming directed Edge to Node N [definition:] if and only if N is E's target.
outgoing_directed_edges - Edge indices of all outgoing directed Edges are included in the return value of this method if this value is true, otherwise not a single index corresponding to an outgoing directed Edge is returned; directed Edge E is an outgoing directed Edge from Node N [definition:] if and only if N is E's source.
Returns:
a set of Edge [RootGraph] indices corresponding to Edges matched by our query; if all three of the boolean query parameters are false, the empty array is returned; null is returned if and only if this GraphPerspective has no Node at the specified [RootGraph] index.

getConnectingEdges

List getConnectingEdges(List nodes)
This will return a List of giny.model.Edge objects that are the Edges between Nodes.


getConnectingEdgeIndicesArray

int[] getConnectingEdgeIndicesArray(int[] node_indices)
This will return an array of Edge indices that are the Edges between Nodes.


getConnectingNodeIndicesArray

int[] getConnectingNodeIndicesArray(int[] edge_indices)
Deprecated. Use getEdgeSourceIndex(int) and getEdgeTargetIndex(int) instead.

Return the Nodes that connect the given Edges in this GraphPerspective.

See Also:
getEdgeSourceIndex(int), getEdgeTargetIndex(int)

createGraphPerspective

GraphPerspective createGraphPerspective(int[] node_indices)
Create a new GraphPerspective given a list of Nodes. This method will automatically find all the interconnected Edges. Returns null if any of the specified Nodes are not in this GraphPerspective.


www.cytoscape.org