Generated on Thu Jan 16 2025 00:00:00 for Gecode by doxygen 1.14.0
Gecode::ViewArray< Int::Linear::NoView > Class Reference

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

#include <int-noview.hpp>

(Note that these are not member symbols.)

bool shared (ViewArray< ViewX > x, ViewArray< ViewY > y)
 Test whether array x together with array y contains shared views.
bool shared (ViewArray< ViewX > x, ViewY y)
 Test whether array x contains a view shared with y.
bool shared (ViewX x, ViewArray< ViewY > y)
 Test whether array y contains a view shared with x.
bool shared (ViewArray< Int::Linear::NoView > x)
 Test whether array x contains shared views.
std::basic_ostream< Char, Traits > & operator<< (std::basic_ostream< Char, Traits > &os, const ViewArray< Int::Linear::NoView > &x)
 Print array elements enclosed in curly brackets.

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.
const Int::Linear::NoView operator[] (int i) const
 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.
void reschedule (Space &home, Propagator &p, PropCond pc)
 Schedule propagator p.

Cloning

void update (Space &home, 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)

Array iteration

iterator begin (void)
 Return an iterator at the beginning of the array.
iterator end (void)
 Return an iterator past the end of the array.
reverse_iterator rbegin (void)
 Return a reverse iterator at the end of the array.
reverse_iterator rend (void)
 Return a reverse iterator past the beginning of the array.

Dropping elements

void drop_fst (int i)
 Drop views from positions 0 to i-1 from array.
void drop_lst (int i)
 Drop views from positions i+1 to size()-1 from array.
bool assigned (void) const
 Test if all variables are assigned.

View equality

bool same (void) const
 Test whether array has multiple occurence of the same view.
void unique (void)
 Remove all duplicate views from array (changes element order)

Associated types

typedef Int::Linear::NoView value_type
 Type of the view stored in this array.
typedef Int::Linear::NoViewreference
 Type of a reference to the value type.
typedef const Int::Linear::NoViewconst_reference
 Type of a constant reference to the value type.
typedef Int::Linear::NoViewpointer
 Type of a pointer to the value type.
typedef const Int::Linear::NoViewconst_pointer
 Type of a read-only pointer to the value type.
typedef Int::Linear::NoViewiterator
 Type of the iterator used to iterate through this array's elements.
typedef const Int::Linear::NoViewconst_iterator
 Type of the iterator used to iterate read-only through this array's elements.
typedef std::reverse_iterator< Int::Linear::NoView * > reverse_iterator
 Type of the iterator used to iterate backwards through this array's elements.
typedef std::reverse_iterator< const Int::Linear::NoView * > const_reverse_iterator
 Type of the iterator used to iterate backwards and read-only through this array's elements.

Detailed Description

View array for no view (empty)

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

Member Typedef Documentation

◆ value_type

Type of the view stored in this array.

Definition at line 263 of file array.hpp.

◆ reference

Type of a reference to the value type.

Definition at line 265 of file array.hpp.

◆ const_reference

typedef const Int::Linear::NoView& Gecode::ViewArray< Int::Linear::NoView >::const_reference

Type of a constant reference to the value type.

Definition at line 267 of file array.hpp.

◆ pointer

Type of a pointer to the value type.

Definition at line 269 of file array.hpp.

◆ const_pointer

typedef const Int::Linear::NoView* Gecode::ViewArray< Int::Linear::NoView >::const_pointer

Type of a read-only pointer to the value type.

Definition at line 271 of file array.hpp.

◆ iterator

Type of the iterator used to iterate through this array's elements.

Definition at line 273 of file array.hpp.

◆ const_iterator

typedef const Int::Linear::NoView* Gecode::ViewArray< Int::Linear::NoView >::const_iterator

Type of the iterator used to iterate read-only through this array's elements.

Definition at line 275 of file array.hpp.

◆ reverse_iterator

typedef std::reverse_iterator<Int::Linear::NoView*> Gecode::ViewArray< Int::Linear::NoView >::reverse_iterator

Type of the iterator used to iterate backwards through this array's elements.

