Permalink
Browse files

Initial set of important codes

  • Loading branch information...
0 parents commit af7a91be2ba22ad909cb6ad4bd9024f7e8e3d464 David Gleich committed Sep 29, 2010
Showing with 566 additions and 0 deletions.
  1. +14 −0 README.md
  2. +38 −0 metisdice.m
  3. +404 −0 metismex.c
  4. +33 −0 metispart.m
  5. +77 −0 simple_test.c
  6. BIN tapir.mat
@@ -0,0 +1,14 @@
+metismex
+========
+
+Based on the [metismex.c](http://www.cs.ubc.ca/~rbridson/download/metismex.c)
+code by [Robert Bridson](http://www.cs.ubc.ca/~rbridson/) and
+using pieces of the [meshpart toolkit](http://www.cerfacs.fr/algor/Softs/MESHPART/)
+by [John Gilbert](http://www.cs.ucsb.edu/~gilbert/) and
+[Shanghua Teng](http://www-bcf.usc.edu/~shanghua/).
+
+This code has been modified to work with the latest version of Metis.
+All functions except for one (NodeBisect) currently work.
+
+Compiling and usage insructions coming soon.
+
@@ -0,0 +1,38 @@
+function map = metisdice(A,a,b);
+% METISDICE : Metis multiway partition.
+%
+% map = metisdice(A,nparts)
+% A is the adjacency matrix of a graph.
+% This uses Metis to divide A into nparts pieces of approximately
+% equal size, with relatively small connections.
+%
+% gsdice(A,nparts,xy) or
+% gsdice(A,xy,nparts): Draw a picture of the result, as well.
+%
+% See also METISMEX (which accepts all the Metis options),
+% GEODICE, GSDICE, SPECDICE, METISPART, METISND.
+%
+% John Gilbert 3 Jul 01
+% Copyright (c) 1990-2001 by Xerox Corporation. All rights reserved.
+% HELP COPYRIGHT for complete copyright and licensing notice.
+
+% Sort out the input arguments.
+picture = (nargin >= 3);
+if picture
+ if length(a) == 1
+ nparts = a;
+ xy = b;
+ else
+ nparts = b;
+ xy = a;
+ end;
+else
+ nparts = a;
+end;
+
+map = metismex('PartGraphKway',A,nparts);
+
+if picture
+ gplotmap(A,xy,map);
+ title('Metis Multiway Partition');
+end;
Oops, something went wrong.

0 comments on commit af7a91b

Please sign in to comment.