Google OR-Tools v9.15
a fast and portable software suite for combinatorial optimization
Loading...
Searching...
No Matches
operations_research::internal Namespace Reference

Classes

struct  ToUInt
struct  ToUInt< double >
struct  ToUInt< float >
struct  is_strong_int
struct  is_strong_int<::util_intops::StrongInt< Tag, Native, Validator > >
class  ElementGetter
class  PathWithPriority
class  UnderlyingContainerAdapter
class  PathContainerImpl
class  PathTree
class  DistanceContainer
class  InMemoryCompactPathContainer
class  NodeEntry
class  ScipCallbackRunner
class  ScipCallbackRunnerImpl
class  MPSLineInfo
class  UntypedGScipConstraintHandler
class  UntypedGScipConstraintHandlerImpl
struct  ReleaseSCIPMessageHandler
class  ScopedSCIPMessageHandlerDisabler
struct  AllocatorWithAlignment
struct  AlignedBlock

Typedefs

template<typename T>
using to_uint = typename ToUInt<T>::type
template<typename IndexType, typename ValueType>
using IndexedVector
using MessageHandlerPtr

Enumerations

enum class  MPSSectionId {
  kUnknownSection , kName , kObjsense , kRows ,
  kLazycons , kColumns , kRhs , kRanges ,
  kBounds , kIndicators , kEndData
}

Functions

template<class T>
bool IsNanGeneric (const T &)
template<>
bool IsNanGeneric (const float &x)
template<>
bool IsNanGeneric (const double &x)
template<>
bool IsNanGeneric (const long double &x)
template<typename T>
bool AreNumbersOfSameSign (const T &x, const T &y)
template<typename IntT>
constexpr bool UsesTwosComplement ()
uint64_t OneBit64 (int pos)
uint64_t BitPos64 (uint64_t pos)
uint64_t BitOffset64 (uint64_t pos)
uint64_t BitLength64 (uint64_t size)
bool IsBitSet64 (const uint64_t *const bitset, uint64_t pos)
void SetBit64 (uint64_t *const bitset, uint64_t pos)
void ClearBit64 (uint64_t *const bitset, uint64_t pos)
template<typename T>
std::vector< T > GetInversePermutation (const std::vector< T > &permutation)
template<typename Graph>
bool GraphIsConnected (const Graph &graph)
template<class GraphType>
GraphType::ArcIndex FindArcIndex (const GraphType &graph, const typename GraphType::NodeIndex source, const typename GraphType::NodeIndex destination)
template<class GraphType>
std::tuple< std::vector< typename GraphType::NodeIndex >, PathDistanceComputeShortestPath (const GraphType &graph, const std::vector< PathDistance > &arc_lengths, const typename GraphType::NodeIndex source, const typename GraphType::NodeIndex destination)
template<class GraphType>
PathDistance ComputePathLength (const GraphType &graph, const absl::Span< const PathDistance > arc_lengths, const absl::Span< const typename GraphType::NodeIndex > path)
template<typename NodeType>
bool IsValidParent (const NodeType node, const NodeType num_tree_nodes)
template<typename NodeType>
absl::Status IsValidNode (const NodeType node, const NodeType num_tree_nodes)
template<typename NodeType>
std::vector< NodeType > ExtractCycle (absl::Span< const NodeType > parents, const NodeType node_in_cycle)
template<typename NodeType>
std::string CycleErrorMessage (absl::Span< const NodeType > cycle)
template<typename NodeType>
std::vector< NodeType > CheckForCycle (absl::Span< const NodeType > parents, std::vector< NodeType > *topological_order)
template<class NodeIndex, NodeIndex kNilNode>
bool InsertOrUpdateEntry (PathDistance distance, NodeEntry< NodeIndex, kNilNode > *entry, AdjustablePriorityQueue< NodeEntry< NodeIndex, kNilNode > > *priority_queue)
template<class GraphType>
void ComputeOneToManyOnGraph (const GraphType *const graph, const std::vector< PathDistance > *const arc_lengths, typename GraphType::NodeIndex source, const std::vector< typename GraphType::NodeIndex > *const destinations, typename GenericPathContainer< GraphType >::Impl *const paths)
void AddConstraintHandlerImpl (const ScipConstraintHandlerDescription &description, std::unique_ptr< ScipCallbackRunner > runner, SCIP *scip)
void AddCallbackConstraintImpl (SCIP *scip, const std::string &handler_name, const std::string &constraint_name, void *constraint_data, const ScipCallbackConstraintOptions &options)
absl::Status ScipCodeToUtilStatus (int retcode, const char *source_file, int source_line, const char *scip_statement)
template<typename T, typename IndexType>
void ExtendContainerWithValueUntil (const IndexType until, const T extend_with_value, std::vector< T > &container)
absl::Status RegisterConstraintHandler (GScip *gscip, std::unique_ptr< UntypedGScipConstraintHandler > constraint_handler)
absl::StatusOr< SCIP_CONS * > AddCallbackConstraint (GScip *gscip, const std::string &handler_name, const std::string &constraint_name, void *constraint_data, const GScipConstraintOptions &options)
MessageHandlerPtr CaptureMessageHandlerPtr (SCIP_MESSAGEHDLR *const handler)
absl::StatusOr< MessageHandlerPtrMakeSCIPMessageHandler (const GScipMessageHandler gscip_message_handler)
template<typename Proto>
std::vector< Proto > ReadNumRecords (File *file, int expected_num_records)
template<typename Proto>
std::vector< Proto > ReadNumRecords (absl::string_view filename, int expected_num_records)
template<typename Value, size_t size>
void AddInPlace (AlignedBlock< Value, size > &out, const AlignedBlock< Value, size > &in)
template<size_t block_size, size_t num_blocks_per_iteration, typename Value>
AlignedBlock< Value, block_size > ABSL_ATTRIBUTE_NOINLINE AlignedBlockSum (const AlignedBlock< Value, block_size > *blocks, size_t num_blocks)
template<size_t block_size = 4, size_t num_blocks_per_iteration = 4, bool assume_aligned_at_start = false, typename Value>
Value VectorSum (absl::Span< const Value > values)

