
Lists of ranges (intervals) More...
#include <range-list.hpp>
Protected Attributes | |
| int | _min |
| Minimum of range. More... | |
| int | _max |
| Maximum of range. More... | |
Protected Attributes inherited from Gecode::FreeList | |
| FreeList * | _next |
| Pointer to next freelist object. More... | |
Constructors | |
| RangeList (void) | |
| Default constructor (noop) More... | |
| RangeList (int min, int max, RangeList *n) | |
| Initialize with minimum min and maximum max and successor n. More... | |
Access | |
| int | min (void) const |
| Return minimum. More... | |
| int | max (void) const |
| Return maximum. More... | |
| unsigned int | width (void) const |
| Return width (distance between maximum and minimum) More... | |
| RangeList * | next (void) const |
| Return next element. More... | |
Update | |
| void | min (int n) |
| Set minimum to n. More... | |
| void | max (int n) |
| Set maximum to n. More... | |
| void | next (RangeList *n) |
| Set next rane to n. More... | |
Memory management | |
| void | dispose (Space &home, RangeList *l) |
| Free memory for all elements between this and l (inclusive) More... | |
| static void * | operator new (size_t s, Space &home) |
| Allocate memory from space. More... | |
| static void * | operator new (size_t s, void *p) |
| Placement-new operator (noop) More... | |
| static void | operator delete (void *) |
| No-op (for exceptions) More... | |
| static void | operator delete (void *, Space &home) |
| No-op (use dispose instead) More... | |
| static void | operator delete (void *, void *) |
| No-op (use dispose instead) More... | |
Additional Inherited Members | |
Public Member Functions inherited from Gecode::FreeList | |
| FreeList (void) | |
| Use uninitialized. More... | |
| FreeList (FreeList *n) | |
| Initialize with next freelist object n. More... | |
| FreeList * | next (void) const |
| Return next freelist object. More... | |
| FreeList ** | nextRef (void) |
| Return pointer to next link in freelist object. More... | |
| void | next (FreeList *n) |
| Set next freelist object to n. More... | |
Lists of ranges (intervals)
This class implements a simple datastructure for storing sets of integers as lists of ranges (intervals). Memory is managed as space-allocated free lists.
Definition at line 53 of file range-list.hpp.
|
inline |
Default constructor (noop)
Definition at line 117 of file range-list.hpp.
|
inline |
Initialize with minimum min and maximum max and successor n.
Definition at line 120 of file range-list.hpp.
|
inline |
Return minimum.
Definition at line 142 of file range-list.hpp.
|
inline |
Return maximum.
Definition at line 146 of file range-list.hpp.
|
inline |
Return width (distance between maximum and minimum)
Definition at line 150 of file range-list.hpp.
|
inline |
Return next element.
Definition at line 124 of file range-list.hpp.
|
inline |
Set minimum to n.
Definition at line 129 of file range-list.hpp.
|
inline |
Set maximum to n.
Definition at line 133 of file range-list.hpp.
|
inline |
Set next rane to n.
Definition at line 137 of file range-list.hpp.
Free memory for all elements between this and l (inclusive)
Definition at line 179 of file range-list.hpp.
|
inlinestatic |
Allocate memory from space.
Definition at line 169 of file range-list.hpp.
|
inlinestatic |
Placement-new operator (noop)
Definition at line 174 of file range-list.hpp.
|
inlinestatic |
No-op (for exceptions)
Definition at line 156 of file range-list.hpp.
|
inlinestatic |
No-op (use dispose instead)
Definition at line 159 of file range-list.hpp.
|
inlinestatic |
No-op (use dispose instead)
Definition at line 164 of file range-list.hpp.
|
protected |
Minimum of range.
Definition at line 56 of file range-list.hpp.
|
protected |
Maximum of range.
Definition at line 58 of file range-list.hpp.