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


Release history Release notifications

This version
History Node

0.1.7

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging CloudAMQP CloudAMQP RabbitMQ AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page