Generated on Mon Nov 30 23:53:45 2009 for Gecode by doxygen 1.6.1

Gecode::ViewArray< Int::Linear::NoView > Class Template Reference

View array for no view (empty). More...

#include <int-noview.hpp>

List of all members.

Constructors and initialization



 ViewArray (void)
 Default constructor (array of size 0).
 ViewArray (Space &home, int m)
 Allocate array with m variables.
 ViewArray (const ViewArray< Int::Linear::NoView > &)
 Initialize.
 ViewArray (Space &, const ViewArray< Int::Linear::NoView > &)
 Initialize.
const ViewArray
< Int::Linear::NoView > & 
operator= (const ViewArray< Int::Linear::NoView > &)
 Initialize.

Array size



int size (void) const
 Return size of array (number of elements).
void size (int n)
 Decrease size of array (number of elements).

Array elements



Int::Linear::NoView operator[] (int i)
 Return view at position i.

Dependencies



void subscribe (Space &, Propagator &p, PropCond pc, bool process=true)
 Subscribe propagator p with propagation condition pc to all views.
void cancel (Space &home, Propagator &p, PropCond pc)
 Cancel subscription of propagator p with propagation condition pc to all views.

Cloning



void update (Space &, bool share, ViewArray< Int::Linear::NoView > &a)
 Update array to be a clone of array a.

Moving elements



void move_fst (int i)
 Move assigned view from position 0 to position i (shift elements to the left).
void move_lst (int i)
 Move assigned view from position size()-1 to position i (truncate array by one).
void move_fst (int i, Propagator &p, PropCond pc)
 Move view from position 0 to position i (shift elements to the left).
void move_lst (int i, Propagator &p, PropCond pc)
 Move view from position size()-1 to position i (truncate array by one).

Dropping elements



void drop_fst (int i)
 Drop assigned views from positions 0 to i-1 from array.
void drop_lst (int i)
 Drop assigned views from positions i+1 to size()-1 from array.
void drop_fst (int i, Propagator &p, PropCond pc)
 Drop views from positions 0 to i-1 from array.
void drop_lst (int i, Propagator &p, PropCond pc)
 Drop assigned views from positions i+1 to size()-1 from array.

View equality



bool equal (void) const
 Test whether array has equal views.
bool equal (const Int::Linear::NoView &y) const
 Test whether array contains view equal to y.
void unique (void)
 Remove all duplicate views from array (changes element order).

View sharing



bool shared (void) const
 Test whether array has shared views.
bool shared (const Int::Linear::NoView &y) const
 Test whether array contains view shared with y.

Detailed Description

template<>
class Gecode::ViewArray< Int::Linear::NoView >

View array for no view (empty).

Definition at line 218 of file int-noview.hpp.


Constructor & Destructor Documentation

Gecode::ViewArray< Int::Linear::NoView >::ViewArray ( void   )  [inline]

Default constructor (array of size 0).

Definition at line 223 of file int-noview.hpp.

Gecode::ViewArray< Int::Linear::NoView >::ViewArray ( Space home,
int  m 
) [inline]

Allocate array with m variables.

Definition at line 225 of file int-noview.hpp.

Initialize.

Definition at line 227 of file int-noview.hpp.

Initialize.

Definition at line 229 of file int-noview.hpp.


Member Function Documentation

Initialize.

Definition at line 231 of file int-noview.hpp.

int Gecode::ViewArray< Int::Linear::NoView >::size ( void   )  const [inline]

Return size of array (number of elements).

Definition at line 237 of file int-noview.hpp.

void Gecode::ViewArray< Int::Linear::NoView >::size ( int  n  )  [inline]

Decrease size of array (number of elements).

Definition at line 239 of file int-noview.hpp.

Int::Linear::NoView Gecode::ViewArray< Int::Linear::NoView >::operator[] ( int  i  )  [inline]

Return view at position i.

Definition at line 245 of file int-noview.hpp.

