ibex::CoupleQueue Class Reference
[Other structures]

Propagation queue (agenda). More...

#include <IbexQueue.h>

Inherits ibex::Queue.

List of all members.

Public Member Functions

 CoupleQueue (int nb_ctr, int nb_var)
void push (int ctr, int var)
void pop (int &ctr, int &var)
void flush ()
bool empty () const

Public Attributes

const int nb_ctr
const int nb_var

Friends

std::ostream & operator<< (std::ostream &os, const CoupleQueue &q)


Detailed Description

Propagation queue (agenda).

This class has to be used instead of the STL queue class to avoid pushing twice the same element.

See also:
ibex::Adjacency where propagation algorithms are defined.
Author:
Gilles Chabert
Date:
March 2007

Constructor & Destructor Documentation

ibex::CoupleQueue::CoupleQueue ( int  nb_ctr,
int  nb_var 
) [inline]

Create a propagation queue for variable/constraint pairs.

Parameters:
nb_ctr - The number of constraints.
nb_var - The number of variables.


Member Function Documentation

void ibex::CoupleQueue::push ( int  ctr,
int  var 
) [inline]

Push a pair variable/constraint into the propagation queue.

Precondition:
0 <= ctr < nb_ctr.
0 <= var < nb_var.

void ibex::CoupleQueue::pop ( int &  ctr,
int &  var 
) [inline]

Pop a pair variable/constraint from the propagation queue.

Parameters:
ctr - (out) the popped constraint
var - (out) the popped variable

void ibex::CoupleQueue::flush (  )  [inline]

Flush the propagation queue.

bool ibex::CoupleQueue::empty (  )  const [inline]

Return true if the propagation queue is empty.


Friends And Related Function Documentation

std::ostream& operator<< ( std::ostream &  os,
const CoupleQueue q 
) [friend]

Stream out the queue.


Member Data Documentation

Number of constraints.

Number of variables.


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

Generated on Sun Jun 27 15:52:00 2010 for IBEX by  doxygen 1.5.5