Skip to main content

No project description provided

Project description

Combinatorial Optimization in Rust

This is a mostly toy project with implementation of a few combinatorial optimization algorithms in Rust, with a Python interface.

Currently, we implement:

  • Floyd-Warshall -- minimum distance for all vertex pairs,
  • minimum nearest descendant for all vertex pairs (brute force).

All implementations first convert the python input into a rust representation, then release GIL and carry out the algorithm, and after reclaiming GIL construct a python object with the result and return it.

Installation

uv pip install coptrs

Development

uv pip install maturin
maturin develop . # installs into your current venv
maturin build -r . # builds a wheel

Usage

There are usually multiple interfaces for each algorithm, differing by the object they take -- for example, Floyd-Warshall is exposed as floyd_warshall and floyd_warshall_u32, where the latter accepts graphs with integer vertex labels and the former accepts any vertex labels (and thus being a little slower as we need to do more preprocessing work).

For example usage, see the floyd warshall benchmark, which additionally compares performance against a native python implementation.

Roadmap

  • extend interface for more graph representation (list of neighbors, double dicts, ...)
  • add more algorithms

Project details


Download files

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

Source Distribution

coptrs-0.1.0.tar.gz (11.6 kB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

coptrs-0.1.0-pp310-pypy310_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (253.3 kB view details)

Uploaded PyPymanylinux: glibc 2.17+ x86-64

coptrs-0.1.0-pp310-pypy310_pp73-manylinux_2_5_i686.manylinux1_i686.whl (270.4 kB view details)

Uploaded PyPymanylinux: glibc 2.5+ i686

coptrs-0.1.0-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (250.9 kB view details)

Uploaded CPython 3.13manylinux: glibc 2.17+ x86-64

coptrs-0.1.0-cp313-cp313-manylinux_2_5_i686.manylinux1_i686.whl (267.8 kB view details)

Uploaded CPython 3.13manylinux: glibc 2.5+ i686

coptrs-0.1.0-cp313-cp313-macosx_11_0_arm64.whl (219.2 kB view details)

Uploaded CPython 3.13macOS 11.0+ ARM64

coptrs-0.1.0-cp313-cp313-macosx_10_12_x86_64.whl (224.1 kB view details)

Uploaded CPython 3.13macOS 10.12+ x86-64

coptrs-0.1.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (251.0 kB view details)

Uploaded CPython 3.12manylinux: glibc 2.17+ x86-64

coptrs-0.1.0-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.whl (268.2 kB view details)

Uploaded CPython 3.12manylinux: glibc 2.5+ i686

coptrs-0.1.0-cp312-cp312-macosx_11_0_arm64.whl (219.3 kB view details)

Uploaded CPython 3.12macOS 11.0+ ARM64

coptrs-0.1.0-cp312-cp312-macosx_10_12_x86_64.whl (224.2 kB view details)

Uploaded CPython 3.12macOS 10.12+ x86-64

coptrs-0.1.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (251.9 kB view details)

Uploaded CPython 3.11manylinux: glibc 2.17+ x86-64

coptrs-0.1.0-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.whl (268.6 kB view details)

Uploaded CPython 3.11manylinux: glibc 2.5+ i686

coptrs-0.1.0-cp311-cp311-macosx_11_0_arm64.whl (221.9 kB view details)

Uploaded CPython 3.11macOS 11.0+ ARM64

coptrs-0.1.0-cp311-cp311-macosx_10_12_x86_64.whl (226.7 kB view details)

Uploaded CPython 3.11macOS 10.12+ x86-64

coptrs-0.1.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (252.2 kB view details)

Uploaded CPython 3.10manylinux: glibc 2.17+ x86-64

coptrs-0.1.0-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.whl (268.8 kB view details)

Uploaded CPython 3.10manylinux: glibc 2.5+ i686

coptrs-0.1.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (252.2 kB view details)

Uploaded CPython 3.9manylinux: glibc 2.17+ x86-64

coptrs-0.1.0-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.whl (269.1 kB view details)

Uploaded CPython 3.9manylinux: glibc 2.5+ i686

coptrs-0.1.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (252.1 kB view details)

Uploaded CPython 3.8manylinux: glibc 2.17+ x86-64

coptrs-0.1.0-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.whl (269.1 kB view details)

Uploaded CPython 3.8manylinux: glibc 2.5+ i686

File details

Details for the file coptrs-0.1.0.tar.gz.

File metadata

  • Download URL: coptrs-0.1.0.tar.gz
  • Upload date:
  • Size: 11.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: maturin/1.8.1

File hashes

Hashes for coptrs-0.1.0.tar.gz
Algorithm Hash digest
SHA256 33d56059a50d5e22d17c209e18b23fca757afb753d6fbf728954759f870547b3
MD5 c6c5ec599f4ee604b05772fb1e25fd0a
BLAKE2b-256 4116fa6e97a6c6d0fd5580b06fed02334eae7d977578254d37045d671972cf5d

See more details on using hashes here.

File details

Details for the file coptrs-0.1.0-pp310-pypy310_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for coptrs-0.1.0-pp310-pypy310_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 6c2170928a0870d3730fd4a5edb3974127e590aaa15897e98a16770a52c131e1
MD5 89829474954cfc3629c4f31db9a9613a
BLAKE2b-256 5ef7063d5c7a9c4b42a3b7800e28dd3fa57a8cf23cf02e77e1a9d5fad910a37a

See more details on using hashes here.

File details

Details for the file coptrs-0.1.0-pp310-pypy310_pp73-manylinux_2_5_i686.manylinux1_i686.whl.

File metadata

File hashes

Hashes for coptrs-0.1.0-pp310-pypy310_pp73-manylinux_2_5_i686.manylinux1_i686.whl
Algorithm Hash digest
SHA256 87b0476acb974870b120e8d0e0795f8cb8380d50f1194a8dc9762cef1494e4ab
MD5 a8d91735723d9f7906e4517c0ea9834a
BLAKE2b-256 9b18013829c21afc47ec75d42e5c6a617c93162c31cc30de2df9f612a3850708

See more details on using hashes here.

File details

Details for the file coptrs-0.1.0-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for coptrs-0.1.0-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 dbf84ff495f6ecdfc120ae51bd4b52542ceb3ba0be9703ffafdb348a633876cb
MD5 63ee5d45c807fb5380b4b9c0785a5672
BLAKE2b-256 7a6aec0c601ed8ede35b69e7691f249b6d47a2c4569a385f7c4a498175511daa

See more details on using hashes here.

File details

Details for the file coptrs-0.1.0-cp313-cp313-manylinux_2_5_i686.manylinux1_i686.whl.

File metadata

File hashes

Hashes for coptrs-0.1.0-cp313-cp313-manylinux_2_5_i686.manylinux1_i686.whl
Algorithm Hash digest
SHA256 bf584731caf068fd957c58cac93f41b1c005d6c1e52551dd54ff8fcccc28acd7
MD5 295352dccc7a87e0877ce6ae037dc2c6
BLAKE2b-256 90ab13e21772684fd6f200d6b0f8b585035a74dce5b10692745d38cf97a2ab16

See more details on using hashes here.

File details

Details for the file coptrs-0.1.0-cp313-cp313-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for coptrs-0.1.0-cp313-cp313-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 02128b02d4f15f3d2db2e534b19616fb9c08792b7cb8e067f9866eceaeae43a8
MD5 c232d161ea6b2eb912510a9f1d3a5c0c
BLAKE2b-256 07c6beb132469d16ba61ac1aca58e695af4c5f54433cc1a446ee9ad42c323e61

See more details on using hashes here.

File details

Details for the file coptrs-0.1.0-cp313-cp313-macosx_10_12_x86_64.whl.

File metadata

File hashes

Hashes for coptrs-0.1.0-cp313-cp313-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 61701cf6ab18326a07b46aa01b788b3bda1ae4e87e77c83e15c4eedc0e3c700d
MD5 441c0b4a7b8d3b385363990aad49017b
BLAKE2b-256 cb37958095050ab944a7136590d94019f138a5b88e63d6b51e06037fa61ca62e

See more details on using hashes here.

File details

Details for the file coptrs-0.1.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for coptrs-0.1.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 bd9f894daef4e8347dcbbd22d7f1af1e6782195f4b76d649d022de03b21e7fa9
MD5 0b7fa0b1a9f8b63b58d5b0a6ec53dd47
BLAKE2b-256 005c11d90aa997e9be55ddba4b37d3c4dff1848242503a6ade37639d0ed6f83d

See more details on using hashes here.

File details

Details for the file coptrs-0.1.0-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.whl.

File metadata

File hashes

Hashes for coptrs-0.1.0-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.whl
Algorithm Hash digest
SHA256 c9003f1f85eff136b5758c087a5af6dd1ea936aded2b2dc9f8cd4926af07095c
MD5 0bdc6a0f7db9ffed4a3026b2aa517ef9
BLAKE2b-256 6b5673a9c86f06f528a11036a67f4cd618f1806565b51f4669fa10ff8252785d

See more details on using hashes here.

File details

Details for the file coptrs-0.1.0-cp312-cp312-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for coptrs-0.1.0-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 cdf7db3ebfa17f477b7c35f3a7e33be8c931cb3a47021bbb3cb522a1b582ea84
MD5 c94015b4162a161dd39b08a88eda1c98
BLAKE2b-256 391dcdc0212581814eeca5d1458ebf0a9225dc0a5c7eb7332263a47dc03391db

See more details on using hashes here.

File details

Details for the file coptrs-0.1.0-cp312-cp312-macosx_10_12_x86_64.whl.

File metadata

File hashes

Hashes for coptrs-0.1.0-cp312-cp312-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 f7c5842945fd9bf2569aba75f9f012c994f209bbffc78f7ca663e407408fbb04
MD5 f25f57640470707a13c050cd1d21763c
BLAKE2b-256 b7744913ef10fc86367e0c76037236b15eb9c21c4a806deed170c13eea08c1fc

See more details on using hashes here.

File details

Details for the file coptrs-0.1.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for coptrs-0.1.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 5cee835ed0405868991077c883c71d57b7b06f269e46b092423a0b0fb40e1288
MD5 ff80b610909a1f83a8301360c1638609
BLAKE2b-256 5b13fb5114105604f1826cadc428b2575df24fd13cce80c9f57e1a447d1ead16

See more details on using hashes here.

File details

Details for the file coptrs-0.1.0-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.whl.

File metadata

File hashes

Hashes for coptrs-0.1.0-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.whl
Algorithm Hash digest
SHA256 ae1e8c2ced11ed450b6b196430907c3ac1b3d2f1b4a84c90ebae26cc059e1904
MD5 03566cd82fcf60b5d5239b978a9a4079
BLAKE2b-256 d750fda5d9b9bc297e16806a36664c7dee8eafff5d5bf354a8d0b15f2bb6cd4d

See more details on using hashes here.

File details

Details for the file coptrs-0.1.0-cp311-cp311-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for coptrs-0.1.0-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 320661a1342915191f03ac0696c430e3f5588af3b904f645fcb39528144a21c6
MD5 5f004fc0872352feeacdddb4a40291fc
BLAKE2b-256 7c54ea637958d7c58fc5f8fe1190e2e58676f4e431a2ccb06a77b7e4997cc95f

See more details on using hashes here.

File details

Details for the file coptrs-0.1.0-cp311-cp311-macosx_10_12_x86_64.whl.

File metadata

File hashes

Hashes for coptrs-0.1.0-cp311-cp311-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 0a11ebb2481a409ac05a9829a76bd7c0a9ae29a2f3da8e68954850e6180a47df
MD5 d632d05a2b9d1982e72153322b6086ef
BLAKE2b-256 4e474abdc9b6886d9b17239d1587a588460b1a6304e7a0c106513dfffff08433

See more details on using hashes here.

File details

Details for the file coptrs-0.1.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for coptrs-0.1.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 58d24e850e75320e731435a913ddbdb685df8c75751a8c97a56d69b7ab5d7f63
MD5 8d3e31c07edeac9560fecae33b41aa2f
BLAKE2b-256 60a02ca9208695cb36e65ec6b710c8b6f3ebea0f8f7111469604afe7fbd66cf9

See more details on using hashes here.

File details

Details for the file coptrs-0.1.0-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.whl.

File metadata

File hashes

Hashes for coptrs-0.1.0-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.whl
Algorithm Hash digest
SHA256 ce39988591269fcf348174e6716b1e6d4b4fc2b05b790bcd58f0538beb46324b
MD5 89324169976271cc50212d7d738618f3
BLAKE2b-256 aeb1e32cc28d5407d27af6ea867b6eb1bfba2ebef15e4b2c00c441a54e82fd0e

See more details on using hashes here.

File details

Details for the file coptrs-0.1.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for coptrs-0.1.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 451c8692be45edb97a0b96b8274d714a07c7fbf4c0c273374ee650cf92f1ae18
MD5 10e892932434d9088a2a4b056b88bdeb
BLAKE2b-256 953e46d7f30ddebda9748292aac806ffdbdc69c188d7bc904a85aa9624e83363

See more details on using hashes here.

File details

Details for the file coptrs-0.1.0-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.whl.

File metadata

File hashes

Hashes for coptrs-0.1.0-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.whl
Algorithm Hash digest
SHA256 5a5040ae64be6a0e6c0523bdcce1b81b48b713dd6ce2b3a5dfa62120fded66af
MD5 7c64ae682d8a8afe9d9d7b1c7ca8c5e9
BLAKE2b-256 d79b7d83c44d71b2ce0bfb2c96b9bc0af917b174c968045f2bac5a985890e68f

See more details on using hashes here.

File details

Details for the file coptrs-0.1.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for coptrs-0.1.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 f6bdd1f45e321ce4b43bb62781760c46c7e1dccd8b3ab836f7778c33ba404eff
MD5 6a6d9d8a0dc445cd07a66c1b99e87a17
BLAKE2b-256 62af18b45c271ca6ed237df2d17ae0ccbfa7db2f0f192df869ca023a177705dd

See more details on using hashes here.

File details

Details for the file coptrs-0.1.0-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.whl.

File metadata

File hashes

Hashes for coptrs-0.1.0-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.whl
Algorithm Hash digest
SHA256 f2966660d1c25c5b0622b938283ca46736977f9807570831eb4cea191723a399
MD5 c2aaa82e812fd1edcaa74edc6cccc577
BLAKE2b-256 55c1307a8d37de36d13ccaaa89188203e01904784d0387145b74d2fdcef3c930

See more details on using hashes here.

Supported by

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