Generated on Sat Aug 25 2012 15:53:10 for Gecode by doxygen 1.7.5
Gecode::Int::TaskTree Class Reference

Task trees for task views with node type Node. More...

#include <task.hh>

List of all members.

Protected Member Functions

int n_inner (void) const
 Return number of inner nodes.
int n_nodes (void) const
 Return number of nodes for balanced binary tree.
bool n_leaf (int i) const
 Whether node i is leaf.
Node & leaf (int i)
 Return leaf for task i.
const Node & root (void) const
 Return root node.
void update (int i, bool l=true)
 Update tree after leaf for task i has changed (l whether i refers to a leaf)
void init (void)
 Initialize tree after leaves have been initialized.
void update (void)
 Update all inner nodes of tree after leaves have been initialized.
 TaskTree (Region &r, const TaskViewArray< TaskView > &t)
 Initialize tree for tasks t.
template<class Node2 >
 TaskTree (Region &r, const TaskTree< TaskView, Node2 > &t)
 Initialize tree using tree t.

Static Protected Member Functions

static bool n_root (int i)
 Whether node i is index of root.
static int n_left (int i)
 Return index of left child of node i.
static bool left (int i)
 Test whether node i is a left child.
static int n_right (int i)
 Return index of right child of node i.
static bool right (int i)
 Test whether node i is a right child.
static int n_parent (int i)
 Return index of parent of node i.

Protected Attributes

const TaskViewArray< TaskView > & tasks
 The tasks from which the tree is computed.
Node * node
 Task nodes.
int * _leaf
 Map task number to leaf node number in right order.

Detailed Description

Task trees for task views with node type Node.


Constructor & Destructor Documentation

Gecode::Int::TaskTree::TaskTree ( Region r,
const TaskViewArray< TaskView > &  t 
) [inline, protected]

Initialize tree for tasks t.

Definition at line 151 of file tree.hpp.

template<class Node2 >
Gecode::Int::TaskTree::TaskTree ( Region r,
const TaskTree< TaskView, Node2 > &  t 
) [inline, protected]

Initialize tree using tree t.

Definition at line 178 of file tree.hpp.


Member Function Documentation

int Gecode::Int::TaskTree::n_inner ( void  ) const [inline, protected]

Return number of inner nodes.

Definition at line 62 of file tree.hpp.

int Gecode::Int::TaskTree::n_nodes ( void  ) const [inline, protected]

Return number of nodes for balanced binary tree.

Definition at line 67 of file tree.hpp.

bool Gecode::Int::TaskTree::n_root ( int  i) [inline, static, protected]

Whether node i is index of root.

Definition at line 73 of file tree.hpp.

bool Gecode::Int::TaskTree::n_leaf ( int  i) const [inline, protected]

Whether node i is leaf.

Definition at line 78 of file tree.hpp.

int Gecode::Int::TaskTree::n_left ( int  i) [inline, static, protected]

Return index of left child of node i.

Definition at line 83 of file tree.hpp.

bool Gecode::Int::TaskTree::left ( int  i) [inline, static, protected]

Test whether node i is a left child.

Definition at line 88 of file tree.hpp.

int Gecode::Int::TaskTree::n_right ( int  i) [inline, static, protected]

Return index of right child of node i.

Definition at line 95 of file tree.hpp.

bool Gecode::Int::TaskTree::right ( int  i) [inline, static, protected]

Test whether node i is a right child.

Definition at line 100 of file tree.hpp.

int Gecode::Int::TaskTree::n_parent ( int  i) [inline, static, protected]

Return index of parent of node i.

Definition at line 107 of file tree.hpp.

Node & Gecode::Int::TaskTree::leaf ( int  i) [inline, protected]

Return leaf for task i.

Definition at line 113 of file tree.hpp.

const Node & Gecode::Int::TaskTree::root ( void  ) const [inline, protected]

Return root node.

Definition at line 119 of file tree.hpp.

void Gecode::Int::TaskTree::update ( int  i,
bool  l = true 
) [inline, protected]

Update tree after leaf for task i has changed (l whether i refers to a leaf)

Definition at line 139 of file tree.hpp.

void Gecode::Int::TaskTree::init ( void  ) [inline, protected]

Initialize tree after leaves have been initialized.

Definition at line 125 of file tree.hpp.

void Gecode::Int::TaskTree::update ( void  ) [inline, protected]

Update all inner nodes of tree after leaves have been initialized.

Definition at line 132 of file tree.hpp.


Member Data Documentation

const TaskViewArray<TaskView>& Gecode::Int::TaskTree::tasks [protected]

The tasks from which the tree is computed.

Definition at line 369 of file task.hh.

Node* Gecode::Int::TaskTree::node [protected]

Task nodes.

Definition at line 371 of file task.hh.

int* Gecode::Int::TaskTree::_leaf [protected]

Map task number to leaf node number in right order.

Definition at line 373 of file task.hh.


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