Giter Club home page Giter Club logo

metis.jl's Introduction

Julia interface to the Metis graph-partitioning algorithms

Build Status Coverage Status Package Evaluator

Installation

Pkg.add("Metis")

On systems without a pre-packaged Metis library, adding this package will download, configure and install metis-5.1.0 in the directory

Pkg.dir("Metis", "deps")

Configuration requires Cmake version 2.8 or later. At present the build is only available on Linux/Unix. Contributions of build stanzas for Windows or OS X are welcome.

Functions

The names of the available Julia functions are those from the Metis API

  • nodeND(al) : recursively bisect the undirected graph implied by the adjacency list, al, and return the fill-reducing permutation that results
  • nodeND(m) : recursively bisect the undirected graph of the nonzero structure of the symmetric sparse matrix, m, and return the fill-reducing permutation
  • vertexSep(al): compute a vertex separator for the adjacency list, al, of an undirected graph
  • vertexSep(m): compute a vertex separator for the undirected graph of the nonzero structure of the symmetric sparse matrix, m
  • partGraphKway(al, nparts::Integer): partition a graph given as an adjacency list, al, into nparts
  • partGraphRecursive(al, nparts::Integer): partition a graph given as an adjacency list, al, into nparts

Examples

The function Metis.testgraph can be used to read one of the sample graphs available in the graphs directory of metis-5.1.0. These graphs correspond to 2D and 3D finite element meshes.

4elt : a smaller sample graph (15606 vertices, 45878 edges) copter2 : a medium size sample graph (55476 vertices, 352238 edges) mdual : a larger sample graph (258569 vertices, 513132 edges)

using Graphs, Metis
copter2 = Metis.testgraph("copter2");
perm, iperm = nodeND(copter2)
sizes, part = vertexSep(copter2)
objval, part = partGraphKway(copter2, 6)
counts = zeros(Int, 6);
for p in part counts[p] += 1 end
println(counts)

metis.jl's People

Contributors

dmbates avatar tkelman avatar

Watchers

Jack Poulson avatar James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.