Generated on Mon Aug 25 11:35:51 2008 for Gecode by doxygen 1.5.6

Gecode::Int::GCC::PartialSum< Card > Class Template Reference

List of all members.


Detailed Description

template<class Card>
class Gecode::Int::GCC::PartialSum< Card >

Partial sum structure for constant time computation of the maximal capacity of an interval.

Definition at line 235 of file gccbndsup.icc.


Access

int firstValue
 Compute the maximum capacity of an interval I.
int lastValue
 Compute the maximum capacity of an interval I.
int sumup (int, int)
 Compute the maximum capacity of an interval I.
int minValue (void)
 Returns the smallest bound of the variables in x.
int maxValue (void)
 Returns the largest bound of the variables in x.
int skipNonNullElementsRight (int)
 Skip neigboured array entries if their values do not differ.
int skipNonNullElementsLeft (int)
 Skip neigboured array entries if their values do not differ.
void * operator new (size_t s)
 Memory allocation for the partial sum structure.
void operator delete (void *p)
 Free memory used by partial sum structure.
void print (void)
 Debugging: print a partial sum structure.
bool check_update_max (ViewArray< Card > &k)
 Check whether the values in the partial sum structure containting the upper cardinality bounds differ from the actual upper bounds of the cardinalities.
bool check_update_min (ViewArray< Card > &k)
 Check whether the values in the partial sum structure containting the lower cardinality bounds differ from the actual lower bounds of the cardinalities.
int getsize (void) const
 Return the size of the partial sum structure.
size_t allocated (void) const
 Compute the maximum capacity of an interval I.

Constructors and destructors

 PartialSum (int, int, ViewArray< Card > &, bool)
 Default initialization.
 ~PartialSum (void)
 Default destructor.

Constructor & Destructor Documentation

template<class Card>
Gecode::Int::GCC::PartialSum< Card >::PartialSum ( int  first,
int  count,
ViewArray< Card > &  elements,
bool  up 
) [inline]

Default initialization.

Parameters:
first is the miminum value the variables can take
count is equal to the size $ |k| $, where k denotes the array of cardinalities used in the global cardinality propagator
elements contains the upper and lower cardinalities for every value
up denotes the direction whether we sumup the lower or upper cardinality bounds If up is true we sumup the upper bounds, otherwise the lower bounds.

Definition at line 311 of file gccbndsup.icc.

template<class Card>
Gecode::Int::GCC::PartialSum< Card >::~PartialSum ( void   )  [inline]

Default destructor.

Definition at line 278 of file gccbndsup.icc.


Member Function Documentation

template<class Card>
int Gecode::Int::GCC::PartialSum< Card >::sumup ( int  from,
int  to 
) [inline]

Compute the maximum capacity of an interval I.

Definition at line 388 of file gccbndsup.icc.

template<class Card>
int Gecode::Int::GCC::PartialSum< Card >::minValue ( void   )  [inline]

Returns the smallest bound of the variables in x.

Definition at line 402 of file gccbndsup.icc.

template<class Card>
int Gecode::Int::GCC::PartialSum< Card >::maxValue ( void   )  [inline]

Returns the largest bound of the variables in x.

Definition at line 413 of file gccbndsup.icc.

template<class Card>
int Gecode::Int::GCC::PartialSum< Card >::skipNonNullElementsRight ( int  value  )  [inline]

Skip neigboured array entries if their values do not differ.

Definition at line 425 of file gccbndsup.icc.

template<class Card>
int Gecode::Int::GCC::PartialSum< Card >::skipNonNullElementsLeft ( int  value  )  [inline]

Skip neigboured array entries if their values do not differ.

Definition at line 437 of file gccbndsup.icc.

template<class Card>
void * Gecode::Int::GCC::PartialSum< Card >::operator new ( size_t  s  )  [inline]

Memory allocation for the partial sum structure.

Definition at line 286 of file gccbndsup.icc.

template<class Card>
void Gecode::Int::GCC::PartialSum< Card >::operator delete ( void *  p  )  [inline]

Free memory used by partial sum structure.

Definition at line 293 of file gccbndsup.icc.

template<class Card>
void Gecode::Int::GCC::PartialSum< Card >::print ( void   )  [inline]

Debugging: print a partial sum structure.

Definition at line 445 of file gccbndsup.icc.

template<class Card>
bool Gecode::Int::GCC::PartialSum< Card >::check_update_max ( ViewArray< Card > &  k  )  [inline]

Check whether the values in the partial sum structure containting the upper cardinality bounds differ from the actual upper bounds of the cardinalities.

Definition at line 481 of file gccbndsup.icc.

template<class Card>
bool Gecode::Int::GCC::PartialSum< Card >::check_update_min ( ViewArray< Card > &  k  )  [inline]

Check whether the values in the partial sum structure containting the lower cardinality bounds differ from the actual lower bounds of the cardinalities.

Definition at line 504 of file gccbndsup.icc.

template<class Card>
int Gecode::Int::GCC::PartialSum< Card >::getsize ( void   )  const [inline]

Return the size of the partial sum structure.

Definition at line 520 of file gccbndsup.icc.

template<class Card>
size_t Gecode::Int::GCC::PartialSum< Card >::allocated ( void   )  const [inline]

Compute the maximum capacity of an interval I.

Definition at line 525 of file gccbndsup.icc.


Member Data Documentation

template<class Card>
int Gecode::Int::GCC::PartialSum< Card >::firstValue

Compute the maximum capacity of an interval I.

Definition at line 258 of file gccbndsup.icc.

template<class Card>
int Gecode::Int::GCC::PartialSum< Card >::lastValue

Compute the maximum capacity of an interval I.

Definition at line 259 of file gccbndsup.icc.


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