void Gecode::ViewArray< Int::Linear::NoView >::subscribe ( Space ,
Propagator p,
PropCond  pc,
bool  process = true 
) [inline]

Subscribe propagator p with propagation condition pc to all views.

Definition at line 255 of file int-noview.hpp.

void Gecode::ViewArray< Int::Linear::NoView >::cancel ( Space home,
Propagator p,
PropCond  pc 
) [inline]

Cancel subscription of propagator p with propagation condition pc to all views.

Definition at line 259 of file int-noview.hpp.

void Gecode::ViewArray< Int::Linear::NoView >::update ( Space ,
bool  share,
ViewArray< Int::Linear::NoView > &  a 
) [inline]

Update array to be a clone of array a.

If share is true, sharing is retained for all shared data structures. Otherwise, for each of them an independent copy is created.

Definition at line 273 of file int-noview.hpp.

void Gecode::ViewArray< Int::Linear::NoView >::move_fst ( int  i  )  [inline]

Move assigned view from position 0 to position i (shift elements to the left).

Definition at line 281 of file int-noview.hpp.

void Gecode::ViewArray< Int::Linear::NoView >::move_lst ( int  i  )  [inline]

Move assigned view from position size()-1 to position i (truncate array by one).

Definition at line 283 of file int-noview.hpp.

void Gecode::ViewArray< Int::Linear::NoView >::move_fst ( int  i,
Propagator p,
PropCond  pc 
) [inline]

Move view from position 0 to position i (shift elements to the left).

Before moving, cancel subscription of propagator p with propagation condition pc to view at position i.

Definition at line 289 of file int-noview.hpp.

void Gecode::ViewArray< Int::Linear::NoView >::move_lst ( int  i,
Propagator p,
PropCond  pc 
) [inline]

Move view from position size()-1 to position i (truncate array by one).

Before moving, cancel subscription of propagator p with propagation condition pc to view at position i.

Definition at line 297 of file int-noview.hpp.

void Gecode::ViewArray< Int::Linear::NoView >::drop_fst ( int  i  ) 

Drop assigned views from positions 0 to i-1 from array.

void Gecode::ViewArray< Int::Linear::NoView >::drop_lst ( int  i  ) 

Drop assigned views from positions i+1 to size()-1 from array.

void Gecode::ViewArray< Int::Linear::NoView >::drop_fst ( int  i,
Propagator p,
PropCond  pc 
) [inline]

Drop views from positions 0 to i-1 from array.

Before moving, cancel subscription of propagator p with propagation condition pc to views at positions 0 to i-1.

Definition at line 313 of file int-noview.hpp.

void Gecode::ViewArray< Int::Linear::NoView >::drop_lst ( int  i,
Propagator p,
PropCond  pc 
) [inline]

Drop assigned views from positions i+1 to size()-1 from array.

Before moving, cancel subscription of propagator p with propagation condition pc to views at positions i+1 to size()-1.

Definition at line 322 of file int-noview.hpp.

bool Gecode::ViewArray< Int::Linear::NoView >::equal ( void   )  const [inline]

Test whether array has equal views.

Definition at line 330 of file int-noview.hpp.

bool Gecode::ViewArray< Int::Linear::NoView >::equal ( const Int::Linear::NoView y  )  const [inline]

Test whether array contains view equal to y.

Definition at line 332 of file int-noview.hpp.

void Gecode::ViewArray< Int::Linear::NoView >::unique ( void   )  [inline]

Remove all duplicate views from array (changes element order).

Definition at line 337 of file int-noview.hpp.

bool Gecode::ViewArray< Int::Linear::NoView >::shared ( void   )  const [inline]

Test whether array has shared views.

Definition at line 343 of file int-noview.hpp.

bool Gecode::ViewArray< Int::Linear::NoView >::shared ( const Int::Linear::NoView y  )  const [inline]

Test whether array contains view shared with y.

Definition at line 345 of file int-noview.hpp.


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