Skip to main content

KaHIP Python Wrapper

Project description

Installation

pip install kahipwrapper

Usage

from kahipwrapper import kaHIP

vwgt = None
xadj = [0,2,5,7,9,12]
adjcwgt = [1,1,1,1,1,1,1,1,1,1,1,1]
adjncy = [1,4,0,2,4,1,3,2,4,0,1,3]
nparts = 2
imbalance = 0.03
suppress_output = False
mode = kaHIP.STRONG
seed = 0

ncount = len(xadj) - 1
nparts = 2

print(ncount)

print(kaHIP.kaffpa_balance_NE(ncount, vwgt, xadj, adjcwgt, adjncy,
                              nparts, imbalance, suppress_output,
                              seed, mode))
print(kaHIP.kaffpa(ncount, vwgt, xadj, adjcwgt, adjncy, nparts,
                   imbalance, suppress_output, seed, mode))

print(kaHIP.node_separator(ncount, vwgt, xadj, adjcwgt, adjncy, nparts,
                           imbalance, suppress_output, seed, mode))

For more information, please visit KaHIP site here

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

kahipwrapper-0.1.7-cp36-cp36m-manylinux1_x86_64.whl (595.8 kB view hashes)

Uploaded CPython 3.6m

kahipwrapper-0.1.7-cp35-cp35m-manylinux1_x86_64.whl (595.8 kB view hashes)

Uploaded CPython 3.5m

kahipwrapper-0.1.7-cp34-cp34m-manylinux1_x86_64.whl (595.7 kB view hashes)

Uploaded CPython 3.4m

kahipwrapper-0.1.7-cp33-cp33m-manylinux1_x86_64.whl (595.1 kB view hashes)

Uploaded CPython 3.3m

kahipwrapper-0.1.7-cp27-cp27mu-manylinux1_x86_64.whl (596.8 kB view hashes)

Uploaded CPython 2.7mu

kahipwrapper-0.1.7-cp27-cp27m-manylinux1_x86_64.whl (596.8 kB view hashes)

Uploaded CPython 2.7m

kahipwrapper-0.1.7-cp26-cp26mu-manylinux1_x86_64.whl (556.6 kB view hashes)

Uploaded CPython 2.6mu

kahipwrapper-0.1.7-cp26-cp26m-manylinux1_x86_64.whl (556.6 kB view hashes)

Uploaded CPython 2.6m

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page