- // getNodeCount, getEdgeCount public int getNodeCount(); public int getEdgeCount(); // getNodeList, getEdgeList
public Iterator<Node> nodesIterator(); public List<Node> nodesList(); public int[] getNodeIndicesArray(); public Iterator<Edge> edgesIterator(); public List<Edge> edgesList(); public int[] getEdgeIndicesArray(); public int[] getEdgeIndicesArray( // contains public boolean containsNode( Node node ); public boolean containsNode( Node node, boolean recurse ); public boolean containsEdge( Edge edge ); public boolean containsEdge( Edge edge, boolean recurse ); public boolean edgeExists( Node from, Node to ); public boolean edgeExists( int from_node_index, int to_node_index ); // getNeighborList, getAdjacentEdgeList, getConnectingEdgeList
public List<Node> neighborsList( Node node ); public int[] neighborsArray( int node_index ); public List<Edge> edgesList( Node from, Node to ); public List<Edge> edgesList(int from_node_index, public int[] getEdgeIndicesArray(int from_node_index, public List<Edge> getAdjacentEdgesList( Node node, boolean include_undirected_edges, boolean incoming_edges, boolean outgoing_edges ); public int[] getAdjacentEdgeIndicesArray( int node_index, public List<Edge> getConnectingEdges( List<Node> nodes ); public int[] getConnectingEdgeIndicesArray( int[] node_indices ); // getIndex, getNode, getEdge public int getIndex( Node node ); public int getRootGraphNodeIndex( int root_graph_node_index ); public Node getNode( int index ); public int getIndex( Edge edge ); public int getRootGraphEdgeIndex( int root_graph_edge_index ); public Edge getEdge( int index );
// part of CyEdge public boolean isEdgeDirected( int edge_index ); // ?? we're talking about a slightly different model. // This is a result of root graph thinking. The Node is first created in the // root graph, then it's added to a perspective public int addNode(int cytoscape_node); public Node addNode(Node cytoscape_node); public int addEdge(int cytoscape_edge); public Edge addEdge(Edge cytoscape_edge); // remove* public boolean removeEdge(int edge_index, boolean set_remove); public boolean removeNode(int node_index, boolean set_remove); // subsumed by getNeighborList - possibly put in a util class public boolean isNeighbor( Node a_node, Node another_node ); public boolean isNeighbor( int a_node_index, int another_node_index ); // get/set id public String getIdentifier(); // should go away - identifier should not be mutable public String setIdentifier(String new_id); // subsumed by getAdjacentEdgeList - possibly put in a util class public int getEdgeCount(Node from, public int getEdgeCount( int from_node_index, // subsumed by getAdjacentEdgeList - possibly put in a util class public int getInDegree( Node node ); public int getInDegree( int node_index ); public int getInDegree( Node node, boolean count_undirected_edges ); public int getInDegree( int node_index, boolean count_undirected_edges ); public int getOutDegree( Node node ); public int getOutDegree( int node_index ); public int getOutDegree( Node node, boolean count_undirected_edges ); public int getOutDegree( int node_index, boolean count_undirected_edges ); public int getDegree( Node node ); public int getDegree( int node_index ); // subsumed by getEdge().getSourceNode().getIndex() public int getEdgeSourceIndex( int edge_index ); public int getEdgeTargetIndex( int edge_index ); // should be in a factory
public GraphPerspective createGraphPerspective( Node[] nodes, Edge[] edges); public GraphPerspective createGraphPerspective( Collection<Node> nodes, Collection<Edge> edges); public GraphPerspective createGraphPerspective(int[] node_indices, public GraphPerspective createGraphPerspective( int[] node_indices ); // I think title should be an attribute public String getTitle(); public void setTitle(String new_id); // ??? selection support public void selectAllNodes(); public void selectAllEdges(); public void unselectAllNodes(); public void unselectAllEdges();
public void setSelectedNodeState(Collection<Node> nodes, boolean selected_state); public void setSelectedNodeState(Node node, boolean selected_state); public void setSelectedEdgeState(Collection<Edge> edges, boolean selected_state); public void setSelectedEdgeState(Edge edge, boolean selected_state); public boolean isSelected(Node node); public boolean isSelected(Edge edge); public Set<Node> getSelectedNodes(); public Set<Edge> getSelectedEdges(); public void addSelectEventListener(SelectEventListener listener); public void removeSelectEventListener(SelectEventListener listener); public SelectFilter getSelectFilter(); // ??? public Node hideNode( Node node ); public int hideNode( int node_index );
public List<Node> hideNodes( List<Node> nodes ); public int[] hideNodes( int[] node_indices ); public Node restoreNode( Node node ); public int restoreNode( int node_index ); public List<Node> restoreNodes( List<Node> nodes ); public List<Node> restoreNodes(List<Node> nodes, boolean restore_incident_edges); public int [] restoreNodes(int [] node_indices, boolean restore_incident_edges); public int[] restoreNodes( int[] node_indices ); public Edge hideEdge( Edge edge ); public int hideEdge( int edge_index ); public List<Edge> hideEdges( List<Edge> edges ); public int[] hideEdges( int[] edge_indices ); public Edge restoreEdge( Edge edge ); public int restoreEdge( int edge_index ); public List<Edge> restoreEdges( List<Edge> edges ); public int[] restoreEdges( int[] edge_indices ); // ??? public void addGraphPerspectiveChangeListener( GraphPerspectiveChangeListener listener ); public void removeGraphPerspectiveChangeListener( GraphPerspectiveChangeListener listener ); // ??? public Object clone();
public RootGraph getRootGraph(); // ???
public GraphPerspective join( GraphPerspective peer ); public void appendNetwork(GraphPerspective network);