Git Product home page Git Product logo

ocaml-fordfulkerson's Introduction

OFord

This an implementation of Ford-Fulkerson Algorithm, in Ocaml Language.

It can also resolve Circulation Demand Problem given an input in two type of format.

  • You can use the link below to create a readable input file graphicaly

https://www-m9.ma.tum.de/graph-algorithms/flow-ford-fulkerson/index_en.html#tab_tg

Dependencies

This project use OUnit fort testing pursose only you can install it with this command

opam install ounit

of course you need to have OCaml and Opam installed

Tests

To run existing tests

  1. Go to the src folder

  2. run one of the following commands

.test1 for Max Flow problem

.test2 for Circulation demand: this one print paths that can be used and the flow of each one

Create New Tests

To add new test here are steps:

  1. Add the new graph file into the in folder
  2. Add the file name to the files variable in test.ml file
  3. Add an element (source, sink, right flow value) to the paths variable and follow the compile test steps below.

Compile own tests

ocamlfind ocamlc -o test -package oUnit -linkpkg -g graph.ml gfile.ml algo.ml test.ml

Build

To build the project run command

ocamlbuild ftest.native and then ./ftest.native infile source sink outfile to run the executable

ocaml-fordfulkerson's People

Contributors

faymir avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.