Variables

const PathDistance kMaxDistance = std::numeric_limits<PathDistance>::max() - 1
const PathDistance kDisconnectedDistance
static constexpr int kNumMpsFields = 6

Typedef Documentation

◆ IndexedVector

template<typename IndexType, typename ValueType>
using operations_research::internal::IndexedVector
Initial value:
std::conditional_t<is_strong_int<IndexType>::value,
std::vector<ValueType>>

Definition at line 78 of file bounded_dijkstra.h.

◆ MessageHandlerPtr

Initial value:
std::unique_ptr<SCIP_MESSAGEHDLR, ReleaseSCIPMessageHandler>

Definition at line 54 of file gscip_message_handler.h.

◆ to_uint

template<typename T>
using operations_research::internal::to_uint = typename ToUInt<T>::type

Definition at line 96 of file radix_sort.h.

Enumeration Type Documentation

◆ MPSSectionId

Enumerator
kUnknownSection 
kName 
kObjsense 
kRows 
kLazycons 
kColumns 
kRhs 
kRanges 
kBounds 
kIndicators 
kEndData 

Definition at line 311 of file mps_reader_template.h.

Function Documentation

◆ AddCallbackConstraint()

absl::StatusOr< SCIP_CONS * > operations_research::internal::AddCallbackConstraint ( GScip * gscip,
const std::string & handler_name,
const std::string & constraint_name,
void * constraint_data,
const GScipConstraintOptions & options )

Definition at line 615 of file gscip_constraint_handler.cc.

◆ AddCallbackConstraintImpl()

void operations_research::internal::AddCallbackConstraintImpl ( SCIP * scip,
const std::string & handler_name,
const std::string & constraint_name,
void * constraint_data,
const ScipCallbackConstraintOptions & options )

Definition at line 438 of file scip_callback.cc.

◆ AddConstraintHandlerImpl()

void operations_research::internal::AddConstraintHandlerImpl ( const ScipConstraintHandlerDescription & description,
std::unique_ptr< ScipCallbackRunner > runner,
SCIP * scip )

Definition at line 414 of file scip_callback.cc.

◆ AddInPlace()

template<typename Value, size_t size>
void operations_research::internal::AddInPlace ( AlignedBlock< Value, size > & out,
const AlignedBlock< Value, size > & in )

Definition at line 54 of file vector_sum_internal.h.

◆ AlignedBlockSum()

