Google OR-Tools v9.11
a fast and portable software suite for combinatorial optimization
Loading...
Searching...
No Matches
operations_research::fz::Annotation Struct Reference

#include <model.h>

Public Types

enum  Type {
  ANNOTATION_LIST , IDENTIFIER , FUNCTION_CALL , INT_VALUE ,
  INT_LIST , INTERVAL , VAR_REF , VAR_REF_ARRAY ,
  STRING_VALUE
}
 

Public Member Functions

std::string DebugString () const
 
bool IsFunctionCallWithIdentifier (absl::string_view identifier) const
 
void AppendAllVariables (std::vector< Variable * > *vars) const
 

Static Public Member Functions

static Annotation Empty ()
 --— Annotation --—
 
static Annotation AnnotationList (std::vector< Annotation > list)
 
static Annotation Identifier (absl::string_view id)
 
static Annotation FunctionCallWithArguments (absl::string_view id, std::vector< Annotation > args)
 
static Annotation FunctionCall (absl::string_view id)
 
static Annotation Interval (int64_t interval_min, int64_t interval_max)
 
static Annotation IntegerValue (int64_t value)
 
static Annotation IntegerList (const std::vector< int64_t > &values)
 
static Annotation VarRef (Variable *var)
 
static Annotation VarRefArray (std::vector< Variable * > variables)
 
static Annotation String (absl::string_view str)
 

Public Attributes

Type type
 
int64_t interval_min
 
int64_t interval_max
 
std::string id
 
std::vector< Annotationannotations
 
std::vector< Variable * > variables
 
std::vector< int64_t > values
 
std::string string_value
 

Detailed Description

An annotation is a set of information. It has two use cases. One during parsing to store intermediate information on model objects (i.e. the defines part of a constraint). The other use case is to store all search declarations. This persists after model parsing.

Definition at line 261 of file model.h.

Member Enumeration Documentation

◆ Type

Enumerator
ANNOTATION_LIST 
IDENTIFIER 
FUNCTION_CALL 
INT_VALUE 
INT_LIST 
INTERVAL 
VAR_REF 
VAR_REF_ARRAY 
STRING_VALUE 

Definition at line 262 of file model.h.

Member Function Documentation

◆ AnnotationList()

Annotation operations_research::fz::Annotation::AnnotationList ( std::vector< Annotation > list)
static

Definition at line 838 of file model.cc.

◆ AppendAllVariables()

void operations_research::fz::Annotation::AppendAllVariables ( std::vector< Variable * > * vars) const

Copy all the variable references contained in this annotation (and its children). Depending on the type of this annotation, there can be zero, one, or several.

Definition at line 926 of file model.cc.

◆ DebugString()

std::string operations_research::fz::Annotation::DebugString ( ) const

Definition at line 935 of file model.cc.

◆ Empty()

Annotation operations_research::fz::Annotation::Empty ( )
static

--— Annotation --—

Definition at line 830 of file model.cc.

◆ FunctionCall()

Annotation operations_research::fz::Annotation::FunctionCall ( absl::string_view id)
static

Definition at line 867 of file model.cc.

◆ FunctionCallWithArguments()

Annotation operations_research::fz::Annotation::FunctionCallWithArguments ( absl::string_view id,
std::vector< Annotation > args )
static

Definition at line 856 of file model.cc.

◆ Identifier()

Annotation operations_research::fz::Annotation::Identifier ( absl::string_view id)
static

Definition at line 847 of file model.cc.

◆ IntegerList()

Annotation operations_research::fz::Annotation::IntegerList ( const std::vector< int64_t > & values)
static

Definition at line 891 of file model.cc.

◆ IntegerValue()

Annotation operations_research::fz::Annotation::IntegerValue ( int64_t value)
static

Definition at line 884 of file model.cc.

◆ Interval()

Annotation operations_research::fz::Annotation::Interval ( int64_t interval_min,
int64_t interval_max )
static

Definition at line 876 of file model.cc.

◆ IsFunctionCallWithIdentifier()

bool operations_research::fz::Annotation::IsFunctionCallWithIdentifier ( absl::string_view identifier) const
inline

Definition at line 288 of file model.h.

◆ String()

Annotation operations_research::fz::Annotation::String ( absl::string_view str)
static

Definition at line 917 of file model.cc.

◆ VarRef()

Annotation operations_research::fz::Annotation::VarRef ( Variable * var)
static

Definition at line 899 of file model.cc.

◆ VarRefArray()

Annotation operations_research::fz::Annotation::VarRefArray ( std::vector< Variable * > variables)
static

Definition at line 908 of file model.cc.

Member Data Documentation

◆ annotations

std::vector<Annotation> operations_research::fz::Annotation::annotations

Definition at line 300 of file model.h.

◆ id

std::string operations_research::fz::Annotation::id

Definition at line 299 of file model.h.

◆ interval_max

int64_t operations_research::fz::Annotation::interval_max

Definition at line 298 of file model.h.

◆ interval_min

int64_t operations_research::fz::Annotation::interval_min

Definition at line 297 of file model.h.

◆ string_value

std::string operations_research::fz::Annotation::string_value

Definition at line 303 of file model.h.

◆ type

Type operations_research::fz::Annotation::type

Definition at line 296 of file model.h.

◆ values

std::vector<int64_t> operations_research::fz::Annotation::values

Definition at line 302 of file model.h.

◆ variables

std::vector<Variable*> operations_research::fz::Annotation::variables

Definition at line 301 of file model.h.


The documentation for this struct was generated from the following files: