Cytoscape 2.8.0 API

fing.model
Class FingRootGraphFactory

java.lang.Object
  extended by fing.model.FingRootGraphFactory

public final class FingRootGraphFactory
extends Object

This class defines static methods that provide new instances of giny.model.RootGraph objects.


Method Summary
static RootGraph instantiateRootGraph()
          Returns a new instance of giny.model.RootGraph.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

instantiateRootGraph

public static final RootGraph instantiateRootGraph()
Returns a new instance of giny.model.RootGraph. Obviously, a new RootGraph instance contains no nodes or edges.

A secret feature is that the returned object not only implements RootGraph - it also implements cytoscape.graph.dynamic.DynamicGraph. In other words, you can cast the return value to DynamicGraph. The relationship between RootGraph node/edge indices and DynamicGraph nodes and edges is they are complements of each other. Complement is '~' in Java.

In addition to the RootGraph secretly implementing DyanmicGraph, all of the GraphPerspective objects generated by the returned RootGraph secretly implement cytoscape.graph.fixed.FixedGraph. In other words, all GraphPerspective objects that are part of this RootGraph system can be cast to FixedGraph. The relationship between GraphPerspective node/edge indices (which are identical to RootGraph indices) and FixedGraph nodes and edges is they are complements of each other.

Below are time complexities of methods implemented:

