igraph-help
[Top][All Lists]
Advanced

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

[igraph] Re: Should igraph_adjlist have an argument IGRAPH_OUT or IGRAPH


From: Paul Johnson
Subject: [igraph] Re: Should igraph_adjlist have an argument IGRAPH_OUT or IGRAPH_IN?
Date: Sun, 3 May 2009 14:10:04 -0500

I'm very sorry, gmail sent that one before I was ready to.  Here's the
full question.

Thanks to your tip last week, I've got my Objective-C program running
 with igraph routines.

 I have noticed one wrinkle that I need to ask about.

 I've created an empty graph, taken from it the adjacency lists and
 filled them up with nodes. Because my model is organized so that each
 target agent keeps a list of others that can influence it, I create
 the adjacency list with

   igraph_adjlist_init(&graph, &myAList, IGRAPH_IN);

Everything seems fine, except when I convert that back to a graph, the
directions are all backwards.  I do it like this:

    igraph_adjlist(&graph, &myAList, 1, 0);

I didn't notice the arrows were backwards at first, but after some
checking I'm a bit stumped that igraph_adjlist is declared like this:

 int igraph_adjlist(igraph_t *graph, const igraph_adjlist_t *adjlist,
 igraph_bool_t directed, igraph_bool_t duplicate);

There's no option to specify IGRAPH_IN so it knows the direction of
the new graph.

See what I mean?


-- 
Paul E. Johnson
Professor, Political Science
1541 Lilac Lane, Room 504
University of Kansas




reply via email to

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