From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on yquem.inria.fr X-Spam-Level: ** X-Spam-Status: No, score=2.9 required=5.0 tests=AWL,DNS_FROM_RFC_POST, RCVD_IN_SORBS_WEB,SPF_NEUTRAL autolearn=disabled version=3.1.3 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 B5EB5BBAF for ; Thu, 12 Mar 2009 02:47:07 +0100 (CET) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AogBAPsFuEmBqgUYkWdsb2JhbACNB4gyAQEBAQkLCgcRBat1kFOEDQY X-IronPort-AV: E=Sophos;i="4.38,346,1233529200"; d="scan'208";a="25451471" Received: from mailhub24.dartmouth.edu ([129.170.5.24]) by mail1-smtp-roc.national.inria.fr with ESMTP/TLS/DHE-RSA-AES256-SHA; 12 Mar 2009 02:47:07 +0100 Received: from [192.168.1.101] ([64.30.3.122]) (authenticated bits=0) by mailhub24.dartmouth.edu (8.13.5/DND2.0/8.13.5) with ESMTP id n2C1kxF1003825 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=NO) for ; Wed, 11 Mar 2009 21:46:59 -0400 Message-Id: <5F21734C-C88E-4401-8EB4-811681A42E67@gmail.com> From: Alexy Khrabrov To: OCaml Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Mime-Version: 1.0 (Apple Message framework v930.3) Subject: changing labels on ocamlgraph edges Date: Wed, 11 Mar 2009 21:47:00 -0400 X-Mailer: Apple Mail (2.930.3) X-Dartmouth.EDU-MailScanner-Information: Please contact the ISP for more information X-MailScanner-ID: n2C1kxF1003825 X-MailScanner: Found to be clean by mailhub21.dartmouth.edu X-MailScanner-From: deliverable@gmail.com X-Spam: no; 0.00; cheers:01 edges:01 imperative:01 labels:03 increment:05 src:94 src:94 label:07 label:07 looks:08 complicated:09 graphs:11 create:12 create:12 add:14 It looks like the only way to change a label on an edge e -- say increment it -- is to read off the old one with G.E.label, then remember the src and dst with G.E.src/dst, then G.remove_edge_e g e, create a new edge e' with G.V.create src (label+1) dst, and G.add_adge_e g e'. Is this supposed to be so complicated even for the imperative graphs? Cheers, Alexy