Google OR-Tools v9.11
a fast and portable software suite for combinatorial optimization
|
#include <stddef.h>
#include <functional>
#include <iosfwd>
#include <ostream>
#include <type_traits>
#include "absl/base/port.h"
#include "absl/strings/string_view.h"
#include "ortools/base/macros.h"
Go to the source code of this file.
Classes | |
class | gtl::IntType< IntTypeName, _ValueType > |
struct | gtl::IntType< IntTypeName, _ValueType >::Hasher |
struct | std::hash< gtl::IntType< IntTypeName, ValueType > > |
Namespaces | |
namespace | gtl |
namespace | std |
STL namespace. | |
Macros | |
#define | DEFINE_INT_TYPE(int_type_name, value_type) |
#define | INT_TYPE_ASSIGNMENT_OP(op) |
#define | INT_TYPE_ARITHMETIC_OP(op) |
#define | INT_TYPE_COMPARISON_OP(op) |
Functions | |
template<typename IntTypeName , typename ValueType > | |
std::ostream & | gtl::operator<< (std::ostream &os, IntType< IntTypeName, ValueType > arg) |
gtl::INT_TYPE_ARITHMETIC_OP (+) | |
gtl::INT_TYPE_ARITHMETIC_OP (-) | |
INT_TYPE_ARITHMETIC_OP * | gtl::INT_TYPE_ARITHMETIC_OP (/);INT_TYPE_ARITHMETIC_OP(<< |
gtl::INT_TYPE_ARITHMETIC_OP (> >) | |
gtl::INT_TYPE_ARITHMETIC_OP (%) | |
gtl::INT_TYPE_COMPARISON_OP (==) | |
gtl::INT_TYPE_COMPARISON_OP (!=) | |
gtl::INT_TYPE_COMPARISON_OP (<=) | |
gtl::INT_TYPE_COMPARISON_OP (>=) | |
Variables | |
class gtl::IntType | gtl::ABSL_ATTRIBUTE_PACKED |
#define DEFINE_INT_TYPE | ( | int_type_name, | |
value_type ) |
Defines the IntType using value_type and typedefs it to int_type_name. The struct int_type_name ## tag trickery is needed to ensure that a new type is created per int_type_name.
Definition at line 167 of file int_type.h.
#define INT_TYPE_ARITHMETIC_OP | ( | op | ) |
– NON-MEMBER ARITHMETIC OPERATORS ---------------------------------------— We support only the +, -, *, and / operators with the same IntType and ValueType types. The reason is to allow simple manipulation on these IDs when used as indices in vectors and arrays.
NB: Although it is possible to do IntType * IntType and IntType / IntType, it is probably non-sensical from a dimensionality analysis perspective.
Definition at line 297 of file int_type.h.
#define INT_TYPE_ASSIGNMENT_OP | ( | op | ) |
– ASSIGNMENT OPERATORS ------------------------------------------------— We support the following assignment operators: =, +=, -=, *=, /=, <<=, >>= and %= for both ThisType and ValueType.
Definition at line 250 of file int_type.h.
#define INT_TYPE_COMPARISON_OP | ( | op | ) |
– NON-MEMBER COMPARISON OPERATORS ---------------------------------------— Static inline comparison operators. We allow all comparison operators among the following types (OP \in [==, !=, <, <=, >, >=]: IntType<IntTypeName, ValueType> OP IntType<IntTypeName, ValueType> IntType<IntTypeName, ValueType> OP ValueType ValueType OP IntType<IntTypeName, ValueType>
Definition at line 331 of file int_type.h.