OR-Tools  9.6
AtomicConstraintStorage< ConstraintData >

Detailed Description

template<typename ConstraintData>
class operations_research::math_opt::AtomicConstraintStorage< ConstraintData >

Definition at line 70 of file atomic_constraint_storage.h.

Classes

struct  Diff
 

Public Types

using IdType = typename ConstraintData::IdType
 
using ProtoType = typename ConstraintData::ProtoType
 
using UpdatesProtoType = typename ConstraintData::UpdatesProtoType
 

Public Member Functions

IdType AddConstraint (ConstraintData constraint)
 
void AddConstraints (const google::protobuf::Map< int64_t, ProtoType > &constraints)
 
template<typename DiffIter >
void Delete (IdType id, const iterator_range< DiffIter > &diffs)
 
void DeleteVariable (VariableId variable_id)
 
int64_t size () const
 
IdType next_id () const
 
void ensure_next_id_at_least (const IdType minimum)
 
bool contains (const IdType id) const
 
const absl::flat_hash_set< IdType > & RelatedConstraints (const VariableId variable_id) const
 
std::vector< IdTypeConstraints () const
 
std::vector< IdTypeSortedConstraints () const
 
google::protobuf::Map< int64_t, ProtoTypeProto () const
 
const ConstraintData & data (const IdType id) const
 
bool diff_is_empty (const Diff &diff) const
 
ConstraintData::UpdatesProtoType Update (const Diff &diff) const
 
void AdvanceCheckpointInDiff (Diff &diff) const
 

Member Typedef Documentation

◆ IdType

using IdType = typename ConstraintData::IdType

Definition at line 72 of file atomic_constraint_storage.h.

◆ ProtoType

using ProtoType = typename ConstraintData::ProtoType

Definition at line 73 of file atomic_constraint_storage.h.

◆ UpdatesProtoType

using UpdatesProtoType = typename ConstraintData::UpdatesProtoType

Definition at line 74 of file atomic_constraint_storage.h.

Member Function Documentation

◆ AddConstraint()

AtomicConstraintStorage< ConstraintData >::IdType AddConstraint ( ConstraintData  constraint)

Definition at line 188 of file atomic_constraint_storage.h.

◆ AddConstraints()

void AddConstraints ( const google::protobuf::Map< int64_t, ProtoType > &  constraints)

Definition at line 200 of file atomic_constraint_storage.h.

◆ AdvanceCheckpointInDiff()

void AdvanceCheckpointInDiff ( Diff diff) const

Definition at line 269 of file atomic_constraint_storage.h.

◆ Constraints()

std::vector< typename AtomicConstraintStorage< ConstraintData >::IdType > Constraints

Definition at line 246 of file atomic_constraint_storage.h.

◆ contains()

bool contains ( const IdType  id) const
inline

Definition at line 119 of file atomic_constraint_storage.h.

◆ data()

const ConstraintData& data ( const IdType  id) const
inline

Definition at line 146 of file atomic_constraint_storage.h.

◆ Delete()

void Delete ( IdType  id,
const iterator_range< DiffIter > &  diffs 
)

Definition at line 214 of file atomic_constraint_storage.h.

◆ DeleteVariable()

void DeleteVariable ( VariableId  variable_id)

Definition at line 232 of file atomic_constraint_storage.h.

◆ diff_is_empty()

bool diff_is_empty ( const Diff diff) const
inline

Definition at line 263 of file atomic_constraint_storage.h.

◆ ensure_next_id_at_least()

void ensure_next_id_at_least ( const IdType  minimum)
inline

Definition at line 114 of file atomic_constraint_storage.h.

◆ next_id()

IdType next_id ( ) const
inline

Definition at line 111 of file atomic_constraint_storage.h.

◆ Proto()

google::protobuf::Map<int64_t, ProtoType> Proto ( ) const
inline

Definition at line 136 of file atomic_constraint_storage.h.

◆ RelatedConstraints()

const absl::flat_hash_set<IdType>& RelatedConstraints ( const VariableId  variable_id) const
inline

Definition at line 121 of file atomic_constraint_storage.h.

◆ size()

int64_t size ( ) const
inline

Definition at line 108 of file atomic_constraint_storage.h.

◆ SortedConstraints()

std::vector< typename AtomicConstraintStorage< ConstraintData >::IdType > SortedConstraints

Definition at line 256 of file atomic_constraint_storage.h.

◆ Update()

ConstraintData::UpdatesProtoType Update ( const Diff diff) const

Definition at line 277 of file atomic_constraint_storage.h.


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