Skip to content

Commit

Permalink
Merge pull request #29 from fredrikekre/fe/replace
Browse files Browse the repository at this point in the history
Upgrade Metis
  • Loading branch information
fredrikekre committed Apr 11, 2019
2 parents 9609060 + b54c4bf commit 6695b7a
Show file tree
Hide file tree
Showing 20 changed files with 599 additions and 330,126 deletions.
41 changes: 41 additions & 0 deletions .appveyor.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
environment:
matrix:
- julia_version: 1.0
- julia_version: 1.1
- julia_version: nightly

platform:
- x86 # 32-bit
- x64 # 64-bit

matrix:
allow_failures:
- julia_version: nightly

branches:
only:
- master
- /release-.*/

notifications:
- provider: Email
on_build_success: false
on_build_failure: false
on_build_status_changed: false

install:
- ps: iex ((new-object net.webclient).DownloadString("https://raw.githubusercontent.com/JuliaCI/Appveyor.jl/version-1/bin/install.ps1"))

build_script:
- echo "%JL_BUILD_SCRIPT%"
- C:\julia\bin\julia -e "%JL_BUILD_SCRIPT%"

test_script:
- echo "%JL_TEST_SCRIPT%"
- C:\julia\bin\julia -e "%JL_TEST_SCRIPT%"

# # Uncomment to support code coverage upload. Should only be enabled for packages
# # which would have coverage gaps without running on Windows
# on_success:
# - echo "%JL_CODECOV_SCRIPT%"
# - C:\julia\bin\julia -e "%JL_CODECOV_SCRIPT%"
1 change: 1 addition & 0 deletions .codecov.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
comment: false
8 changes: 8 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
*.jl.cov
*.jl.*.cov
*.jl.mem
deps/usr
deps/deps.jl
deps/build.log
/Manifest.toml
/test/coverage/Manifest.toml
41 changes: 23 additions & 18 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,21 +1,26 @@
language: cpp
compiler:
- clang
## Documentation: http://docs.travis-ci.com/user/languages/julia/
language: julia

os:
- linux
- osx

julia:
- 1.0
- 1.1
- nightly

matrix:
allow_failures:
- julia: nightly

notifications:
email: false
env:
matrix:
- JULIAVERSION="juliareleases"
- JULIAVERSION="julianightlies"
before_install:
- sudo add-apt-repository ppa:staticfloat/julia-deps -y
- sudo add-apt-repository ppa:staticfloat/${JULIAVERSION} -y
- sudo apt-get update -qq -y
- sudo apt-get install libpcre3-dev julia -y
- if [[ -a .git/shallow ]]; then git fetch --unshallow; fi
script:
- julia -e 'versioninfo(); Pkg.init(); Pkg.add("BinDeps"); Pkg.add("Graphs"); Pkg.clone(pwd()); Pkg.build("Metis")'
- julia -e 'using Metis; @assert isdefined(:Metis); @assert typeof(Metis) === Module'
- julia --code-coverage ./test/runtests.jl

git:
depth: 99999999

after_success:
- julia -e 'cd(Pkg.dir("Metis")); Pkg.add("Coverage"); using Coverage; Coveralls.submit(Coveralls.process_folder())'
# push coverage results to Codecov
- julia --project=test/coverage -e 'using Pkg; Pkg.instantiate();
using Coverage; Codecov.submit(Codecov.process_folder())'
48 changes: 43 additions & 5 deletions LICENSE.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,30 @@
The Metis package is licensed under the MIT License:
The Metis.jl package is licensed under the MIT "Expat" License:

> Copyright (c) 2013-2015: Douglas Bates and Jack Poulson
> Copyright (c) 2018: Fredrik Ekre.
>
> Permission is hereby granted, free of charge, to any person obtaining a copy
> of this software and associated documentation files (the "Software"), to deal
> in the Software without restriction, including without limitation the rights
> to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
> copies of the Software, and to permit persons to whom the Software is
> furnished to do so, subject to the following conditions:
>
> The above copyright notice and this permission notice shall be included in all
> copies or substantial portions of the Software.
>
> THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
> IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
> FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
> AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
> LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
> OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
> SOFTWARE.
>
Metis.jl is a rewrite of a previous Julia wrapper (also named Metis.jl)
of the Metis library with the following MIT license:

