🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: fa.caml
Article #69

Ocamlgraph-using maximum cardinality search algorithm

#69
From: xuân bách
Date: Mon, 27 Aug 2012 06:54
27 lines
2035 bytes
Hi everyone,

I want to use the maximum cardinality search algorithm in ocamlgraph.
The algorithm is used to make a graph chordal. However, when I use the
algorithm to make my graph chordal, the graph is not changed.Here is 
a brief example:
open Format
open Graph
module Vt =
struct
	type t= int
	let compare= Pervasives.compare
	let hash= Hashtbl.hash
	let equal= (=)
end
module Ed =
struct
	type t= string
	let compare = Pervasives.compare
	let default = ""
end
module G = Imperative.Graph.ConcreteLabeled(Vt)(Ed)
module MakeChordal=Mcs_m.MaximalCardinalitySearch.I (G)
let _= MakeChordal.triangulate g in G.iter_edges_e (fun e-> print_endline ("new graph"^(string_of_int (G.E.src e))^(string_of_int (G.E.dst e)))) g;;

Anyone can help me to make the algorithm work in ocamlgraph?
Thank you very much.
Technical Details
Message-ID: <1dafe901-ee38-4123-89aa-f9205b8a3897@googlegroups.com>
Path: arc1-ca.pugleaf.net!a5ni15264pbv.0!nntp.google.com!news1.google.com!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Thread: ff861,b9709ca7817c28fa,start
X-Google-NewGroupId: yes
X-Google-Attributes: gidc0fe4b917e,domainid0,public,usenet
X-Google-Language: ENGLISH,ASCII-7-bit
Received: by 10.66.74.10 with SMTP id p10mr1480601pav.17.1346050461051;
        Sun, 26 Aug 2012 23:54:21 -0700 (PDT)
Path: arc1-ca.pugleaf.net!a5ni15264pbv.0!nntp.google.com!news1.google.com!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail
From: xuân bách <pig28789@gmail.com>
Newsgroups: fa.caml
Subject: Ocamlgraph-using maximum cardinality search algorithm
Date: Sun, 26 Aug 2012 23:54:20 -0700 (PDT)
Organization: http://groups.google.com
Lines: 27
Message-ID: <1dafe901-ee38-4123-89aa-f9205b8a3897@googlegroups.com>
NNTP-Posting-Host: 137.132.241.252
Mime-Version: 1.0
X-Trace: posting.google.com 1346050460 4457 127.0.0.1 (27 Aug 2012 06:54:20 GMT)
X-Complaints-To: groups-abuse@google.com
NNTP-Posting-Date: Mon, 27 Aug 2012 06:54:20 +0000 (UTC)
Complaints-To: groups-abuse@google.com
Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=137.132.241.252;
 posting-account=pTc_hQkAAABG6gZgK3Q-xg7krg5axTxn
User-Agent: G2/1.0
Content-Type: text/plain; charset=ISO-8859-1