RbMetis

FFI wrapper of METIS graph partitioning library

Requirement

Installation

Install from RubyGems:

$ gem install rbmetis

Or download source tree from releases, cd to tree top and run:

$ ruby setup.rb

Installation Option

  • Required METIS files:

    • C header: metis.h
    • Library: libmetis.so
  • option for extconf.rb

    --with-metis-dir=path
    --with-metis-include=path
    --with-metis-lib=path
    
  • How to pass option to extconf.rb

    $ gem install rbmetis -- --with-metis-dir=/opt/metis
    or
    $ ruby setup.rb -- --with-metis-dir=/opt/metis
    

Usage

Loading RbMeits:

require 'rbmetis'

Currently implemented APIs:

RbMetis.part_graph_recursive(xadj, adjncy, npart, opts = {})
RbMetis.part_graph_kway(xadj, adjncy, npart, opts = {})
RbMetis.default_options

See also RbMeits API document and METIS manual

Contributing

  1. Fork it ( https://github.com/[my-github-username]/rbmetis/fork )
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create a new Pull Request