Lists of ranges (intervals) More...
#include <var-imp.hpp>
Protected Attributes | |
int | _min |
Minimum of range. | |
int | _max |
Maximum of range. | |
Protected Attributes inherited from Gecode::FreeList | |
FreeList * | _next |
Pointer to next freelist object. |
Constructors | |
RangeList (void) | |
Default constructor (noop) | |
RangeList (int min, int max) | |
Initialize with minimum min and maximum max. | |
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) | |
RangeList * | next (const RangeList *p) const |
Return next element (from previous p) | |
RangeList * | prev (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) | |
void | dispose (Space &home, RangeList *l) |
Free memory for all elements between this and l (inclusive) | |
void | dispose (Space &home) |
Free memory for this element. | |
static void * | operator new (size_t s, Space &home) |
Allocate memory from space. | |
static void * | operator new (size_t s, void *p) |
Placement new. | |
static void | operator delete (void *) |
No-op (for exceptions) | |
static void | operator delete (void *, Space &) |
No-op (use dispose instead) | |
static void | operator delete (void *, void *) |
No-op (use dispose instead) |
Additional Inherited Members | |
Public Member Functions inherited from Gecode::FreeList | |
FreeList (void) | |
Use uninitialized. | |
FreeList (FreeList *n) | |
Initialize with next freelist object n. | |
FreeList * | next (void) const |
Return next freelist object. | |
FreeList ** | nextRef (void) |
Return pointer to next link in freelist object. | |
void | next (FreeList *n) |
Set next freelist object to n. |
Lists of ranges (intervals)
Range lists are doubly-linked storing the pointer to both the next and the previous element in a single pointer. That means that the next element is only available when the previous element is supplied as additional information. The same holds true for access to the previous element.
Definition at line 102 of file var-imp.hpp.
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
|
protected |
Minimum of range.
Definition at line 105 of file var-imp.hpp.
|
protected |
Maximum of range.
Definition at line 107 of file var-imp.hpp.