Changes between Version 2 and Version 3 of CgcTechnology
 Timestamp:
 Nov 4, 2006 1:12:23 PM (15 years ago)
Legend:
 Unmodified
 Added
 Removed
 Modified

CgcTechnology
v2 v3 10 10 There are some difficulties in building containers for Networks that do not arise with normal containers. Normal containers have a single data type (or structure or class) that are collected together and maybe compared or sorted, etc. In the case of a Network, there are two related/distinct types: Nodes and Arcs. The Arcs refer to Nodes, but otherwise, they are somewhat independent. 11 11 12 In the implementation of Networks in C oinGraphClasses, every CoinGraphClassescontainer has a collection of Nodes. The Nodes are containers for their outbound Arcs. (In some implementations, there are backarcs too). Also, there may be data on the Nodes and there may be data on the arcs. Unlike normal containers, this may be different data types.12 In the implementation of Networks in Cgc, every Cgc container has a collection of Nodes. The Nodes are containers for their outbound Arcs. (In some implementations, there are backarcs too). Also, there may be data on the Nodes and there may be data on the arcs. Unlike normal containers, this may be different data types. 13 13 14 Maybe a simple example would help. In a simple Shortest Path problem, there are locations (nodes) and distances between them (represented by durations or distances on the arcs). The goal is to find the shortest way between two locations using only the distances specified(arcs). Clearly, there must be some way of storing the duration/distance of the arc on the arc. Also, in most algorithms, there must be some way of storing information regarding the 'current status of a solution at the nodes. The graph container template arguments (Node Info and ArcInfo) allow the algorithm developer to specify their own storage and behavior.14 Maybe a simple example would help. In a simple Shortest Path problem, there are locations (nodes) and distances between them (represented by durations or distances on the arcs). The goal is to find the shortest way between two locations using only the distances specified(arcs). Clearly, there must be some way of storing the duration/distance of the arc on the arc. Also, in most algorithms, there must be some way of storing information regarding the 'current status of a solution at the nodes. The graph container template arguments (Node Info and Arc Info) allow the algorithm developer to specify their own storage and behavior. 15 15