Generated on Thu Oct 26 14:26:06 2006 for Gecode by doxygen 1.4.7

Gecode::Set::RangeList Class Reference

Inherits Gecode::FreeList.

List of all members.


Detailed Description

Lists of ranges (intervals).

Definition at line 41 of file var.icc.

Constructors

 RangeList (void)
 Default constructor (noop).
 RangeList (int min, int max, RangeList *p, RangeList *n)
 Initialize with minimum min and maximum max and predecessor p and successor n.

Access

int min (void) const
 Return minimum.
int max (void) const
 Return maximum.
unsigned int width (void) const
 Return width (distance between maximum and minimum).
RangeListnext (const RangeList *p) const
 Return next element (from previous p).
RangeListprev (const RangeList *n) const
 Return previous element (from next n).

Update

void min (int n)
 Set minimum to n.
void max (int n)
 Set maximum to n.
void prevnext (RangeList *p, RangeList *n)
 Set previous element to p and next element to n.
void next (RangeList *o, RangeList *n)
 Set next element from o to n.
void prev (RangeList *o, RangeList *n)
 Set previous element from o to n.
void fix (RangeList *n)
 Restore simple link to next element (so that it becomes a true free list).

Memory management

void dispose (Space *home, RangeList *p, RangeList *l)
 Free memory for all elements between this and l (inclusive).
static void * operator new (size_t s, Space *home)
 Allocate memory from space.
static void operator delete (void *)
 No-op (for exceptions).
static void operator delete (void *, Space *home)
 No-op (use dispose instead).

Protected Attributes

int _min
 Minimum of range.
int _max
 Maximum of range.


Constructor & Destructor Documentation

Gecode::Set::RangeList::RangeList ( void   )  [inline]

Default constructor (noop).

Definition at line 37 of file integerset.icc.

Gecode::Set::RangeList::RangeList ( int  min,
int  max,
RangeList p,
RangeList n 
) [inline]

Initialize with minimum min and maximum max and predecessor p and successor n.

Definition at line 40 of file integerset.icc.


Member Function Documentation

int Gecode::Set::RangeList::min ( void   )  const [inline]

Return minimum.

Definition at line 82 of file integerset.icc.

int Gecode::Set::RangeList::max ( void   )  const [inline]

Return maximum.

Definition at line 86 of file integerset.icc.

unsigned int Gecode::Set::RangeList::width ( void   )  const [inline]

Return width (distance between maximum and minimum).

Definition at line 90 of file integerset.icc.

RangeList * Gecode::Set::RangeList::next ( const RangeList p  )  const [inline]

Return next element (from previous p).

Definition at line 46 of file integerset.icc.

RangeList * Gecode::Set::RangeList::prev ( const RangeList n  )  const [inline]

Return previous element (from next n).

Definition at line 50 of file integerset.icc.

void Gecode::Set::RangeList::min ( int  n  )  [inline]

Set minimum to n.

Definition at line 73 of file integerset.icc.

void Gecode::Set::RangeList::max ( int  n  )  [inline]

Set maximum to n.

Definition at line 77 of file integerset.icc.

void Gecode::Set::RangeList::prevnext ( RangeList p,
RangeList n 
) [inline]

Set previous element to p and next element to n.

Definition at line 54 of file integerset.icc.

void Gecode::Set::RangeList::next ( RangeList o,
RangeList n 
) [inline]

Set next element from o to n.

Definition at line 58 of file integerset.icc.

void Gecode::Set::RangeList::prev ( RangeList o,
RangeList n 
) [inline]

Set previous element from o to n.

Definition at line 63 of file integerset.icc.

void Gecode::Set::RangeList::fix ( RangeList n  )  [inline]

Restore simple link to next element (so that it becomes a true free list).

Definition at line 68 of file integerset.icc.

void Gecode::Set::RangeList::dispose ( Space home,
RangeList p,
RangeList l 
) [inline]

Free memory for all elements between this and l (inclusive).

p must be the pointer to the previous element of this.

Definition at line 110 of file integerset.icc.

void * Gecode::Set::RangeList::operator new ( size_t  s,
Space home 
) [inline, static]

Allocate memory from space.

Definition at line 104 of file integerset.icc.

void Gecode::Set::RangeList::operator delete ( void *   )  [inline, static]

No-op (for exceptions).

Definition at line 96 of file integerset.icc.

void Gecode::Set::RangeList::operator delete ( void *  ,
Space home 
) [inline, static]

No-op (use dispose instead).

Definition at line 99 of file integerset.icc.


Member Data Documentation

Minimum of range.

Definition at line 44 of file var.icc.

Maximum of range.

Definition at line 46 of file var.icc.


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