arc-hugo / debt_calculator

Implementation project of an algorithm computing the max-flow of a flow graph and apply it in a debt calculator app.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

OCaml Graph Project : Debt calculator

Implementation project of an algorithm computing the max-flow of a flow graph and apply it in a debt calculator app.
Our application behavior is based on this article.

Requierements

  • opam package manager to install ocaml
  • dune build system to build, test and execute this app
  • Graphviz visualization software to generate image files from app results

Getting started

Installation

git clone https://github.com/arc-hugo/debt_calculator/
cd debt_calculator
dune build

Test

dune test -f

Usage

dune exec bin/debt.exe infile outfile

Given infile need to follow this format.

Name1 MoneyPaid1\n
Name2 MoneyPaid2\n
....
NameN MoneyPaidN

Resulting output file will be in DOT language.
It can then be converted in an image by the dot layout engine or an equivalent.

Example

As an example, you can pick the debt record in graphs folder.

John 40
Kate 10
Ann 10

The resulting image will be this :
debt graph result

Maintainers

About

Implementation project of an algorithm computing the max-flow of a flow graph and apply it in a debt calculator app.

License:GNU General Public License v3.0


Languages

Language:OCaml 100.0%