23 lower_bound_(lower_bound),
24 upper_bound_(upper_bound),
25 boxed_variables_are_relevant_(true) {}
28 const ColIndex num_cols = matrix_.
num_cols();
35 num_entries_in_relevant_columns_ = 0;
36 boxed_variables_are_relevant_ =
true;
41 for (ColIndex
col(0);
col < num_cols; ++
col) {
42 variable_type_[
col] = ComputeVariableType(
col);
47 if (
value == boxed_variables_are_relevant_)
return;
48 boxed_variables_are_relevant_ =
value;
50 for (
const ColIndex
col : non_basic_boxed_variables_) {
54 for (
const ColIndex
col : non_basic_boxed_variables_) {
55 SetRelevance(
col,
false);
71 not_basic_.
Set(
col,
false);
72 can_increase_.
Set(
col,
false);
73 can_decrease_.
Set(
col,
false);
74 non_basic_boxed_variables_.
Set(
col,
false);
75 SetRelevance(
col,
false);
81 variable_status_[
col] = status;
91 non_basic_boxed_variables_.
Set(
col, boxed);
93 (boxed_variables_are_relevant_ || !boxed);
94 SetRelevance(
col, relevance);
98 return variable_type_;
102 return variable_status_;
106 return can_increase_;
110 return can_decrease_;
124 return non_basic_boxed_variables_;
128 return num_entries_in_relevant_columns_;
140 }
else if (lower_bound_[
col] == upper_bound_[
col]) {
147void VariablesInfo::SetRelevance(ColIndex
col,
bool relevance) {
148 if (relevance_.
IsSet(
col) == relevance)
return;
#define DCHECK_LE(val1, val2)
#define DCHECK_NE(val1, val2)
void ClearAndResize(IndexType size)
bool IsSet(IndexType i) const
ColIndex num_cols() const
EntryIndex ColumnNumEntries(ColIndex col) const
void resize(IntType size)
const DenseBitRow & GetIsBasicBitRow() const
EntryIndex GetNumEntriesInRelevantColumns() const
const DenseBitRow & GetNonBasicBoxedVariables() const
const DenseBitRow & GetCanIncreaseBitRow() const
const DenseBitRow & GetCanDecreaseBitRow() const
const VariableTypeRow & GetTypeRow() const
void MakeBoxedVariableRelevant(bool value)
void UpdateToNonBasicStatus(ColIndex col, VariableStatus status)
void InitializeAndComputeType()
const DenseBitRow & GetNotBasicBitRow() const
VariablesInfo(const CompactSparseMatrix &matrix, const DenseRow &lower_bound, const DenseRow &upper_bound)
const VariableStatusRow & GetStatusRow() const
void UpdateToBasicStatus(ColIndex col)
const DenseBitRow & GetIsRelevantBitRow() const
void Update(ColIndex col, VariableStatus status)
@ UPPER_AND_LOWER_BOUNDED
The vehicle routing library lets one model and solve generic vehicle routing problems ranging from th...