Definition at line 277 of file array.hpp.

◆ const_reverse_iterator

typedef std::reverse_iterator<const Int::Linear::NoView*> Gecode::ViewArray< Int::Linear::NoView >::const_reverse_iterator

Type of the iterator used to iterate backwards and read-only through this array's elements.

Definition at line 279 of file array.hpp.

Constructor & Destructor Documentation

◆ ViewArray() [1/4]

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

Default constructor (array of size 0)

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

◆ ViewArray() [2/4]

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

Allocate array with m variables.

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

◆ ViewArray() [3/4]

Initialize.

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

◆ ViewArray() [4/4]

Gecode::ViewArray< Int::Linear::NoView >::ViewArray ( Space & ,
const ViewArray< Int::Linear::NoView > &  )
inline

Initialize.

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

Member Function Documentation

◆ operator=()

Initialize.

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

◆ size() [1/2]

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

Return size of array (number of elements)

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

◆ size() [2/2]

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

Decrease size of array (number of elements)

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

◆ operator[]() [1/2]

Return view at position i.

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

◆ operator[]() [2/2]

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

Return view at position i.

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

◆ subscribe()

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 208 of file int-noview.hpp.

◆ cancel()

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 212 of file int-noview.hpp.

◆ reschedule()

void Gecode::ViewArray< Int::Linear::NoView >::reschedule ( Space & home,
Propagator & p,
PropCond pc )
inline

Schedule propagator p.

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

◆ update()

void Gecode::ViewArray< Int::Linear::NoView >::update ( Space & home,
ViewArray< Int::Linear::NoView > & a )
inline

Update array to be a clone of array a.

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

◆ move_fst()

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 232 of file int-noview.hpp.

◆ move_lst()

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 234 of file int-noview.hpp.

◆ begin()

Return an iterator at the beginning of the array.

Definition at line 355 of file array.hpp.

◆ end()

Return an iterator past the end of the array.

Definition at line 359 of file array.hpp.

◆ rbegin()

Return a reverse iterator at the end of the array.

Definition at line 363 of file array.hpp.

◆ rend()

Return a reverse iterator past the beginning of the array.

Definition at line 367 of file array.hpp.

◆ drop_fst()

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

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

Definition at line 435 of file array.hpp.

◆ drop_lst()

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

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

Definition at line 437 of file array.hpp.

◆ assigned()

bool Gecode::ViewArray< Int::Linear::NoView >::assigned ( void ) const
inline

Test if all variables are assigned.

Definition at line 466 of file array.hpp.

◆ same()

bool Gecode::ViewArray< Int::Linear::NoView >::same ( void ) const

Test whether array has multiple occurence of the same view.

Note that assigned views are ignored.

Definition at line 475 of file array.hpp.

◆ unique()

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

Remove all duplicate views from array (changes element order)

Definition at line 483 of file array.hpp.

◆ shared() [1/4]

bool shared ( ViewArray< ViewX > x,
ViewArray< ViewY > y )
related

Test whether array x together with array y contains shared views.

Note that assigned views are ignored.

Definition at line 498 of file array.hpp.

◆ shared() [2/4]

bool shared ( ViewArray< ViewX > x,
ViewY y )
related

Test whether array x contains a view shared with y.

Note that assigned views are ignored.

Definition at line 506 of file array.hpp.

◆ shared() [3/4]

bool shared ( ViewX x,
ViewArray< ViewY > y )
related

Test whether array y contains a view shared with x.

Note that assigned views are ignored.

Definition at line 514 of file array.hpp.

◆ shared() [4/4]

bool shared ( ViewArray< Int::Linear::NoView > x)
related

Test whether array x contains shared views.

Note that assigned views are ignored.

Definition at line 522 of file array.hpp.

◆ operator<<()

std::basic_ostream< Char, Traits > & operator<< ( std::basic_ostream< Char, Traits > & os,
const ViewArray< Int::Linear::NoView > & x )
related

Print array elements enclosed in curly brackets.

Definition at line 864 of file array.hpp.


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