función igraph vs.select() para la versión de la biblioteca c

In the python library of igraph one can search for the ID of a node based on its attributes

seqIDs = myGraph.vs.select(attribute1, attribute2)

Is there a function like this for the c library version of igraph ?

preguntado el 06 de septiembre de 12 a las 17:09

1 Respuestas

No, there isn't, and it's unlikely that there will be any in the near future - the costs (in development time) far outweigh the benefits, especially since most of the igraph users use one of the higher level interfaces and not interact with the C core directly.

Aviso legal: I am one of the authors of igraph.

Respondido el 06 de Septiembre de 12 a las 22:09

So do you have any suggestions how could I implement such a feature ? I am thinking of implementing a separate Vector that is ordered by attribute1 (index) which stores Structs with the id of the node and the 2nd attribute. Does it make sense ? - Stefan Pantea

Puedes empezar a leer aquí: igraph.sourceforge.net/doc/html/igraph-Attributes.html It is not very difficult, but you need to implement the functions in the igraph attribute handling table. You can look at the cattributes.c file to see how the current simple C attribute handler is implemented (bazaar.launchpad.net/~igraph/igraph/0.6-main/view/head:/src/…). - Gabor Csardi

No es la respuesta que estás buscando? Examinar otras preguntas etiquetadas or haz tu propia pregunta.