> Copyright (c) 2013-2015: Douglas Bates, Jack Poulson and other authors
>
> Permission is hereby granted, free of charge, to any person obtaining
> a copy of this software and associated documentation files (the
Expand All @@ -9,10 +33,10 @@ The Metis package is licensed under the MIT License:
> distribute, sublicense, and/or sell copies of the Software, and to
> permit persons to whom the Software is furnished to do so, subject to
> the following conditions:
>
>
> The above copyright notice and this permission notice shall be
> included in all copies or substantial portions of the Software.
>
>
> THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
> EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
> MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
Expand All @@ -21,4 +45,18 @@ The Metis package is licensed under the MIT License:
> OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
> WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
The Metis library is licensed under the Apache license, version 2
The Metis C library is licensed with the Apache Licence:

> Copyright 1995-2013, Regents of the University of Minnesota
>
> Licensed under the Apache License, Version 2.0 (the "License");
> you may not use this file except in compliance with the License.
> You may obtain a copy of the License at
>
> http://www.apache.org/licenses/LICENSE-2.0
>
> Unless required by applicable law or agreed to in writing, software
> distributed under the License is distributed on an "AS IS" BASIS,
> WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
> implied. See the License for the specific language governing
> permissions and limitations under the License.
17 changes: 17 additions & 0 deletions Project.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name = "Metis"
uuid = "2679e427-3c69-5b7f-982b-ece356f1e94b"
version = "0.1.0"

[deps]
BinaryProvider = "b99e7846-7c00-51b0-8f62-c81ae34c0232"
Libdl = "8f399da3-3557-5675-b5ff-fb832c97cbdb"
LightGraphs = "093fc24a-ae57-5d10-9952-331d41423f4d"
LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"
SparseArrays = "2f01184e-e22b-5df5-ae63-d93ebab69eaf"

[extras]
Random = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c"
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"

[targets]
test = ["Random", "Test"]
116 changes: 74 additions & 42 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,56 +1,88 @@
# [Julia](http://julialang.org) interface to the Metis graph-partitioning algorithms
# Metis

[![Build Status](https://travis-ci.org/JuliaSparse/Metis.jl.svg?branch=master)](https://travis-ci.org/JuliaSparse/Metis.jl)
[![Coverage Status](https://coveralls.io/repos/dmbates/Metis.jl/badge.png?branch=master)](https://coveralls.io/r/dmbates/Metis.jl?branch=master)
[![Metis](http://pkg.julialang.org/badges/Metis_release.svg)](http://pkg.julialang.org/?pkg=Metis&ver=release)
| **Build Status** |
|:----------------------------------------------------------------------------------------------- |
| [![][travis-img]][travis-url] [![][appveyor-img]][appveyor-url] [![][codecov-img]][codecov-url] |

## Installation
*Metis.jl* is a Julia wrapper to the [Metis library][metis-url] which is a
library for partitioning unstructured graphs, partitioning meshes, and
computing fill-reducing orderings of sparse matrices.

```julia
Pkg.add("Metis")
```
## Graph partitioning
`Metis.partition` calculates graph partitions. As an example, here we partition
a small graph into two, three and four parts, and visualize the result:

| ![][partition2-url] | ![][partition3-url] | ![][partition4-url] |
|:----------------------- |:----------------------- |:----------------------- |
| `Metis.partition(g, 2)` | `Metis.partition(g, 3)` | `Metis.partition(g, 4)` |

`Metis.partition` calls `METIS_PartGraphKway` or `METIS_PartGraphRecursive` from the Metis
C API, depending on the optional keyword argument `alg`:
- `alg = :KWAY`: multilevel k-way partitioning (`METIS_PartGraphKway`).
- `alg = :RECURSIVE`: multilevel recursive bisection (`METIS_PartGraphRecursive`).

## Vertex separator
`Metis.separator` calculates a [vertex separator](https://en.wikipedia.org/wiki/Vertex_separator)
of a graph. `Metis.separator` calls `METIS_ComputeVertexSeparator` from the Metis C API.
As an example, here we calculate a vertex separator (green) of a small graph:

| ![][separator-url] |
|:-------------------- |
| `Metis.separator(g)` |

Adding the package will install the Metis library itself on OS-X, Windows and Linux systems using `apt` or `yum`.
## Fill reducing permutation
`Metis.permutation` calculates the fill reducing permutation
for a sparse matrices. `Metis.permutation` calls `METIS_NodeND` from the Metis
C API. As an example, we calculate the fill reducing permutation
for a sparse matrix `S` originating from a typical (small) FEM problem, and
visualize the sparsity pattern for the original matrix and the permuted matrix:

On other operating systems this package will download, configure and install metis-5.1.0 in the directory
```julia
Pkg.dir("Metis", "deps")
perm, iperm = Metis.permutation(S)
```
Configuration requires Cmake version 2.8 or later.

## Functions
| <pre>⠛⣤⢠⠄⠀⣌⠃⢠⠀⠐⠈⠀⠀⠀⠀⠉⠃⠀⠀⠀⠀⠀⠀⠀⠀⠘⠀⠂⠔⠀<br>⠀⠖⠻⣦⡅⠘⡁⠀⠀⠀⠀⠐⠀⠁⠀⢂⠀⠀⠠⠀⠀⠀⠁⢀⠀⢀⠀⠀⠄⢣<br>⡀⢤⣁⠉⠛⣤⡡⢀⠀⠂⠂⠀⠂⠃⢰⣀⠀⠔⠀⠀⠀⠀⠀⠀⠀⠀⠀⠄⠄⠀<br>⠉⣀⠁⠈⠁⢊⠱⢆⡰⠀⠈⠀⠀⠀⠀⢈⠉⡂⠀⠐⢀⡞⠐⠂⠀⠄⡀⠠⠂⠀<br>⢀⠀⠀⠀⠠⠀⠐⠊⠛⣤⡔⠘⠰⠒⠠⠀⡈⠀⠀⠀⠉⠉⠘⠂⠀⠀⠀⡐⢈⠀<br>⠂⠀⢀⠀⠈⠀⠂⠀⣐⠉⢑⣴⡉⡈⠁⡂⠒⠀⠁⢠⡄⠀⠐⠀⠠⠄⠀⠁⢀⡀<br>⠀⠀⠄⠀⠬⠀⠀⠀⢰⠂⡃⠨⣿⣿⡕⠂⠀⠨⠌⠈⠆⠀⠄⡀⠑⠀⠀⠘⠀⠀<br>⡄⠀⠠⢀⠐⢲⡀⢀⠀⠂⠡⠠⠱⠉⢱⢖⡀⠀⡈⠃⠀⠀⠀⢁⠄⢀⣐⠢⠀⠀<br>⠉⠀⠀⠀⢀⠄⠣⠠⠂⠈⠘⠀⡀⡀⠀⠈⠱⢆⣰⠠⠰⠐⠐⢀⠀⢀⢀⠀⠌⠀<br>⠀⠀⠀⠂⠀⠀⢀⠀⠀⠀⠁⣀⡂⠁⠦⠈⠐⡚⠱⢆⢀⢀⠡⠌⡀⡈⠸⠁⠂⠀<br>⠀⠀⠀⠀⠀⠀⣠⠴⡇⠀⠀⠉⠈⠁⠀⠀⢐⠂⠀⢐⣻⣾⠡⠀⠈⠀⠄⠀⡉⠄<br>⠀⠀⠁⢀⠀⠀⠰⠀⠲⠀⠐⠀⠀⠡⠄⢀⠐⢀⡁⠆⠁⠂⠱⢆⡀⣀⠠⠁⠉⠇<br>⣀⠀⠀⢀⠀⠀⠀⠄⠀⠀⠀⠆⠑⠀⠀⢁⠀⢀⡀⠨⠂⠀⠀⢨⠿⢇⠀⡸⠀⢀<br>⠠⠀⠀⠀⠀⠄⠀⡈⢀⠠⠄⠀⣀⠀⠰⡘⠀⠐⠖⠂⠀⠁⠄⠂⣀⡠⠻⢆⠄⠃<br>⠐⠁⠤⣁⠀⠁⠈⠀⠂⠐⠀⠰⠀⠀⠀⠀⠂⠁⠈⠀⠃⠌⠧⠄⠀⢀⠤⠁⠱⢆</pre> | <pre>⣕⢝⠀⠀⢸⠔⡵⢊⡀⠂⠀⠀⠄⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣑⠑<br>⠀⠀⠑⢄⠀⠳⠡⢡⣒⣃⢣⠯⠆⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠈⠌<br>⢒⠖⢤⡀⠑⢄⢶⡈⣂⠎⢎⠉⠩⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀<br>⡱⢋⠅⣂⡘⠳⠻⢆⡥⣈⠆⡨⡩⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠁⠀<br>⠠⠈⠼⢸⡨⠜⡁⢫⣻⢞⢔⠀⣀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠠⠠<br>⠀⠀⡭⡖⡎⠑⡈⡡⠐⠑⠵⣧⣜⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣀<br>⠀⠁⠈⠁⠃⠂⠃⠊⠀⠘⠒⠙⠛⢄⠀⠀⢄⠀⠤⢠⠀⢄⢀⢀⠀⡀⠀⠀⢄⢄<br>⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠑⢄⠊⠀⣂⠅⢓⣤⡄⠢⠠⠀⠌⠉⢀⢁<br>⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠑⠊⠀⠑⢄⠁⣋⠀⢀⢰⢄⢔⢠⡖⢥⠀⠁<br>⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣃⠌⠜⡥⢠⠛⣤⠐⣂⡀⠀⡀⡁⠍⠤⠒⠀<br>⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢄⠙⣴⠀⢀⠰⢠⠿⣧⡅⠁⠂⢂⠂⠋⢃⢀<br>⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢐⠠⡉⠐⢖⠀⠈⠅⠉⢕⢕⠝⠘⡒⠠⠀⠀<br>⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠠⠀⠂⠐⣑⠄⠨⠨⢀⣓⠁⣕⢝⡥⢉⠁⠠<br>⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⡆⠁⠜⣍⠃⡅⡬⠀⠘⡈⡅⢋⠛⣤⡅⠒<br>⢕⠘⡂⠄⠀⠀⠁⠀⠀⡂⠀⢠⠀⢕⠄⢐⠄⠀⠘⠀⠉⢐⠀⠀⠁⡀⢡⠉⢟⣵</pre> |
|:---------------------- |:--------------------------------- |
| `S` (5% stored values) | `S[perm,perm]` (5% stored values) |

The names of the available Julia functions are those from the Metis API
We can also visualize the sparsity pattern of the Cholesky factorization of
the same matrix. It is here clear that using the fill reducing permutation
results in a sparser factorization:

* `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
|<pre>⠙⢤⢠⡄⠀⣜⠃⢠⠀⠐⠘⠀⠀⠀⠀⠛⠃⠀⠀⠀⠀⠀⠀⠀⠀⠘⠀⠂⡔⠀<br>⠀⠀⠙⢦⡇⠾⡃⠰⠀⠀⠀⠐⠀⠃⠀⢂⠀⠀⠠⠀⠀⠀⠃⢀⠀⢀⠀⠀⠆⢣<br>⠀⠀⠀⠀⠙⢼⣣⢠⠀⣂⣂⢘⡂⡃⢰⣋⡀⣔⢠⠀⠀⠀⡃⠈⠀⢈⠀⡄⣄⡋<br>⠀⠀⠀⠀⠀⠀⠑⢖⡰⠉⠉⠈⠁⠁⢘⢙⠉⡊⢐⢐⢀⣞⠱⠎⠀⠌⡀⡣⡊⠉<br>⠀⠀⠀⠀⠀⠀⠀⠀⠙⢤⣴⢸⣴⡖⢠⣤⡜⢣⠀⠀⠛⠛⡜⠂⠀⢢⠀⡔⢸⡄<br>⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠙⢼⣛⣛⣛⣛⣓⣚⡃⢠⣖⣒⣓⢐⢠⣜⠀⡃⢘⣓<br>⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠙⢿⣿⣿⣿⣿⣿⢸⣿⣿⣿⣾⣿⣿⠀⣿⢸⣿<br>⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠙⢿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣒⣿⣺⣿<br>⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠙⢿⣿⣿⣿⣿⣿⣿⣿⣿⣤⣿⣼⣿<br>⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠙⢿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿<br>⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠙⢿⣿⣿⣿⣿⣿⣿⣿⣿<br>⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠙⢿⣿⣿⣿⣿⣿⣿<br>⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠙⢿⣿⣿⣿⣿<br>⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠙⢿⣿⣿<br>⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠙⢿</pre> | <pre>⠑⢝⠀⠀⢸⠔⡵⢊⡀⡂⠀⠀⠄⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣕⢕<br>⠀⠀⠑⢄⠀⠳⠡⢡⣒⣃⢣⠯⠆⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠈⠌<br>⠀⠀⠀⠀⠑⢄⢶⡘⣂⡎⢎⡭⠯⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠶⠴<br>⠀⠀⠀⠀⠀⠀⠙⢎⣷⣏⢷⣯⡫⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠛⡛<br>⠀⠀⠀⠀⠀⠀⠀⠀⠙⢿⢼⣧⣧⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠤⡤<br>⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠑⢿⣿⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣭⣯<br>⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠙⢄⠀⠀⢄⠀⠤⢠⠀⢄⢀⢀⠀⡀⠀⠀⢟⢟<br>⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠑⢄⠊⠀⣂⠅⢓⣤⡄⠢⠠⠀⠌⠉⢀⢁<br>⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠑⢄⠉⣋⠀⢁⢰⢔⢔⢠⡖⢥⠁⠃<br>⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠙⢤⠘⣶⡂⠠⡀⣡⠭⣤⢓⢗<br>⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠙⢷⡇⡇⣢⣢⠂⣯⣷⣶<br>⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠑⢕⢟⢝⣒⠭⠭⡭<br>⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠑⢝⣿⣿⡭⡯<br>⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠙⢿⣿⣿<br>⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠙⢿</pre> |
|:----------------------------- |:--------------------------------------- |
| `chol(S)` (16% stored values) | `chol(S[perm,perm])` (6% stored values) |

## Examples
## Direct access to the Metis C API
For more fine tuned usage of Metis consider calling the C API directly.
The following functions are currently exposed:
- `METIS_PartGraphRecursive`
- `METIS_PartGraphKway`
- `METIS_ComputeVertexSeparator`
- `METIS_NodeND`

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.
all with the same arguments and argument order as described in the
[Metis manual][metis-manual-url].

`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)

```julia
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)
```
[travis-img]: https://travis-ci.org/JuliaSparse/Metis.jl.svg?branch=master
[travis-url]: https://travis-ci.org/JuliaSparse/Metis.jl

[appveyor-img]: https://ci.appveyor.com/api/projects/status/76i2pnyq8495sgfa/branch/master?svg=true
[appveyor-url]: https://ci.appveyor.com/project/JuliaSparse/metis-jl/branch/master

[codecov-img]: http://codecov.io/github/JuliaSparse/Metis.jl/coverage.svg?branch=master
[codecov-url]: http://codecov.io/github/JuliaSparse/Metis.jl?branch=master

[metis-url]: http://glaros.dtc.umn.edu/gkhome/metis/metis/overview
[metis-manual-url]: http://glaros.dtc.umn.edu/gkhome/fetch/sw/metis/manual.pdf

[S-url]: https://user-images.githubusercontent.com/11698744/38196722-dd9877c2-3684-11e8-8c02-a767604824d1.png
[Spp-url]: https://user-images.githubusercontent.com/11698744/38196723-ddb62fba-3684-11e8-89ff-181128644294.png
[C-url]: https://user-images.githubusercontent.com/11698744/38196720-dd5dd748-3684-11e8-8413-a52d336abe49.png
[Cpp-url]: https://user-images.githubusercontent.com/11698744/38196721-dd7ac16e-3684-11e8-8a35-761e97d11235.png
[partition2-url]: https://user-images.githubusercontent.com/11698744/38196819-65950f1e-3685-11e8-8db4-6aa9563bbd62.png
[partition3-url]: https://user-images.githubusercontent.com/11698744/38196820-65b11c9a-3685-11e8-95a0-b3b280359b31.png
[partition4-url]: https://user-images.githubusercontent.com/11698744/38196821-65ddc1dc-3685-11e8-8eb1-ce44ef1646f3.png
[separator-url]: https://user-images.githubusercontent.com/11698744/38196822-65fffc34-3685-11e8-9575-4dba41faec41.png
[vertex-separator-url]: https://en.wikipedia.org/wiki/Vertex_separator
7 changes: 2 additions & 5 deletions REQUIRE
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
julia 0.3
Graphs 0.5.5
BinDeps
Compat
julia 1
BinaryProvider
LightGraphs
@windows WinRPM
28 changes: 0 additions & 28 deletions appveyor.yml

This file was deleted.

5 changes: 0 additions & 5 deletions deps/.gitignore

This file was deleted.

Loading

0 comments on commit 6695b7a

Please sign in to comment.