igraph-help
[Top][All Lists]
Advanced

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

Re: [igraph] RuntimeWarning when reading GraphML


From: Gábor Csárdi
Subject: Re: [igraph] RuntimeWarning when reading GraphML
Date: Fri, 6 Feb 2009 20:22:49 +0100

On Fri, Feb 6, 2009 at 8:09 PM, Chris Wj <address@hidden> wrote:
> I've looked at a bunch of examples and the GraphML docs/tutorials. I have
> only seed the form <node id="n0"> to specify the id.
>
> Also, igraph outputs only:
> ...
> <node id="n0">
>     </node>
>     <node id="n1">
>     </node>
> ...
> when there are no other attributes specified. It comes out in the attributes
> list as soon as you add any attribute value.

I don't get that. Igraph outputs only "n0", "n1", etc. as <node
id="n0"> and outputs ALL vertex attributes (including "id") as <data
key= > etc.

> If it is used like this everywhere, I'd say the <node id="n0"> format should
> be the primary method of specifying node number.

Someone else (or it was you? :) said last week that we should ignore
these completely. :)

> My only other question is
> will a node ever have a value other than 'n#' as the id, and if so, will it
> not be read correctly by igraph?

Igraph writes only "n0", "n1", etc., but can read whatever is in the file.

At least this is the case for the current version, the next will
behave (probably) the way I described in my previous post.

G.

> -Chris
>
> On Fri, Feb 6, 2009 at 12:52 PM, Gábor Csárdi <address@hidden> wrote:
>>
>> So, as I see it, this would be almost exactly the current behavior,
>> except for renaming 'id' to "GraphML:id" when reading the graph. Oh,
>> and perhaps using "GraphML:id" as <node id="n3"> ids when writing out
>> the graph.
>>
>> G.
>>
>> On Fri, Feb 6, 2009 at 6:36 PM, Tamas Nepusz <address@hidden> wrote:
>> >> 1) Whether to read the <node id="n3"> type of ids from the graph, or
>> >> not. It they are not read, then we might lose some information. If
>> >> they are read, that could lead to confusion.
>> >
>> > I think we should read them anyway, but renaming the auto-generated "id"
>> > attribute to "GraphML:id" seems a good idea; chances are that some of
>> > our
>> > users will use the "id" attribute for other purposes, but it's unlikely
>> > with
>> > "GraphML:id".
>> >
>> >> 2) Whether to use the "id" (igraph) vertex attribute as <node id="n3">
>> >> type of ids, when we write out a GraphML file. Perhaps not.
>> >
>> > I agree; in general, nothing guarantees that the "id" attributes are
>> > unique
>> > and although igraph will happily save the graph as GraphML in this case,
>> > it
>> > won't be able to read it back.
>> >
>> > --
>> > Tamas
>> >
>> >
>> >
>> > _______________________________________________
>> > igraph-help mailing list
>> > address@hidden
>> > http://lists.nongnu.org/mailman/listinfo/igraph-help
>> >
>>
>>
>>
>> --
>> Gabor Csardi <address@hidden>     UNIL DGM
>>
>>
>> _______________________________________________
>> igraph-help mailing list
>> address@hidden
>> http://lists.nongnu.org/mailman/listinfo/igraph-help
>
>
> _______________________________________________
> 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]