template<size_t block_size, size_t num_blocks_per_iteration, typename Value>
AlignedBlock< Value, block_size > ABSL_ATTRIBUTE_NOINLINE operations_research::internal::AlignedBlockSum ( const AlignedBlock< Value, block_size > * blocks,
size_t num_blocks )

Definition at line 84 of file vector_sum_internal.h.

◆ AreNumbersOfSameSign()

template<typename T>
bool operations_research::internal::AreNumbersOfSameSign ( const T & x,
const T & y )

Definition at line 161 of file binary_search.h.

◆ BitLength64()

uint64_t operations_research::internal::BitLength64 ( uint64_t size)
inline

Definition at line 26 of file bitmap.h.

◆ BitOffset64()

uint64_t operations_research::internal::BitOffset64 ( uint64_t pos)
inline

Definition at line 25 of file bitmap.h.

◆ BitPos64()

uint64_t operations_research::internal::BitPos64 ( uint64_t pos)
inline

Definition at line 24 of file bitmap.h.

◆ CaptureMessageHandlerPtr()

MessageHandlerPtr operations_research::internal::CaptureMessageHandlerPtr ( SCIP_MESSAGEHDLR *const handler)

Definition at line 115 of file gscip_message_handler.cc.

◆ CheckForCycle()

template<typename NodeType>
std::vector< NodeType > operations_research::internal::CheckForCycle ( absl::Span< const NodeType > parents,
std::vector< NodeType > * topological_order )

Definition at line 390 of file rooted_tree.h.

◆ ClearBit64()

void operations_research::internal::ClearBit64 ( uint64_t *const bitset,
uint64_t pos )
inline

Definition at line 33 of file bitmap.h.

◆ ComputeOneToManyOnGraph()

template<class GraphType>
void operations_research::internal::ComputeOneToManyOnGraph ( const GraphType *const graph,
const std::vector< PathDistance > *const arc_lengths,
typename GraphType::NodeIndex source,
const std::vector< typename GraphType::NodeIndex > *const destinations,
typename GenericPathContainer< GraphType >::Impl *const paths )

Definition at line 624 of file shortest_paths.h.

◆ ComputePathLength()

template<class GraphType>
PathDistance operations_research::internal::ComputePathLength ( const GraphType & graph,
const absl::Span< const PathDistance > arc_lengths,
const absl::Span< const typename GraphType::NodeIndex > path )

Definition at line 199 of file k_shortest_paths.h.

◆ ComputeShortestPath()

template<class GraphType>
std::tuple< std::vector< typename GraphType::NodeIndex >, PathDistance > operations_research::internal::ComputeShortestPath ( const GraphType & graph,
const std::vector< PathDistance > & arc_lengths,
const typename GraphType::NodeIndex source,
const typename GraphType::NodeIndex destination )

Definition at line 168 of file k_shortest_paths.h.

◆ CycleErrorMessage()

template<typename NodeType>
std::string operations_research::internal::CycleErrorMessage ( absl::Span< const NodeType > cycle)

Definition at line 372 of file rooted_tree.h.

◆ ExtendContainerWithValueUntil()

template<typename T, typename IndexType>
void operations_research::internal::ExtendContainerWithValueUntil ( const IndexType until,
const T extend_with_value,
std::vector< T > & container )

Definition at line 860 of file mps_reader_template.h.

◆ ExtractCycle()

template<typename NodeType>
std::vector< NodeType > operations_research::internal::ExtractCycle ( absl::Span< const NodeType > parents,
const NodeType node_in_cycle )

Definition at line 352 of file rooted_tree.h.

◆ FindArcIndex()

template<class GraphType>
GraphType::ArcIndex operations_research::internal::FindArcIndex ( const GraphType & graph,
const typename GraphType::NodeIndex source,
const typename GraphType::NodeIndex destination )

Definition at line 152 of file k_shortest_paths.h.

◆ GetInversePermutation()

template<typename T>
std::vector< T > operations_research::internal::GetInversePermutation ( const std::vector< T > & permutation)

Definition at line 906 of file dag_constrained_shortest_path.h.

◆ GraphIsConnected()

template<typename Graph>
bool operations_research::internal::GraphIsConnected ( const Graph & graph)

Definition at line 157 of file eulerian_path.h.

