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/table.cc File Reference

#include <string.h>
#include <algorithm>
#include "base/hash.h"
#include <string>
#include <vector>
#include "base/commandlineflags.h"
#include "base/integral_types.h"
#include "base/logging.h"
#include "base/scoped_ptr.h"
#include "base/stringprintf.h"
#include "base/concise_iterator.h"
#include "base/map-util.h"
#include "constraint_solver/constraint_solver.h"
#include "constraint_solver/constraint_solveri.h"
#include "util/bitset.h"
#include "util/tuple_set.h"

Go to the source code of this file.

Namespaces

namespace  operations_research

Functions

 DEFINE_bool (cp_use_compact_table, true,"Use compact table constraint when possible.")
 Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License.
 DEFINE_bool (cp_use_small_table, true,"Use small compact table constraint when possible.")
bool operations_research::HasCompactDomains (const IntVar *const *vars, int arity)

Variables

static const int operations_research::kBitsInUint64 = 64


Function Documentation

DEFINE_bool ( cp_use_small_table  ,
true  ,
"Use small compact table constraint when possible."   
)

DEFINE_bool ( cp_use_compact_table  ,
true  ,
"Use compact table constraint when possible."   
)

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License.

You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

This file implements the table constraints.


Variable Documentation

Bitset of active tuples.

Todo:
TODO(user): create bitset64 class and use it.

Definition at line 285 of file table.cc.

const int arity_

Definition at line 100 of file table.cc.

Demon* demon_

Definition at line 603 of file table.cc.

std::vector<std::vector<int> > ends_

The ends of the active bitsets.x.

Definition at line 598 of file table.cc.

std::vector<int64> final_states_

Vector of final state after the last transision.

Definition at line 940 of file table.cc.

scoped_array<IntVarIterator*> holes_

Definition at line 104 of file table.cc.

const int64 initial_state_

The initial state before the first transition.

Definition at line 938 of file table.cc.

scoped_array<IntVarIterator*> iterators_

Definition at line 105 of file table.cc.

const int kNextStatePosition [static]

Definition at line 850 of file table.cc.

const int kStatePosition [static]

Definition at line 849 of file table.cc.

const int kTransitionTupleSize [static]

Definition at line 851 of file table.cc.

const int length_

Length of bitsets in double words.

Definition at line 283 of file table.cc.

scoped_array<uint64*> masks_

The masks per value per variable.

Definition at line 287 of file table.cc.

scoped_array<int64> original_min_

The min on the vars at creation time.

Definition at line 594 of file table.cc.

uint64 stamp_

Stamp of the active_tuple bitset.

Definition at line 802 of file table.cc.

scoped_array<uint64> stamps_

Array of stamps, one per 64 tuples.

Definition at line 286 of file table.cc.

std::vector<std::vector<int> > starts_

The starts of active bitsets.

Definition at line 596 of file table.cc.

std::vector<std::vector<int> > supports_

The portion of the active tuples supporting each value per variable.

Definition at line 602 of file table.cc.

scoped_array<uint64> temp_mask_

A temporary mask use for computation.

Definition at line 600 of file table.cc.

std::vector<int64> to_remove_

Definition at line 106 of file table.cc.

const IntTupleSet transition_table_

The transition as tuples (state, value, next_state).

Definition at line 936 of file table.cc.

const int tuple_count_

Definition at line 99 of file table.cc.

const IntTupleSet tuples_

All allowed tuples.

Definition at line 103 of file table.cc.

const std::vector<IntVar*> vars_

Variable representing transitions between states. See header file.

Definition at line 101 of file table.cc.