RootGraph
methodtime complexity
createGraphPerspective(Node[], Edge[]) A GraphPerspective is created in O(N + E) time, where N is the length of the Node input array and E is the length of the Edge input array.
createGraphPerspective(int[], int[]) A GraphPerspective is created in O(N + E) time, where N is the length of the first input int array and E is the length of the second input int array.
ensureCapacity(int, int) This method returns in constant time.
getNodeCount() The total node count is calculated in constant time.
getEdgeCount() The total edge count is calculated in constant time.
nodesIterator() An Iterator is returned in constant time. Each successive element in the iteration is returned in constant time.
nodesList() A List of Node objects is returned in O(N) time, where N is the number of nodes in this RootGraph.
getNodeIndicesArray() An array of node indices is returned in O(N) time, where N is the number of nodes in this RootGraph.
edgesIterator() An iterator is returned in constant time. Each successive element in the iteration is returned in constant time.
edgesList() A List of Edge objects is returned in O(E) time, where E is the number of edges in this RootGraph.
getEdgeIndicesArray() An array of edge indices is returned in O(E) time, where E is the number of edges in this RootGraph.
removeNode(Node) Essentially, the operation of removing a node takes O(E) time where E is the number of edges touching the node being removed. However, this is no longer an absolute truth once many GraphPerspective objects are created from this RootGraph, or many meta-node relationships are created which involve the node being removed.
removeNode(int) Essentially, the operation of removing a node takes O(E) time where E is the number of edges touching the node being removed. However, this is no longer an absolute truth once many GraphPerspective objects are created from this RootGraph, or many meta-node relationships are created which involve the node being removed.
removeNodes(List) Essentially, the operation of removing a node takes O(E) time where E is the number of edges touching the node being removed. However, this is no longer an absolute truth once many GraphPerspective objects are created from this RootGraph, or many meta-node relationships are created which involve the node being removed. This method removes each node in succession.
removeNodes(int[]) Essentially, the operation of removing a node takes O(E) time where E is the number of edges touching the node being removed. However, this is no longer an absolute truth once many GraphPerspective objects are created from this RootGraph, or many meta-node relationships are created which involve the node being removed. This method removes each node in succession.
createNode() A node is created in constant time.
createNode(Node[], Edge[]) This meta-node operation takes O(N + E) time, where N is the length of the input Node array and E is the length of the input Edge array.
createNode(GraphPerspective) This meta-node operation takes O(N + E) time, where N is the number of nodes in specified GraphPerspective and E is the number of edges in specified GraphPerspective.
createNode(int[], int[]) This meta-node operation takes O(N + E) time, where N is the length of the first input int array and E is the length of the second input int array.
createNodes(int) A node is created in constant time. This method creates the specified number of nodes in succession.
removeEdge(Edge) Essentially, the operation of removing an edge takes constant time. However, this is no longer an absolute truth once many GraphPerspective objects are created from this RootGraph, or many meta-node relationships are created which involve the edge being removed.
removeEdge(int) Essentially, the operation of removing an edge takes constant time. However, this is no longer an absolute truth once many GraphPerspective objects are created from this RootGraph, or many meta-node relationships are created which involve the edge being removed.
removeEdges(List) Essentially, the operation of removing an edge takes constant time. However, this is no longer an absolute truth once many GraphPerspective objects are created from this RootGraph, or many meta-node relationships are created which involve the edge being removed. This removes each edge successively.
removeEdges(int[]) Essentially, the operation of removing an edge takes constant time. However, this is no longer an absolute truth once many GraphPerspective objects are created from this RootGraph, or many meta-node relationships are created which involve the edge being removed. This removes each edge successively.
createEdge(Node, Node) The operation of creating an edge is performed in constant time.
createEdge(Node, Node, boolean) The operation of creating an edge is performed in constant time.
createEdge(int, int) The operation of creating an edge is performed in constant time.
createEdge(int, int, boolean) The operation of creating an edge is performed in constant time.
createEdges(int[], int[], boolean) The operation of creating an edge is performed in constant time. This creates each edge in succession.
containsNode(Node) Determining whether or not a node is in a RootGraph takes constant time.
containsEdge(Edge) Determining whether or not an edge is in a RootGraph takes constant time.
neighborsList(Node) Node neighbors are calculated on O(E) time, where E is the number of edges touching the node whose neighbors we're calculating.
isNeighbor(Node, Node) The operation of determining whether or not two nodes are neighbors has time complexity O(min(E, F)), where E is the number of edges touching one node and F is the number of edges touching the other node (this is actually over-simplified and more pessimistic than it could be).
isNeighbor(int, int) The operation of determining whether or not two nodes are neighbors has time complexity O(min(E, F)), where E is the number of edges touching one node and F is the number of edges touching the other node (this is actually over-simplified and more pessimistic than it could be).
edgeExists(Node, Node) The operation of determining whether or not an edge exists starting at one [specified] node and ending at another [specified] node has time complexity O(min(E, F)), where E is the number of edges touching one node and F is the number of edges touching the other node (this is actually over-simplified and more pessimistic than it could be).
edgeExists(int, int) The operation of determining whether or not an edge exists starting at one [specified] node and ending at another [specified] node has time complexity O(min(E, F)), where E is the number of edges touching one node and F is the number of edges touching the other node (this is actually over-simplified and more pessimistic than it could be).
getEdgeCount(Node, Node, boolean) The operation of determining the number of existig edges starting at one [specified] node and ending at another [specified] node has time complexity O(min(E, F)), where E is the number of edges touching one node and F is the number of edges touching the other node.
getEdgeCount(int, int, boolean) The operation of determining the number of existing edges starting at one [specified] node and ending at another [specified] node has time complexity O(min(E, F)), where E is the number of edges touching one node and F is the number of edges touching the other node.
getAdjacentEdgeIndicesArray(int, boolean, boolean, boolean) The operation of getting edges adjacent to a node, fitting defined characteristics (specified by three boolean values) has time complexity O(E), where E is the total number of edges touching the node in question.
getConnectingEdgeIndicesArray(int[]) Computing a "connecting web" of edges from a list of input nodes has time complexity O(E), where E is the number of edges touching at least one node in the input set of nodes.
getConnectingNodeIndicesArray(int[]) This method has time complexity O(E), where E is the length of the input array.
getEdgeIndicesArray(int, int, boolean, boolean) The operation of finding all edges [meeting certain criteria, specified by two boolean input parameters] starting at one [specified] node and ending at another [specified] node has time complexity O(min(E, F)), where E is the total number of edges touching the start node and F is the total number of edges touching the end node.
edgesList(Node, Node) The operation of finding all edges starting at one [specified] node and ending at another [specified] node has time complexity O(min(E, F)), where E is the total number of edges touching the start node and F is the total number of edges touching the end node.
edgesList(int, int, boolean) The operation of finding all edges starting at one [specified] node and ending at another [specified] node has time complexity O(min(E, F)), where E is the total number of edges touching the start node and F is the total number of edges touching the end node.
getEdgeIndicesArray(int, int, boolean) The operation of finding all edges starting at one [specified] node and ending at another [specified] node has time complexity O(min(E, F)), where E is the total number of edges touching the start node and F is the total number of edges touching the end node.
getInDegree(int) All degree-computing methods are executed in constant time.
getInDegree(Node, boolean) All degree-computing methods are executed in constant time.
getInDegree(int, boolean) All degree-computing methods are executed in constant time.
getOutDegree(Node) All degree-computing methods are executed in constant time.
getOutDegree(int) All degree-computing methods are executed in constant time.
getOutDegree(Node, boolean) All degree-computing methods are executed in constant time.
getOutDegree(int, boolean) All degree-computing methods are executed in constant time.
getDegree(Node) All degree-computing methods are executed in constant time.
getDegree(int) All degree-computing methods are executed in constant time.
getIndex(Node) The index of a node is computed in constant time.
getNode(int) A node is retrieved in constant time.
getIndex(Edge) The index of an edge is computed in constant time.
getEdge(int) An edge is retrieved in constant time.
getEdgeSourceIndex(int) The source node of an edge is determined in constant time.
getEdgeTargetIndex(int) The target node of an edge is determined in constant time.
isEdgeDirected(int) The directedness of an edge is determined in constant time.
addMetaChild(Node, Node) Adding a node->node meta-relationship has time complexity O(min(P, C)), where P is the number of pre-existing children the soon-to-be parent has, and C is the number of pre-existing parents the soon-to-be child has.
addNodeMetaChild(int, int) Adding a node->node meta-relationship has time complexity O(min(P, C)), where P is the number of pre-existing children the soon-to-be parent has, and C is the number of pre-existing parents the soon-to-be child has.
removeNodeMetaChild(int, int) Grrr. This is complicated. In the simplest case (and in the case that will occur frequently), this is much like removing a node from a graph -- the time complexity is O(E), where E is the number of edges touching the child node.
isMetaParent(Node, Node)
isNodeMetaParent(int, int)
metaParentsList(Node)
nodeMetaParentsList(int)
getNodeMetaParentIndicesArray(int)
isMetaChild(Node, Node)
isNodeMetaChild(int, int) The operation of determining whether or not a given node is the meta-parent of another given node has time complexity O(min(P, C)), where P is the number of children (both nodes and edges) the potential parent has, and C is the number of parents the potential child has.
isNodeMetaChild(int, int, boolean) The recursive version of this method does a depth-first search of the meta-graph structure starting at the specified parent node; therefore, the time complexity of this recursive operation is O(M), where M is the size of set (including both nodes and edges) "reachable" by following meta-paths from parent to child, starting at specified parent node.
nodeMetaChildrenList(Node) The operation of getting all node children of a given parent node has time complexity O(C), where C is the number of children of the given parent node, including both nodes and edges.
nodeMetaChildrenList(int) The operation of getting all node children of a given parent node has time complexity O(C), where C is the number of children of the given parent node, including both nodes and edges.
getNodeMetaChildIndicesArray(int) The operation of getting all node children of a given parent node has time complexity O(C), where C is the number of children of the given parent node, including both nodes and edges.
getNodeMetaChildIndicesArray(int, boolean)
getChildlessMetaDescendants(int)
addMetaChild(Node, Edge)
addEdgeMetaChild(int, int)
removeEdgeMetaChild(int, int)
isMetaParent(Edge, Node)
isEdgeMetaParent(int, int)
metaParentsList(Edge)
edgeMetaParentsList(int)
getEdgeMetaParentIndicesArray(int)
isMetaChild(Node, Edge)
isEdgeMetaChild(int, int)
edgeMetaChildrenList(Node)
edgeMetaChildrenList(int)
getEdgeMetaChildIndicesArray(int)

