Skip to content
This repository has been archived by the owner on Apr 23, 2019. It is now read-only.

CgcTerminology

Stefan Vigerske edited this page Apr 23, 2019 · 1 revision

Cgc Terminology

Here are the terms you will see in the Cgc Wiki documentation as well as in the code:

Node:: Often called a vertex, or point. It is normally represented by a circle. In a transportation Network, these might be locations or cities on a map

Arc:: Often called an edge, or arrow. It may be either directed or undirected. The head is the destination, the tail is the origin. The head and tail are Nodes that are at either end. In a transportation network, the Arcs might be roads, or navigation channels in rivers, or aircraft flight patterns. They supply connectivity between the Nodes. A one-way street might be represented by a directed arc. A two-way street might be an undirected arc or by two directed arcs that point in opposite directions.

iterator:: An iterator provides a mechanism for accessing Nodes sequentially. With STL, you can have a collection of ints in an array called: vector < int > myVector. An iterator to this collection would be declared vector < int > ::iterator ;

const_iterator:: A constant reference version of an iterator. The user cannot alter the value referred to by the iterator.

arc_iterator:: An arc_iterator allows the user to access arcs of the network sequentially. The arcs may be accessed using two different means. One way is to sequentially access all the arcs in the network. The other is to access all the arcs at one node. Both have a common iterator type. The only real difference is the test for the end of iteration. If you want to iterate across a node's arcs, you use begin() and end() member functions of the node. If you wish to iterate through a network's arcs, you use the arc_begin() and arc_end() member functions.

const_arc_iterator:: A constant reference version of an arc_iterator. The user cannot alter the arc referred to by the iterator.

algorithm:: An algorithm is a series of steps that will accomplish a certain task with some (hopefully known) space and time complexity. A solver using the Cgc collections can be implemented similar to STL algorithms. This means that if you follow the common interface between different Cgc collections, then the algorithm can perform (maybe with different complexity) on any appropriate Cgc network with very little modification. A demonstration is included to show how this might be accomplished.