Virtually the same definitions can be made for the other element types, replacing Vertex with Edge, Cell etc. Therefore, Vertex Grid Range is chosen to stand sui generis for Edge Grid Range, Cell Grid Range and so on.
The Vertex Grid Range concept is seldom useful as such; its primary use is to define further refinements of the basic Grid Range concept: Useful concrete grid types generally will be models of (at least) two different range concepts, such as Vertex Grid Range and Grid Cell Sequence.
Name | Expression | Description |
Vertex | R::Vertex | type of vertex (model of Grid Vertex) |
handle | R::vertex_handle |
handle type
corresponding to R::Vertex
model of Grid Vertex Handle (R::Vertex::handle_type is identical to R::vertex_handle) |
Vertex iterator | R::VertexIterator |
type of the Sequence Iterator
corresponding to R::Vertex
model of Grid Vertex Iterator (R::Vertex is identical to R::VertexIterator::Vertex) |
Name | Expression | Type requirements | return type |
start of sequence | vi = r.FirstVertex() | VertexIterator | |
end of sequence | vi = r.EndVertex() | VertexIterator | |
size of sequenceX | r.NumOfVertices() | size_type | |
handle-to-element conversion | v = r.vertex(h) | Vertex | |
element-to-handle conversion | h = r.handle(v) | vertex_handle | |
Name | Expression | Precondition | Semantics | Postcondition |
start of sequence | v = r.FirstVertex() | return iterator pointing to the first vertex of s | v is valid, or v == r.EndVertex() | |
end of sequence | v = r.EndVertex() | v is past-the-end. | ||
size of sequence | n = r.NumOfVertices() | get the number of vertices of s | n == distance(r.FirstVertex(), r.EndVertex()) | |
handle-to-element | v = r.vertex(h) | h is a handle of r.TheGrid() | Construct the vertex corresponding to the handle h | r.handle(v) == h |
element-to-handle | h = r.handle(v) | v is a vertex of r.TheGrid() | Construct the vertex corresponding to the handle h | r.element(h) == v |