igraph-help
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [iGraph] How to get a edge selector to select edges between any two


From: Gábor Csárdi
Subject: Re: [iGraph] How to get a edge selector to select edges between any two vertices of a graph ?
Date: Fri, 12 Jun 2009 11:04:08 +0200

Hi,

there is a currently undocumented function to do (almost) this:

int igraph_get_eids(const igraph_t *graph, igraph_vector_t *eids,
                    const igraph_vector_t *pairs, igraph_bool_t directed);

You can supply more pairs in the 'pairs' vector, and all edges are
returned in 'eids'.
If you just want a single edge between the two nodes, then check out
http://igraph.sourceforge.net/doc/html/ch04s02s02.html#igraph_get_eid

Best,
Gabor

On Fri, Jun 12, 2009 at 10:57 AM, ketan bhardwaj<address@hidden> wrote:
> Hello all,
>
> i am a newbee ... but the question is clear in the subject itself !
> The function igraph_es_fromto() has not been implemented as per the
> document.
>
> As far as i can think, it should be done in this way :
>
> if (to == from)
> break;
>
> edge_selector_temp1 = all edges going out from "from"
>  edge_selector_temp2 = all edges coming into the "to"
>
>      for each edge in edge_selector_temp1 get destination vertex
> "from_temp"
>                     get all vertices coming in to the "to" ... to_temp
>     if(to_temp == from temp)
>          add edge in to the returning edge selection
>    else
>  continue
>
> Please provide your feed back !
> Thanks in advance.
>
> regards
> Ketan Bhardwaj
>
> --
> To get a comprehensive view of my work Please visit
> http://ketanbj.googlepages.com
>
> _______________________________________________
> igraph-help mailing list
> address@hidden
> http://lists.nongnu.org/mailman/listinfo/igraph-help
>
>



-- 
Gabor Csardi <address@hidden>     UNIL DGM




reply via email to

[Prev in Thread] Current Thread [Next in Thread]