1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
/* Supply infrastructure for variable relationship tracking.
Supplies provide efficient access to derived information about planning variables,
such as inverse relationships and list-element positions.
# Zero-Erasure Design
- **Index-based**: All supplies store indices, not cloned domain objects
- **Owned**: Supplies are owned directly, no `Arc`, `Box`, or `dyn`
- **Mutation via `&mut`**: Ordinary Rust ownership, no `RwLock` or interior mutability
- **Generic**: Full type information preserved through the entire pipeline
# Available Supplies
- [`InverseSupply`]: Maps values to entity indices for O(1) inverse lookups
- [`ListStateSupply`]: Tracks element positions in list variables
# Usage
Supplies are owned by the score director or solver scope. They're created
when needed and accessed via regular Rust references:
```
use solverforge_core::domain::supply::{InverseSupply, ListStateSupply};
// Create supplies owned by your containing struct
let mut inverse: InverseSupply<i64> = InverseSupply::new();
let mut list_state: ListStateSupply<usize> = ListStateSupply::new();
// Use with standard Rust ownership
inverse.insert(42, 0); // value 42 -> entity index 0
list_state.assign(10, 0, 0); // element 10 -> entity 0, position 0
// Read with shared reference
assert_eq!(inverse.get(&42), Some(0));
assert_eq!(list_state.get_entity(&10), Some(0));
```
*/
pub use InverseSupply;
pub use ;