Skip to content

Commit

Permalink
[doc] install + small update
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexandreDubray committed Jan 25, 2024
1 parent 03ebb53 commit b7ce524
Show file tree
Hide file tree
Showing 4 changed files with 40 additions and 2 deletions.
1 change: 1 addition & 0 deletions doc/src/SUMMARY.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# Summary

[Introduction](README.md)
[Installation](intall.md)

- [Schlandals Modelization](modelization/README.md)
- [The Language](modelization/language.md)
Expand Down
37 changes: 37 additions & 0 deletions doc/src/install.md
Original file line number Diff line number Diff line change
@@ -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 [email protected]: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
```
2 changes: 1 addition & 1 deletion doc/src/modelization/bn.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion doc/src/modelization/pg.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit b7ce524

Please sign in to comment.