|
Camargue
|
Simple utility struct for storing an interval of nodes. More...
#include <util.hpp>

Public Member Functions | |
| Segment ()=default | |
| Default construct a Segment. More... | |
| Segment (int lo, int hi) | |
| Construct a Segment with specified start and end point. More... | |
| int | size () const |
| Size of the Segment. More... | |
| bool | contains (int vx) const |
| Does the Segment contain a certain vertex. More... | |
| bool | subset_of (const Segment &seg) const |
| Is one Segment a subset of the other. More... | |
| bool | operator> (const Segment &rhs) const |
| Compare segments by size and then start point. More... | |
| bool | operator== (const Segment &rhs) const |
| Equality operator. More... | |
Public Attributes | |
| int | start |
| The start index of the Segment. More... | |
| int | end |
| The end index of the Segment. More... | |
Simple utility struct for storing an interval of nodes.
A Segment is defined in terms of some list of nodes, usually a tsp tour. If tour is the nodelist, then a Segment S defined relative to tour represents the nodes tour[S.start], ..., tour[S.end]. Thus a Segment is meaningless without a tour from which to be dereferenced.
|
default |
Default construct a Segment.
|
inline |
Construct a Segment with specified start and end point.
|
inline |
|
inline |
Equality operator.
|
inline |
Compare segments by size and then start point.
|
inline |
Size of the Segment.
This is the number of the nodes in the closed interval from start to end.
|
inline |
| int CMR::Segment::end |
The end index of the Segment.
| int CMR::Segment::start |
The start index of the Segment.
1.8.11