C++ Reference: class LatticeMemoryManager

Note: This documentation is automatically generated.

Method
BaseOffset

Return type: inline uint64_t

Arguments: int card, Set s

Returns the base offset in memory for f(s, node), with node contained in s. This is useful in the Dynamic Programming iterations. Note(user): inlining this function gains about 5%. TODO(user): Investigate how to compute BaseOffset(card - 1, s \ { n }) from BaseOffset(card, n) to speed up the DP iteration.

Init

Return type: void

Arguments: int max_card

Reserves memory and fills in the data necessary to access memory.

LatticeMemoryManager

Offset

Return type: uint64_t

Arguments: Set s, int node

Returns the offset in memory for f(s, node), with node contained in s.

OffsetDelta

Return type: uint64_t

Arguments: int card, int added_node, int removed_node, int rank

Returns the offset delta for a set of cardinality 'card', to which node 'removed_node' is replaced by 'added_node' at 'rank'

SetValue

Return type: void

Arguments: Set s, int node, CostType value

Memorizes the value = f(s, node) at the correct offset. This is favored in all other uses than the Dynamic Programming iterations.

SetValueAtOffset

Return type: void

Arguments: uint64_t offset, CostType value

Memorizes 'value' at 'offset'. This is useful in the Dynamic Programming iterations where we want to avoid compute the offset of a pair (set, node).

Value

Return type: CostType

Arguments: Set s, int node

Returns the memorized value f(s, node) with node in s. This is favored in all other uses than the Dynamic Programming iterations.

ValueAtOffset

Return type: CostType

Arguments: uint64_t offset

Returns the memorized value at 'offset'. This is useful in the Dynamic Programming iterations.