00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
#ifndef LEMON_SKELETON_GRAPH_H
00018
#define LEMON_SKELETON_GRAPH_H
00019
00023
00024
#include <lemon/invalid.h>
00025
#include <lemon/skeletons/maps.h>
00026
00027
namespace lemon {
00028
namespace skeleton {
00029
00032
00034
00048 class StaticGraph
00049 {
00050
public:
00052
00055 StaticGraph() { }
00057
00058
00059
00060
00061
00064
00069 class Node {
00070
public:
00072
00075 Node() { }
00077
00080 Node(
const Node&) { }
00081
00083
00086 Node(
Invalid) { }
00088
00091 bool operator==(
Node)
const {
return true; }
00092
00094
00097 bool operator!=(
Node)
const {
return true; }
00098
00100
00106 bool operator<(
Node)
const {
return true; }
00107 };
00108
00110
00118 class NodeIt :
public Node {
00119
public:
00121
00124 NodeIt() { }
00126
00129 NodeIt(
const NodeIt&) { }
00131
00134 NodeIt(
Invalid) { }
00136
00139 NodeIt(
const StaticGraph& g) { }
00141
00146 NodeIt(
const StaticGraph& g,
const Node& n) { }
00148
00151 NodeIt&
operator++() {
return *
this; }
00152 };
00153
00154
00156
00159 class Edge {
00160
public:
00162
00165 Edge() { }
00167
00170 Edge(
const Edge&) { }
00172
00175 Edge(
Invalid) { }
00177
00180 bool operator==(
Edge)
const {
return true; }
00182
00185 bool operator!=(
Edge)
const {
return true; }
00187
00193 bool operator<(
Edge)
const {
return true; }
00194 };
00195
00197
00207
00208 class OutEdgeIt :
public Edge {
00209
public:
00211
00214 OutEdgeIt() { }
00216
00219 OutEdgeIt(
const OutEdgeIt&) { }
00221
00224 OutEdgeIt(
Invalid) { }
00226
00231 OutEdgeIt(
const StaticGraph& g,
const Node& n) { }
00233
00237 OutEdgeIt(
const StaticGraph& g,
const Edge& e) { }
00239
00242 OutEdgeIt&
operator++() {
return *
this; }
00243 };
00244
00246
00256
00257 class InEdgeIt :
public Edge {
00258
public:
00260
00263 InEdgeIt() { }
00265
00268 InEdgeIt(
const InEdgeIt&) { }
00270
00273 InEdgeIt(
Invalid) { }
00275
00280 InEdgeIt(
const StaticGraph& g,
const Node& n) { }
00282
00286 InEdgeIt(
const StaticGraph& g,
const Edge& n) { }
00288
00291 InEdgeIt&
operator++() {
return *
this; }
00292 };
00294
00302 class EdgeIt :
public Edge {
00303
public:
00305
00308 EdgeIt() { }
00310
00313 EdgeIt(
const EdgeIt&) { }
00315
00318 EdgeIt(
Invalid) { }
00320
00324 EdgeIt(
const StaticGraph& g) { }
00326
00330 EdgeIt(
const StaticGraph&,
const Edge&) { }
00332
00335 EdgeIt&
operator++() {
return *
this; }
00336 };
00337
00339
00343 NodeIt&
first(
NodeIt& i)
const {
return i; }
00344
00346
00349 InEdgeIt&
first(
InEdgeIt &i,
Node)
const {
return i; }
00351
00354 OutEdgeIt&
first(
OutEdgeIt& i,
Node)
const {
return i; }
00356
00359 EdgeIt&
first(
EdgeIt& i)
const {
return i; }
00360
00362
00365 Node head(
Edge)
const {
return INVALID; }
00367
00370 Node tail(
Edge)
const {
return INVALID; }
00371
00373
00377 int id(
const Node&)
const {
return 0; }
00379
00383 int id(
const Edge&)
const {
return 0; }
00384
00386
00389 int nodeNum()
const {
return 0; }
00391
00394 int edgeNum()
const {
return 0; }
00395
00396
00398
00404 template<
class T>
class NodeMap :
public ReferenceMap< Node, T >
00405 {
00406
public:
00407
00409 NodeMap(
const StaticGraph&) { }
00411 NodeMap(
const StaticGraph&, T) { }
00412
00414 template<
typename TT>
NodeMap(
const NodeMap<TT>&) { }
00416 template<
typename TT>
NodeMap&
operator=(
const NodeMap<TT>&)
00417 {
return *
this; }
00418 };
00419
00421
00427 template<
class T>
class EdgeMap
00428 :
public ReferenceMap<Edge,T>
00429 {
00430
public:
00431
00433 EdgeMap(
const StaticGraph&) { }
00435 EdgeMap(
const StaticGraph&, T) { }
00436
00438 template<
typename TT>
EdgeMap(
const EdgeMap<TT>&) { }
00440 template<
typename TT>
EdgeMap &
operator=(
const EdgeMap<TT>&)
00441 {
return *
this; }
00442 };
00443 };
00444
00445
00446
00448
00452 class ExtendableGraph :
public StaticGraph
00453 {
00454
public:
00456
00459 ExtendableGraph() { }
00461
00464 Node
addNode() {
return INVALID; }
00466
00470 Edge
addEdge(Node h, Node t) {
return INVALID; }
00471
00473
00477 void clear() { }
00478 };
00479
00481
00484 class ErasableGraph :
public ExtendableGraph
00485 {
00486
public:
00488
00491 ErasableGraph() { }
00493
00496 void erase(Node n) { }
00498
00501 void erase(Edge e) { }
00502 };
00503
00504
00505 }
00506 }
00507
00508
00509
00510
#endif // LEMON_SKELETON_GRAPH_H