-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #29 from fredrikekre/fe/replace
Upgrade Metis
- Loading branch information
Showing
20 changed files
with
599 additions
and
330,126 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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%" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
comment: false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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())' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.