GraphPerspective
methodtime complexity
addGraphPerspectiveChangeListener(GraphPerspectiveChangeListener)
removeGraphPerspectiveChangeListener(GraphPerspectiveChangeListener)
clone()
getRootGraph()
getNodeCount()
getEdgeCount()
nodesIterator()
nodesList()
getNodeIndicesArray()
edgesIterator()
edgesList()
getEdgeIndicesArray()
getEdgeIndicesArray(int, int, boolean, boolean)
hideNode(Node)
hideNode(int)
hideNodes(List)
hideNodes(int[])
restoreNode(Node)
restoreNode(int)
restoreNodes(List)
restoreNodes(List, boolean)
restoreNodes(int[], boolean)
restoreNodes(int[])
hideEdge(Edge)
hideEdge(int)
hideEdges(List)
hideEdges(int[])
restoreEdge(Edge)
restoreEdge(int)
restoreEdges(List)
restoreEdges(int[])
containsNode(Node)
containsNode(Node, boolean)
containsEdge(Edge)
containsEdge(Edge, boolean)
join(GraphPerspective)
createGraphPerspective(Node[], Edge[])
createGraphPerspective(int[], int[])
createGraphPerspective(Filter)
neighborsList(Node)
neighborsArray(int)
isNeighbor(Node, Node)
isNeighbor(int, int)
edgeExists(Node, Node)
edgeExists(int, int)
getEdgeCount(Node, Node, boolean)
getEdgeCount(int, int, boolean)
edgesList(Node, Node)
edgesList(int, int, boolean)
getEdgeIndicesArray(int, int, boolean)
getInDegree(Node)
getInDegree(int)
getInDegree(Node, boolean)
getInDegree(int, boolean)
getOutDegree(Node)
getOutDegree(int)
getOutDegree(Node, boolean)
getOutDegree(int, boolean)
getDegree(Node)
getDegree(int)
getIndex(Node)
getNodeIndex(int)
getRootGraphNodeIndex(int)
getNode(int)
getIndex(Edge)
getEdgeIndex(int)
getRootGraphEdgeIndex(int)
getEdge(int)
getEdgeSourceIndex(int)
getEdgeTargetIndex(int)
isEdgeDirected(int)
isMetaParent(Node, Node)
isNodeMetaParent(int, int)
metaParentsList(Node)
nodeMetaParentsList(int)
getNodeMetaParentIndicesArray(int)
isMetaChild(Node, Node)
isNodeMetaChild(int, int)
nodeMetaChildrenList(Node)
nodeMetaChildrenList(int)
getNodeMetaChildrenIndicesArray(int)
isMetaParent(Edge, Node)
isEdgeMetaParent(int, int)
metaParentsList(Edge)
edgeMetaParentsList(int)
getEdgeMetaParentIndicesArray(int)
isMetaChild(Node, Edge)
isEdgeMetaChild(int, int)
edgeMetaChildrenList(Node)
edgeMetaChildrenList(int)
getEdgeMetaChildIndicesArray(int)
getAdjacentEdgesList(Node, boolean, boolean, boolean)
getAdjacentEdgeIndicesArray(int, boolean, boolean, boolean)
getConnectingEdges(List)
getConnectingEdgeIndicesArray(int[])
getConnectingNodeIndicesArray(int[])
createGraphPerspective(int[])

Node
methodtime complexity
getGraphPerspective()
setGraphPerspective(GraphPerspective)
getRootGraph()
getRootGraphIndex()
getIdentifier()
setIdentifier(String)

Edge
methodtime complexity
getSource()
getTarget()
isDirected()
getRootGraph()
getRootGraphIndex()
getIdentifier()
setIdentifier(String)

GraphPerspectiveChangeEvent
methodtime complexity
getSource()
getType()
isNodesRestoredType()
isEdgesRestoredType()
isNodesHiddenType()
isEdgesHiddenType()
isNodesSelectedType()
isNodesUnselectedType()
isEdgesSelectedType()
isEdgesUnselectedType()
getRestoredNodes()
getRestoredEdges()
getHiddenNodes()
getHiddenEdges()
getSelectedNodes()
getUnselectedNodes()
getSelectedEdges()
getUnselectedEdges()
getRestoredNodeIndices()
getRestoredEdgeIndices()
getHiddenNodeIndices()
getHiddenEdgeIndices()
getSelectedNodeIndices()
getUnselectedNodeIndices()
getSelectedEdgeIndices()
getUnselectedEdgeIndices()


Cytoscape 2.8.0 API

Copyright 2010 Cytoscape Consortium. All rights reserved.