diff --git a/doc/src/SUMMARY.md b/doc/src/SUMMARY.md index 9fbf540..ca5f987 100644 --- a/doc/src/SUMMARY.md +++ b/doc/src/SUMMARY.md @@ -1,6 +1,7 @@ # Summary [Introduction](README.md) +[Installation](intall.md) - [Schlandals Modelization](modelization/README.md) - [The Language](modelization/language.md) diff --git a/doc/src/install.md b/doc/src/install.md new file mode 100644 index 0000000..1af293b --- /dev/null +++ b/doc/src/install.md @@ -0,0 +1,37 @@ +# Installation + +In order to use Schlandals, you must have the [Rust toolchain installed](https://www.rust-lang.org/tools/install). +Once this is done, you can install Schlandals either using Cargo or from sources. + +## Installing using Cargo + +Run the following command +```bash +cargo install schlandals +``` + +it will install locally the executable. In Unix-based system you should find the executable in `~/.cargo/bin/schlandals`. + +## Installing from sources + +```bash +git clone git@github.com:aia-uclouvain/schlandals.git && cd schlandals && cargo build --release +``` + +it will compile the solver, from sources, and place the executable inside `schlandals/target/release/schlandals`. + +## Optional features + +### Learning with Torch + +It is possible to use the learning module of Schlandals with torch tensors. The torch bindings are provided by the [tch-rs crate](https://github.com/LaurentMazare/tch-rs). +It means that for using this feature, you must libtorch installed on your system. We refer to the [documentation of tch-rs](https://github.com/LaurentMazare/tch-rs?tab=readme-ov-file#getting-started) for the set-up of torch and tch-rs. + +Once torch is installed, and the appropriate variables set, you can run either +```bash +cargo install schlandals --features tensor +``` +or +```bash +cargo build --release --features tensor +``` diff --git a/doc/src/modelization/bn.md b/doc/src/modelization/bn.md index d31d9e6..469d9d7 100644 --- a/doc/src/modelization/bn.md +++ b/doc/src/modelization/bn.md @@ -38,7 +38,7 @@ The encoding (in DIMACS-style format) is show below for the query \\( P(D = d_0) Notice that the probailistic variables start at 1 and are in contiguous blocks. The -```bash +``` p cnf 26 19 c Probabilistic variables 1 2 c p distribution 0.2 0.8 diff --git a/doc/src/modelization/pg.md b/doc/src/modelization/pg.md index 8eb2dae..a690a96 100644 --- a/doc/src/modelization/pg.md +++ b/doc/src/modelization/pg.md @@ -25,7 +25,7 @@ The query is encoded by imposing the fact that the source \\( s \\) is reachable The encoding (in DIMACS-style format) is show below for the query \\( P(A \text{ connected to } E) \\). -```bash +``` p cnf 26 19 c Edge from A to B with variables 1 2 c p distribution 0.4 0.6