How to get all edges of a node

14 views
Skip to first unread message

Franktwis

unread,
Dec 2, 2009, 9:42:27 AM12/2/09
to cytoscape-discuss
How can I do this? I've added an attribute for every edge that
indicates its name and I would to retrieve the list of all edge for
every node.
Thanks
Franktwis

Franktwis

unread,
Dec 3, 2009, 5:03:54 AM12/3/09
to cytoscape-discuss
I find the answer to my question. Methods to do this is part of the
RootGraph class. See it at the page:

http://chianti.ucsd.edu/Cyto-2_6_1/javadoc/index.html?cytoscape/package-summary.html

and use functions like:
int[] getAdjacentEdgeIndicesArray(int node_index, boolean
undirected_edges, boolean incoming_directed_edges, boolean
outgoing_directed_edges)
Returns indices of all edges adjacent to the node at
specified index.
int[] getChildlessMetaDescendants(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[] getConnectingEdgeIndicesArray(int[] node_indices)
This will return an array of edge indices that are the edges
between nodes.

cheers
Franktwis

Franktwis

unread,
Dec 5, 2009, 7:50:34 AM12/5/09
to cytoscape-discuss
Here's an example

int[] adjEdges=node.getRootGraph().getAdjacentEdgeIndicesArray
(node0.getRootGraphIndex(), true, false, false);

On 3 Dic, 11:03, Franktwis <francescomusacc...@gmail.com> wrote:
> I find the answer to my question. Methods to do this is part of the
> RootGraph class. See it at the page:
>
> http://chianti.ucsd.edu/Cyto-2_6_1/javadoc/index.html?cytoscape/packa...
Reply all
Reply to author
Forward
0 new messages