![]() |
Google OR-Tools v9.14
a fast and portable software suite for combinatorial optimization
|
#include <routing_filter_committables.h>
Public Types | |
using | Interval = DimensionValues::Interval |
Public Member Functions | |
PrePostVisitValues (int num_paths, int num_nodes) | |
void | ChangePathSize (int path, int new_num_nodes) |
Turns new nodes into a new path, allocating pre-post visit values for it. | |
void | Reset () |
Resets all path to empty, in both committed and current state. | |
void | Revert () |
Clears the changed state, makes it point to the committed state. | |
void | Commit () |
absl::Span< const int64_t > | CommittedPreVisits (int path) const |
Returns a const view of the pre-visits of the path, in the committed state. | |
absl::Span< const int64_t > | PreVisits (int path) const |
Returns a const view of the pre-visits of the path, in the current state. | |
absl::Span< int64_t > | MutablePreVisits (int path) |
Returns a mutable view of the pre-visits of the path, in the current state. | |
absl::Span< const int64_t > | CommittedPostVisits (int path) const |
absl::Span< const int64_t > | PostVisits (int path) const |
Returns a const view of the post-visits of the path, in the current state. | |
absl::Span< int64_t > | MutablePostVisits (int path) |
Returns a mutable view of the post-visits of the path in the current state. | |
int | NumNodes (int path) const |
Returns the number of nodes of the path, in the current state. | |
absl::Span< const size_t > | ChangedPaths () const |
Returns a const view of the set of paths changed, in the current state. | |
bool | PathHasChanged (int path) const |
Returns whether the given path was changed, in the current state. |
Definition at line 508 of file routing_filter_committables.h.
Definition at line 518 of file routing_filter_committables.h.
|
inline |
Definition at line 510 of file routing_filter_committables.h.
|
inline |
Returns a const view of the set of paths changed, in the current state.
Definition at line 612 of file routing_filter_committables.h.
|
inline |
Turns new nodes into a new path, allocating pre-post visit values for it.
Allocate dimension values. We allocate n cells for all dimension values, even transits, so they can all be indexed by the same range_of_path.
Definition at line 521 of file routing_filter_committables.h.
|
inline |
Makes the committed state point to the current state. If the state representation is too large, reclaims memory by compacting the committed state.
If the committed data would take too much space, compact the data: copy committed data to the end of vectors, erase old data, refresh indexing (range_of_path_).
Definition at line 555 of file routing_filter_committables.h.
|
inline |
Returns a const view of the post-visits of the path, in the committed state.
Definition at line 590 of file routing_filter_committables.h.
|
inline |
Returns a const view of the pre-visits of the path, in the committed state.
Definition at line 569 of file routing_filter_committables.h.
|
inline |
Returns a mutable view of the post-visits of the path in the current state.
Definition at line 604 of file routing_filter_committables.h.
|
inline |
Returns a mutable view of the pre-visits of the path, in the current state.
Definition at line 583 of file routing_filter_committables.h.
|
inline |
Returns the number of nodes of the path, in the current state.
Definition at line 610 of file routing_filter_committables.h.
|
inline |
Returns whether the given path was changed, in the current state.
Definition at line 616 of file routing_filter_committables.h.
|
inline |
Returns a const view of the post-visits of the path, in the current state.
Definition at line 597 of file routing_filter_committables.h.
|
inline |
Returns a const view of the pre-visits of the path, in the current state.
Definition at line 576 of file routing_filter_committables.h.
|
inline |
Resets all path to empty, in both committed and current state.
Definition at line 537 of file routing_filter_committables.h.
|
inline |
Clears the changed state, makes it point to the committed state.
Definition at line 545 of file routing_filter_committables.h.