From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from mail1-relais-roc.national.inria.fr (mail1-relais-roc.national.inria.fr [192.134.164.82]) by yquem.inria.fr (Postfix) with ESMTP id B4E26BBAF for ; Tue, 12 Oct 2010 11:42:46 +0200 (CEST) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Ah8CAArKs0zRVdg2kGdsb2JhbACTVoVnAYgMCBUBAQEBCQkMBxEDH6FPiUqCGIZ9LohWAQEDBYVDBIpB X-IronPort-AV: E=Sophos;i="4.57,319,1283724000"; d="scan'208";a="80675254" Received: from mail-qw0-f54.google.com ([209.85.216.54]) by mail1-smtp-roc.national.inria.fr with ESMTP; 12 Oct 2010 11:42:46 +0200 Received: by qwe4 with SMTP id 4so2506359qwe.27 for ; Tue, 12 Oct 2010 02:42:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:in-reply-to :references:date:message-id:subject:from:to:cc:content-type; bh=6J1RjlRyUqQAsuctqCrx87VVPXWh8tswBxNoEFMqQzg=; b=W4BiAkM6X8juI7/Tt0ijQExTf+cNLVVVZnqI46rVa+Kh0QRdCSAw5mkHr4MxMVhmoA s9Ruxpl8mCtUOfOjz6XK41ofRo5KIrdjg8KHGdhazVzbP7mPccEEabEKqsWFC4k8nNVi 1z2FR5K3O1E7fJvU4uiVkfQGIMZdtyOGmkCzw= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; b=uDTx/EfaHPbfRf8TroePmP3BhtKtjS9XLkq1waiTMUGsK0X5YOoBgUP70chPpaeoJk KDVv64/RaC8OmfHfWulVgqL0wEhD59exiFFMRygqV5VZXhlZhRRZ41aFqjfU7Z8OfUxd 3cKJbKs9p3Cwt9yYYQ5ymW/e87FaLVa1MuynY= MIME-Version: 1.0 Received: by 10.224.53.200 with SMTP id n8mr2117071qag.331.1286876565842; Tue, 12 Oct 2010 02:42:45 -0700 (PDT) Received: by 10.229.25.209 with HTTP; Tue, 12 Oct 2010 02:42:45 -0700 (PDT) In-Reply-To: <1286875570.30240.30.camel@bohrium.pps.jussieu.fr> References: <1286545686.19478.40.camel@bohrium.pps.jussieu.fr> <1286875570.30240.30.camel@bohrium.pps.jussieu.fr> Date: Tue, 12 Oct 2010 11:42:45 +0200 Message-ID: Subject: Re: [Caml-list] Marshalling question From: Julien Signoles To: Mathias Kende Cc: Alexey Rodriguez , caml users Content-Type: multipart/alternative; boundary=0015175d09ca93ac0a0492684c95 X-Spam: no; 0.00; marshalling:01 signoles:01 signoles:01 nodes:01 nodes:01 node:01 node:01 lri:01 lri:01 mathias:98 mathias:98 equality:01 equality:01 faq:01 faq:01 --0015175d09ca93ac0a0492684c95 Content-Type: text/plain; charset=ISO-8859-1 2010/10/12 Mathias Kende > To represent "abstract" graphs (those were the > equality for the nodes type is not used to check if two nodes of a graph > are the same), the library uses an internal counter. This counter must > be serialised along with the graphs and then it must be updated > correctly when graphs are unserialised to avoid creating a node with the > same identifier than o node in the unserialised graphs. > > This is explained in the FAQ : > http://ocamlgraph.lri.fr/FAQ > I didn't remember myself that the OcamlGraph FAQ contains a section about that ;-). But I bielieve that the FAQ got it wrong in case multiple graphs are > unserialised, or nodes are created before the unserialisation of other > nodes. In these situation using concrete graphs, which do not suffer > from this problem, is certainly easier (as advertised by the manual). > And I manually add identifiers to the nodes if I need many nodes with > the same label. > Of course you're right (see also my own answer to Alexey) : I will update the OcamlGraph FAQ accordingly. Thanks, Julien --0015175d09ca93ac0a0492684c95 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable

2010/10/12 Mathias Kende <mathias@kende.fr><= br>
To represent "abstract" graphs (those were the
equality for the nodes type is not used to check if two nodes of a graph are the same), the library uses an internal counter. This counter must
be serialised along with the graphs and then it must be updated
correctly when graphs are unserialised to avoid creating a node with the same identifier than o node in the unserialised graphs.

This is explained in the FAQ :
http://ocamlgrap= h.lri.fr/FAQ

I didn't remember myself that= the OcamlGraph FAQ contains a section about that ;-).

But I bielieve that the FAQ got it wrong in case multiple graphs are
unserialised, or nodes are created before the unserialisation of other
nodes. In these situation using concrete graphs, which do not suffer
from this problem, is certainly easier (as advertised by the manual).
And I manually add identifiers to the nodes if I need many nodes with
the same label.

Of course you're right (see al= so my own answer to Alexey) : I will update the OcamlGraph FAQ accordingly.=

Thanks,
Julien

--0015175d09ca93ac0a0492684c95--