16 releases
0.3.0 | Mar 30, 2020 |
---|---|
0.2.1 | Mar 1, 2019 |
0.2.0 | Feb 28, 2019 |
0.1.5 | Oct 13, 2018 |
0.0.0 | Sep 18, 2018 |
#2 in #restoration
Used in contrail-collections
59KB
754 lines
⚠️⚠️⚠️ This project is no longer maintained. ⚠️⚠️⚠️
contrail
Simple state restoration for backtracking search algorithms using a trail.
Usage
To use contrail
, add the following to your Cargo.toml
:
contrail = "0.2"
See the documentation for API usage.
License
contrail
is licensed under the Mozilla Public License version 2.0. See the license
file and the MPL 2.0
FAQ for more information.
lib.rs
:
Simple state restoration for backtracking search algorithms using a trail.
During a typical branching search algorithm, the search state must be cloned at each branch
point in order to explore the branches independently. contrail
provides a framework to create
search algorithms that only require a partial clone of the search state at each branch point.
This is facilitated by the trail, a struct where all search state is stored.
This library is based on the memory model used by Minion, a C++ constraint satisfaction problem solver.
Limitations
The main limitation of contrail is that once a trail has been created using a trail builder, nothing can be added to the trail. This is to prevent dangling pointers.
Dependencies
~2MB
~48K SLoC