◆ InsertOrUpdateEntry()

template<class NodeIndex, NodeIndex kNilNode>
bool operations_research::internal::InsertOrUpdateEntry ( PathDistance distance,
NodeEntry< NodeIndex, kNilNode > * entry,
AdjustablePriorityQueue< NodeEntry< NodeIndex, kNilNode > > * priority_queue )

Definition at line 596 of file shortest_paths.h.

◆ IsBitSet64()

bool operations_research::internal::IsBitSet64 ( const uint64_t *const bitset,
uint64_t pos )
inline

Definition at line 27 of file bitmap.h.

◆ IsNanGeneric() [1/4]

template<>
bool operations_research::internal::IsNanGeneric ( const double & x)
inline

Definition at line 152 of file binary_search.h.

◆ IsNanGeneric() [2/4]

template<>
bool operations_research::internal::IsNanGeneric ( const float & x)
inline

Definition at line 148 of file binary_search.h.

◆ IsNanGeneric() [3/4]

template<>
bool operations_research::internal::IsNanGeneric ( const long double & x)
inline

Definition at line 156 of file binary_search.h.

◆ IsNanGeneric() [4/4]

template<class T>
bool operations_research::internal::IsNanGeneric ( const T & )

Definition at line 143 of file binary_search.h.

◆ IsValidNode()

template<typename NodeType>
absl::Status operations_research::internal::IsValidNode ( const NodeType node,
const NodeType num_tree_nodes )

Definition at line 342 of file rooted_tree.h.

◆ IsValidParent()

template<typename NodeType>
bool operations_research::internal::IsValidParent ( const NodeType node,
const NodeType num_tree_nodes )

Definition at line 336 of file rooted_tree.h.

◆ MakeSCIPMessageHandler()

absl::StatusOr< MessageHandlerPtr > operations_research::internal::MakeSCIPMessageHandler ( const GScipMessageHandler gscip_message_handler)

Definition at line 122 of file gscip_message_handler.cc.

◆ OneBit64()

uint64_t operations_research::internal::OneBit64 ( int pos)
inline

Definition at line 23 of file bitmap.h.

◆ ReadNumRecords() [1/2]

template<typename Proto>
std::vector< Proto > operations_research::internal::ReadNumRecords ( absl::string_view filename,
int expected_num_records )

Definition at line 106 of file file_util.h.

◆ ReadNumRecords() [2/2]

template<typename Proto>
std::vector< Proto > operations_research::internal::ReadNumRecords ( File * file,
int expected_num_records )

Definition at line 79 of file file_util.h.

◆ RegisterConstraintHandler()

absl::Status operations_research::internal::RegisterConstraintHandler ( GScip * gscip,
std::unique_ptr< UntypedGScipConstraintHandler > constraint_handler )

Definition at line 583 of file gscip_constraint_handler.cc.

◆ ScipCodeToUtilStatus()

absl::Status operations_research::internal::ScipCodeToUtilStatus ( int retcode,
const char * source_file,
int source_line,
const char * scip_statement )
inline

Definition at line 24 of file scip_helper_macros.h.

◆ SetBit64()

void operations_research::internal::SetBit64 ( uint64_t *const bitset,
uint64_t pos )
inline

Definition at line 30 of file bitmap.h.

◆ UsesTwosComplement()

template<typename IntT>
bool operations_research::internal::UsesTwosComplement ( )
constexpr

Definition at line 174 of file binary_search.h.

◆ VectorSum()

template<size_t block_size = 4, size_t num_blocks_per_iteration = 4, bool assume_aligned_at_start = false, typename Value>
Value operations_research::internal::VectorSum ( absl::Span< const Value > values)

Definition at line 138 of file vector_sum_internal.h.

Variable Documentation

◆ kDisconnectedDistance

const PathDistance operations_research::internal::kDisconnectedDistance
Initial value:
=
std::numeric_limits<PathDistance>::max()

Definition at line 141 of file k_shortest_paths.h.

◆ kMaxDistance

const PathDistance operations_research::internal::kMaxDistance = std::numeric_limits<PathDistance>::max() - 1

Definition at line 140 of file k_shortest_paths.h.

◆ kNumMpsFields

int operations_research::internal::kNumMpsFields = 6
staticconstexpr

Definition at line 308 of file mps_reader_template.h.