This is a Java implementation of the RAIRE algorithm as a library.
It is very closely based on the Rust implementation in raire-rs. See ComparisonToRaireRS.md for details. The documentation for raire-rs is generally valid for raire-java.
The main entry point is the constructor for au.org.democracydevelopers.raire.algorithm.RaireResult
which will either return a valid result or throw a RaireException. Alternatively, one can make
a au.org.democracydevelopers.raire.RaireProblem
object, and call the solve
method on it.
You can make a command line program that takes a RaireProblem JSON and produces a RaireSolution JSON.
To build, run
mvn package
To run, it takes either 1 or 2 arguments. The first is the input file name. The
second is the output file name. If only 1 argument is supplied, the input file name
is stripped of extension and path, and _out.json
is added to produce the output file.
E.g.
java -jar target/raire-java-1.0-SNAPSHOT-jar-with-dependencies.jar ../raire-rs/WebContent/example_input/a_guide_to_RAIRE_eg_guide.json
This program is Copyright 2023-2024 Democracy Developers. It is based on software (c) Michelle Blom in C++ https://github.com/michelleblom/audit-irv-cp/tree/raire-branch
This file is part of raire-java.
raire-java is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
raire-java is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License along with raire-java. If not, see https://www.gnu.org/licenses/.
This repository contains some files derived from data sources with their own separate copyrights. These files are licensed as above to the extent that they are the work of contributors to raire-rs, and maintain the original copyright to the appropriate extent.
- Australian Examples/NSW Local Government/ These lists are partially derived from data on the NSW Electoral Commission website, which is © State of New South Wales through the NSW Electoral Commission and licensed under the Creative Commons Attribution 4.0 License (CCA License). Thank you to the State of New South Wales for the use of such a license allowing us to use this real election data as test data.
This should not be taken as an endorsement of raire-java by any organisation listed here.