Skip to content

Rust implementation of the Approximate Partition problem.

License

Notifications You must be signed in to change notification settings

piniom/partition

Repository files navigation

PARTITION

Rust implementation of the Approximate Partition problem. The crate can be used as a rust library or as a standalone CLI.

PDF

The PDF with the description of the alghoritm can be downloaded from the Releases section of the repository under Assets -> main.pdf.

Latest release

Rust

To build, run, and test the project you need to have rust installed.

CLI

Running

To run the cli run:

cargo run --release -- -h

This will print the help section of the binary. The double dashes are used to split the binary arguments from cargo arguments.

Building

To build the cli run:

cargo build --release

This will build the executable. The binary will be outputed to target/release/partition.

Building PDF from LaTeX

The source code of the PDF is located in the paper folder.

To compile the PDF, cd to the paper folder:

cd paper

and run

./compile.sh

To automatically re-compile upon file save, run

./auto_recompile.sh

in the paper directory. Keep this terminal open for the auto re-compile to work.

Tests

To run the tests run

cargo run

in the root directory.

Optionally you can provide a feature flag to run the property-based tests. Note that this may take very long to complete.

cargo test --features use-proptest