Google OR-Tools v9.14
a fast and portable software suite for combinatorial optimization
Loading...
Searching...
No Matches
operations_research::PrePostVisitValues Class Reference

#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.

Detailed Description

Definition at line 508 of file routing_filter_committables.h.

Member Typedef Documentation

◆ Interval

Constructor & Destructor Documentation

◆ PrePostVisitValues()

operations_research::PrePostVisitValues::PrePostVisitValues ( int num_paths,
int num_nodes )
inline

Definition at line 510 of file routing_filter_committables.h.

Member Function Documentation

◆ ChangedPaths()

absl::Span< const size_t > operations_research::PrePostVisitValues::ChangedPaths ( ) const
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.

◆ ChangePathSize()

void operations_research::PrePostVisitValues::ChangePathSize ( int path,
int new_num_nodes )
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.

◆ Commit()

void operations_research::PrePostVisitValues::Commit ( )
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.

◆ CommittedPostVisits()

absl::Span< const int64_t > operations_research::PrePostVisitValues::CommittedPostVisits ( int path) const
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.

◆ CommittedPreVisits()

absl::Span< const int64_t > operations_research::PrePostVisitValues::CommittedPreVisits ( int path) const
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.

◆ MutablePostVisits()

absl::Span< int64_t > operations_research::PrePostVisitValues::MutablePostVisits ( int path)
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.

◆ MutablePreVisits()

absl::Span< int64_t > operations_research::PrePostVisitValues::MutablePreVisits ( int path)
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.

◆ NumNodes()

int operations_research::PrePostVisitValues::NumNodes ( int path) const
inline

Returns the number of nodes of the path, in the current state.

Definition at line 610 of file routing_filter_committables.h.

◆ PathHasChanged()

bool operations_research::PrePostVisitValues::PathHasChanged ( int path) const
inline

Returns whether the given path was changed, in the current state.

Definition at line 616 of file routing_filter_committables.h.

◆ PostVisits()

absl::Span< const int64_t > operations_research::PrePostVisitValues::PostVisits ( int path) const
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.

◆ PreVisits()

absl::Span< const int64_t > operations_research::PrePostVisitValues::PreVisits ( int path) const
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.

◆ Reset()

void operations_research::PrePostVisitValues::Reset ( )
inline

Resets all path to empty, in both committed and current state.

Definition at line 537 of file routing_filter_committables.h.

◆ Revert()

void operations_research::PrePostVisitValues::Revert ( )
inline

Clears the changed state, makes it point to the committed state.

Definition at line 545 of file routing_filter_committables.h.


The documentation for this class was generated from the following file: