Generated on: Thu Mar 29 07:46:58 PDT 2012 for custom file set
// doxy/ or-tools/ src/ constraint_solver/

or-tools/src/constraint_solver/element.cc File Reference

#include <string.h>
#include <algorithm>
#include <string>
#include <vector>
#include "base/callback.h"
#include "base/integral_types.h"
#include "base/logging.h"
#include "base/scoped_ptr.h"
#include "base/stringprintf.h"
#include "constraint_solver/constraint_solver.h"
#include "constraint_solver/constraint_solveri.h"
#include "util/const_int_array.h"
#include "util/string_array.h"

Go to the source code of this file.

Namespaces

namespace  operations_research

Defines

#define UPDATE_BASE_ELEMENT_INDEX_BOUNDS(test)
#define UPDATE_ELEMENT_INDEX_BOUNDS(test)

Functions

void operations_research::LinkVarExpr (Solver *const s, IntExpr *const expr, IntVar *const var)
 IntExprElement.
IntVar * operations_research::BuildDomainIntVar (Solver *const solver, std::vector< int64 > *values)
 IntExprElement.
IntExpr * operations_research::BuildElement (Solver *const solver, ConstIntArray *values, IntVar *const index)
 Solver::MakeElement(int array, int var).


Define Documentation

#define UPDATE_BASE_ELEMENT_INDEX_BOUNDS ( test   ) 

Value:

const int64 emin = ExprMin();                 \
  const int64 emax = ExprMax();                 \
  int64 nmin = emin;                            \
  int64 value = ElementValue(nmin);             \
  while (nmin < emax && test) {                 \
    nmin++;                                     \
    value = ElementValue(nmin);                 \
  }                                             \
  if (nmin == emax && test) {                   \
    solver()->Fail();                           \
  }                                             \
  int64 nmax = emax;                            \
  value = ElementValue(nmax);                   \
  while (nmax >= nmin && test) {                \
    nmax--;                                     \
    value = ElementValue(nmax);                 \
  }                                             \
  expr_->SetRange(nmin, nmax);

Definition at line 100 of file element.cc.

#define UPDATE_ELEMENT_INDEX_BOUNDS ( test   ) 

Definition at line 872 of file element.cc.


Variable Documentation

const bool delete_

Definition at line 596 of file element.cc.

IntVar* const expr1_

Definition at line 818 of file element.cc.

IntVarIterator* const expr1_iterator_

Definition at line 828 of file element.cc.

IntVar* const expr2_

Definition at line 819 of file element.cc.

IntVarIterator* const expr2_iterator_

Definition at line 829 of file element.cc.

IntVar* const expr_

Definition at line 58 of file element.cc.

IntVarIterator* const expr_iterator_

Definition at line 68 of file element.cc.

IntVar* const index_

Definition at line 263 of file element.cc.

IntVarIterator* const index_iterator_

Definition at line 264 of file element.cc.

bool initial_update_ [mutable]

Definition at line 67 of file element.cc.

int64 max_ [mutable]

Definition at line 65 of file element.cc.

Definition at line 824 of file element.cc.

Definition at line 825 of file element.cc.

Definition at line 66 of file element.cc.

int64 min_ [mutable]

Definition at line 63 of file element.cc.

Definition at line 821 of file element.cc.

Definition at line 822 of file element.cc.

Definition at line 64 of file element.cc.

int size_

Definition at line 1053 of file element.cc.

std::vector<int64> to_remove_

Definition at line 265 of file element.cc.

scoped_ptr<ResultCallback2<int64, int64, int64> > values_

Definition at line 262 of file element.cc.

IntVar* const var_

Definition at line 1236 of file element.cc.

scoped_array<IntVar*> vars_

Definition at line 1052 of file element.cc.