lemon/concept/graph.h
author ladanyi
Tue, 04 Jul 2006 18:53:24 +0000
changeset 2118 54350d5c316a
parent 2111 ea1fa1bc3f6d
child 2120 a907fb95f1e0
permissions -rw-r--r--
Distribute Doxyfile.in and lemon.pc.in.
klao@959
     1
/* -*- C++ -*-
klao@959
     2
 *
alpar@1956
     3
 * This file is a part of LEMON, a generic C++ optimization library
alpar@1956
     4
 *
alpar@1956
     5
 * Copyright (C) 2003-2006
alpar@1956
     6
 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport
alpar@1359
     7
 * (Egervary Research Group on Combinatorial Optimization, EGRES).
klao@959
     8
 *
klao@959
     9
 * Permission to use, modify and distribute this software is granted
klao@959
    10
 * provided that this copyright notice appears in all copies. For
klao@959
    11
 * precise terms see the accompanying LICENSE file.
klao@959
    12
 *
klao@959
    13
 * This software is provided "AS IS" with no warranty of any kind,
klao@959
    14
 * express or implied, and with no claim as to its suitability for any
klao@959
    15
 * purpose.
klao@959
    16
 *
klao@959
    17
 */
klao@959
    18
klao@959
    19
#ifndef LEMON_CONCEPT_GRAPH_H
klao@959
    20
#define LEMON_CONCEPT_GRAPH_H
klao@959
    21
klao@1030
    22
///\ingroup graph_concepts
klao@959
    23
///\file
klao@959
    24
///\brief Declaration of Graph.
klao@959
    25
deba@1993
    26
#include <lemon/bits/invalid.h>
deba@1993
    27
#include <lemon/bits/utility.h>
klao@959
    28
#include <lemon/concept/maps.h>
klao@959
    29
#include <lemon/concept_check.h>
klao@959
    30
#include <lemon/concept/graph_component.h>
klao@959
    31
klao@959
    32
namespace lemon {
klao@959
    33
  namespace concept {
deba@1136
    34
klao@959
    35
    
klao@961
    36
    /**************** The full-featured graph concepts ****************/
klao@959
    37
deba@1136
    38
klao@1760
    39
    // \brief Modular static graph class.
klao@1760
    40
    //     
deba@2111
    41
    // It should be the same as the \c Graph class.
deba@2111
    42
    class _Graph 
klao@961
    43
      :  virtual public BaseGraphComponent,
ladanyi@1426
    44
         public IterableGraphComponent, public MappableGraphComponent {
klao@959
    45
    public:
alpar@1448
    46
klao@959
    47
      typedef BaseGraphComponent::Node Node;
klao@959
    48
      typedef BaseGraphComponent::Edge Edge;
klao@959
    49
deba@989
    50
      template <typename _Graph>
deba@989
    51
      struct Constraints {
ladanyi@1426
    52
        void constraints() {
ladanyi@1426
    53
          checkConcept<IterableGraphComponent, _Graph>();
ladanyi@1426
    54
          checkConcept<MappableGraphComponent, _Graph>();
ladanyi@1426
    55
        }
deba@989
    56
      };
klao@959
    57
    };
klao@959
    58
alpar@1620
    59
    /// \addtogroup graph_concepts
alpar@1620
    60
    /// @{
alpar@1620
    61
alpar@2117
    62
    /// The directed graph concept
alpar@2117
    63
alpar@2117
    64
    /// This class describes the \ref concept "concept" of the
alpar@2117
    65
    /// immutable directed graphs.
deba@1136
    66
    ///
alpar@2117
    67
    /// Note that actual graph implementation like @ref ListGraph or
alpar@2117
    68
    /// @ref SmartGraph may have several additional functionality.
deba@1136
    69
    ///
alpar@2117
    70
    /// \sa concept
deba@2111
    71
    class Graph {
deba@1136
    72
    public:
alpar@1448
    73
      ///\e
alpar@1448
    74
deba@1136
    75
      /// Defalult constructor.
deba@1136
    76
deba@1136
    77
      /// Defalult constructor.
deba@1136
    78
      ///
deba@2111
    79
      Graph() { }
deba@1136
    80
deba@1136
    81
      /// The base type of node iterators, 
deba@1136
    82
      /// or in other words, the trivial node iterator.
deba@1136
    83
deba@1136
    84
      /// This is the base type of each node iterator,
deba@1136
    85
      /// thus each kind of node iterator converts to this.
deba@1136
    86
      /// More precisely each kind of node iterator should be inherited 
deba@1136
    87
      /// from the trivial node iterator.
deba@1136
    88
      class Node {
deba@1136
    89
      public:
ladanyi@1426
    90
        /// Default constructor
deba@1136
    91
ladanyi@1426
    92
        /// @warning The default constructor sets the iterator
ladanyi@1426
    93
        /// to an undefined value.
ladanyi@1426
    94
        Node() { }
ladanyi@1426
    95
        /// Copy constructor.
deba@1136
    96
ladanyi@1426
    97
        /// Copy constructor.
ladanyi@1426
    98
        ///
ladanyi@1426
    99
        Node(const Node&) { }
deba@1136
   100
ladanyi@1426
   101
        /// Invalid constructor \& conversion.
deba@1136
   102
ladanyi@1426
   103
        /// This constructor initializes the iterator to be invalid.
ladanyi@1426
   104
        /// \sa Invalid for more details.
ladanyi@1426
   105
        Node(Invalid) { }
ladanyi@1426
   106
        /// Equality operator
deba@1136
   107
ladanyi@1426
   108
        /// Two iterators are equal if and only if they point to the
ladanyi@1426
   109
        /// same object or both are invalid.
ladanyi@1426
   110
        bool operator==(Node) const { return true; }
deba@1136
   111
ladanyi@1426
   112
        /// Inequality operator
ladanyi@1426
   113
        
ladanyi@1426
   114
        /// \sa operator==(Node n)
ladanyi@1426
   115
        ///
ladanyi@1426
   116
        bool operator!=(Node) const { return true; }
deba@1136
   117
deba@1622
   118
	/// Artificial ordering operator.
deba@1622
   119
	
deba@1622
   120
	/// To allow the use of graph descriptors as key type in std::map or
deba@1622
   121
	/// similar associative container we require this.
deba@1622
   122
	///
deba@1622
   123
	/// \note This operator only have to define some strict ordering of
deba@1622
   124
	/// the items; this order has nothing to do with the iteration
deba@1622
   125
	/// ordering of the items.
deba@1622
   126
	///
deba@1622
   127
	/// \bug This is a technical requirement. Do we really need this?
deba@1622
   128
	bool operator<(Node) const { return false; }
deba@1622
   129
deba@1136
   130
      };
deba@1136
   131
    
deba@1136
   132
      /// This iterator goes through each node.
deba@1136
   133
deba@1136
   134
      /// This iterator goes through each node.
deba@1136
   135
      /// Its usage is quite simple, for example you can count the number
deba@1136
   136
      /// of nodes in graph \c g of type \c Graph like this:
alpar@1946
   137
      ///\code
deba@1136
   138
      /// int count=0;
ladanyi@1426
   139
      /// for (Graph::NodeIt n(g); n!=INVALID; ++n) ++count;
alpar@1946
   140
      ///\endcode
deba@1136
   141
      class NodeIt : public Node {
deba@1136
   142
      public:
ladanyi@1426
   143
        /// Default constructor
deba@1136
   144
ladanyi@1426
   145
        /// @warning The default constructor sets the iterator
ladanyi@1426
   146
        /// to an undefined value.
ladanyi@1426
   147
        NodeIt() { }
ladanyi@1426
   148
        /// Copy constructor.
ladanyi@1426
   149
        
ladanyi@1426
   150
        /// Copy constructor.
ladanyi@1426
   151
        ///
ladanyi@1426
   152
        NodeIt(const NodeIt& n) : Node(n) { }
ladanyi@1426
   153
        /// Invalid constructor \& conversion.
deba@1136
   154
ladanyi@1426
   155
        /// Initialize the iterator to be invalid.
ladanyi@1426
   156
        /// \sa Invalid for more details.
ladanyi@1426
   157
        NodeIt(Invalid) { }
ladanyi@1426
   158
        /// Sets the iterator to the first node.
deba@1136
   159
ladanyi@1426
   160
        /// Sets the iterator to the first node of \c g.
ladanyi@1426
   161
        ///
deba@2111
   162
        NodeIt(const Graph&) { }
ladanyi@1426
   163
        /// Node -> NodeIt conversion.
deba@1136
   164
deba@1470
   165
        /// Sets the iterator to the node of \c the graph pointed by 
deba@1470
   166
	/// the trivial iterator.
ladanyi@1426
   167
        /// This feature necessitates that each time we 
ladanyi@1426
   168
        /// iterate the edge-set, the iteration order is the same.
deba@2111
   169
        NodeIt(const Graph&, const Node&) { }
ladanyi@1426
   170
        /// Next node.
deba@1136
   171
ladanyi@1426
   172
        /// Assign the iterator to the next node.
ladanyi@1426
   173
        ///
ladanyi@1426
   174
        NodeIt& operator++() { return *this; }
deba@1136
   175
      };
deba@1136
   176
    
deba@1136
   177
    
deba@1136
   178
      /// The base type of the edge iterators.
deba@1136
   179
deba@1136
   180
      /// The base type of the edge iterators.
deba@1136
   181
      ///
deba@1136
   182
      class Edge {
deba@1136
   183
      public:
ladanyi@1426
   184
        /// Default constructor
deba@1136
   185
ladanyi@1426
   186
        /// @warning The default constructor sets the iterator
ladanyi@1426
   187
        /// to an undefined value.
ladanyi@1426
   188
        Edge() { }
ladanyi@1426
   189
        /// Copy constructor.
deba@1136
   190
ladanyi@1426
   191
        /// Copy constructor.
ladanyi@1426
   192
        ///
ladanyi@1426
   193
        Edge(const Edge&) { }
ladanyi@1426
   194
        /// Initialize the iterator to be invalid.
deba@1136
   195
ladanyi@1426
   196
        /// Initialize the iterator to be invalid.
ladanyi@1426
   197
        ///
ladanyi@1426
   198
        Edge(Invalid) { }
ladanyi@1426
   199
        /// Equality operator
deba@1136
   200
ladanyi@1426
   201
        /// Two iterators are equal if and only if they point to the
ladanyi@1426
   202
        /// same object or both are invalid.
ladanyi@1426
   203
        bool operator==(Edge) const { return true; }
ladanyi@1426
   204
        /// Inequality operator
deba@1136
   205
alpar@1620
   206
        /// \sa operator==(Edge n)
ladanyi@1426
   207
        ///
ladanyi@1426
   208
        bool operator!=(Edge) const { return true; }
deba@1622
   209
deba@1622
   210
	/// Artificial ordering operator.
deba@1622
   211
	
deba@1622
   212
	/// To allow the use of graph descriptors as key type in std::map or
deba@1622
   213
	/// similar associative container we require this.
deba@1622
   214
	///
deba@1622
   215
	/// \note This operator only have to define some strict ordering of
deba@1622
   216
	/// the items; this order has nothing to do with the iteration
deba@1622
   217
	/// ordering of the items.
deba@1622
   218
	///
deba@1622
   219
	/// \bug This is a technical requirement. Do we really need this?
deba@1622
   220
	bool operator<(Edge) const { return false; }
deba@1136
   221
      };
deba@1136
   222
    
deba@1136
   223
      /// This iterator goes trough the outgoing edges of a node.
deba@1136
   224
deba@1136
   225
      /// This iterator goes trough the \e outgoing edges of a certain node
deba@1136
   226
      /// of a graph.
deba@1136
   227
      /// Its usage is quite simple, for example you can count the number
deba@1136
   228
      /// of outgoing edges of a node \c n
deba@1136
   229
      /// in graph \c g of type \c Graph as follows.
alpar@1946
   230
      ///\code
deba@1136
   231
      /// int count=0;
deba@1136
   232
      /// for (Graph::OutEdgeIt e(g, n); e!=INVALID; ++e) ++count;
alpar@1946
   233
      ///\endcode
deba@1136
   234
    
deba@1136
   235
      class OutEdgeIt : public Edge {
deba@1136
   236
      public:
ladanyi@1426
   237
        /// Default constructor
deba@1136
   238
ladanyi@1426
   239
        /// @warning The default constructor sets the iterator
ladanyi@1426
   240
        /// to an undefined value.
ladanyi@1426
   241
        OutEdgeIt() { }
ladanyi@1426
   242
        /// Copy constructor.
deba@1136
   243
ladanyi@1426
   244
        /// Copy constructor.
ladanyi@1426
   245
        ///
ladanyi@1426
   246
        OutEdgeIt(const OutEdgeIt& e) : Edge(e) { }
ladanyi@1426
   247
        /// Initialize the iterator to be invalid.
deba@1136
   248
ladanyi@1426
   249
        /// Initialize the iterator to be invalid.
ladanyi@1426
   250
        ///
ladanyi@1426
   251
        OutEdgeIt(Invalid) { }
ladanyi@1426
   252
        /// This constructor sets the iterator to the first outgoing edge.
deba@1136
   253
    
ladanyi@1426
   254
        /// This constructor sets the iterator to the first outgoing edge of
ladanyi@1426
   255
        /// the node.
deba@2111
   256
        OutEdgeIt(const Graph&, const Node&) { }
ladanyi@1426
   257
        /// Edge -> OutEdgeIt conversion
deba@1136
   258
deba@1470
   259
        /// Sets the iterator to the value of the trivial iterator.
deba@1470
   260
	/// This feature necessitates that each time we 
ladanyi@1426
   261
        /// iterate the edge-set, the iteration order is the same.
deba@2111
   262
        OutEdgeIt(const Graph&, const Edge&) { }
ladanyi@1426
   263
        ///Next outgoing edge
ladanyi@1426
   264
        
ladanyi@1426
   265
        /// Assign the iterator to the next 
ladanyi@1426
   266
        /// outgoing edge of the corresponding node.
ladanyi@1426
   267
        OutEdgeIt& operator++() { return *this; }
deba@1136
   268
      };
deba@1136
   269
deba@1136
   270
      /// This iterator goes trough the incoming edges of a node.
deba@1136
   271
deba@1136
   272
      /// This iterator goes trough the \e incoming edges of a certain node
deba@1136
   273
      /// of a graph.
deba@1136
   274
      /// Its usage is quite simple, for example you can count the number
deba@1136
   275
      /// of outgoing edges of a node \c n
deba@1136
   276
      /// in graph \c g of type \c Graph as follows.
alpar@1946
   277
      ///\code
deba@1136
   278
      /// int count=0;
deba@1136
   279
      /// for(Graph::InEdgeIt e(g, n); e!=INVALID; ++e) ++count;
alpar@1946
   280
      ///\endcode
deba@1136
   281
deba@1136
   282
      class InEdgeIt : public Edge {
deba@1136
   283
      public:
ladanyi@1426
   284
        /// Default constructor
deba@1136
   285
ladanyi@1426
   286
        /// @warning The default constructor sets the iterator
ladanyi@1426
   287
        /// to an undefined value.
ladanyi@1426
   288
        InEdgeIt() { }
ladanyi@1426
   289
        /// Copy constructor.
deba@1136
   290
ladanyi@1426
   291
        /// Copy constructor.
ladanyi@1426
   292
        ///
ladanyi@1426
   293
        InEdgeIt(const InEdgeIt& e) : Edge(e) { }
ladanyi@1426
   294
        /// Initialize the iterator to be invalid.
deba@1136
   295
ladanyi@1426
   296
        /// Initialize the iterator to be invalid.
ladanyi@1426
   297
        ///
ladanyi@1426
   298
        InEdgeIt(Invalid) { }
ladanyi@1426
   299
        /// This constructor sets the iterator to first incoming edge.
deba@1136
   300
    
ladanyi@1426
   301
        /// This constructor set the iterator to the first incoming edge of
ladanyi@1426
   302
        /// the node.
deba@2111
   303
        InEdgeIt(const Graph&, const Node&) { }
ladanyi@1426
   304
        /// Edge -> InEdgeIt conversion
deba@1136
   305
ladanyi@1426
   306
        /// Sets the iterator to the value of the trivial iterator \c e.
ladanyi@1426
   307
        /// This feature necessitates that each time we 
ladanyi@1426
   308
        /// iterate the edge-set, the iteration order is the same.
deba@2111
   309
        InEdgeIt(const Graph&, const Edge&) { }
ladanyi@1426
   310
        /// Next incoming edge
deba@1136
   311
ladanyi@1426
   312
        /// Assign the iterator to the next inedge of the corresponding node.
ladanyi@1426
   313
        ///
ladanyi@1426
   314
        InEdgeIt& operator++() { return *this; }
deba@1136
   315
      };
deba@1136
   316
      /// This iterator goes through each edge.
deba@1136
   317
deba@1136
   318
      /// This iterator goes through each edge of a graph.
deba@1136
   319
      /// Its usage is quite simple, for example you can count the number
deba@1136
   320
      /// of edges in a graph \c g of type \c Graph as follows:
alpar@1946
   321
      ///\code
deba@1136
   322
      /// int count=0;
deba@1136
   323
      /// for(Graph::EdgeIt e(g); e!=INVALID; ++e) ++count;
alpar@1946
   324
      ///\endcode
deba@1136
   325
      class EdgeIt : public Edge {
deba@1136
   326
      public:
ladanyi@1426
   327
        /// Default constructor
deba@1136
   328
ladanyi@1426
   329
        /// @warning The default constructor sets the iterator
ladanyi@1426
   330
        /// to an undefined value.
ladanyi@1426
   331
        EdgeIt() { }
ladanyi@1426
   332
        /// Copy constructor.
deba@1136
   333
ladanyi@1426
   334
        /// Copy constructor.
ladanyi@1426
   335
        ///
ladanyi@1426
   336
        EdgeIt(const EdgeIt& e) : Edge(e) { }
ladanyi@1426
   337
        /// Initialize the iterator to be invalid.
deba@1136
   338
ladanyi@1426
   339
        /// Initialize the iterator to be invalid.
ladanyi@1426
   340
        ///
ladanyi@1426
   341
        EdgeIt(Invalid) { }
ladanyi@1426
   342
        /// This constructor sets the iterator to the first edge.
deba@1136
   343
    
ladanyi@1426
   344
        /// This constructor sets the iterator to the first edge of \c g.
ladanyi@1426
   345
        ///@param g the graph
deba@2111
   346
        EdgeIt(const Graph& g) { ignore_unused_variable_warning(g); }
ladanyi@1426
   347
        /// Edge -> EdgeIt conversion
deba@1136
   348
ladanyi@1426
   349
        /// Sets the iterator to the value of the trivial iterator \c e.
ladanyi@1426
   350
        /// This feature necessitates that each time we 
ladanyi@1426
   351
        /// iterate the edge-set, the iteration order is the same.
deba@2111
   352
        EdgeIt(const Graph&, const Edge&) { } 
ladanyi@1426
   353
        ///Next edge
ladanyi@1426
   354
        
ladanyi@1426
   355
        /// Assign the iterator to the next edge.
ladanyi@1426
   356
        EdgeIt& operator++() { return *this; }
deba@1136
   357
      };
deba@1136
   358
      ///Gives back the target node of an edge.
deba@1136
   359
deba@1136
   360
      ///Gives back the target node of an edge.
deba@1136
   361
      ///
deba@1136
   362
      Node target(Edge) const { return INVALID; }
deba@1136
   363
      ///Gives back the source node of an edge.
deba@1136
   364
deba@1136
   365
      ///Gives back the source node of an edge.
deba@1136
   366
      ///
deba@1136
   367
      Node source(Edge) const { return INVALID; }
deba@1563
   368
deba@1563
   369
      void first(Node&) const {}
deba@1563
   370
      void next(Node&) const {}
deba@1563
   371
deba@1563
   372
      void first(Edge&) const {}
deba@1563
   373
      void next(Edge&) const {}
deba@1563
   374
deba@1563
   375
deba@1563
   376
      void firstIn(Edge&, const Node&) const {}
deba@1563
   377
      void nextIn(Edge&) const {}
deba@1563
   378
deba@1563
   379
      void firstOut(Edge&, const Node&) const {}
deba@1563
   380
      void nextOut(Edge&) const {}
deba@1563
   381
deba@1563
   382
      /// \brief The base node of the iterator.
deba@1563
   383
      ///
deba@1563
   384
      /// Gives back the base node of the iterator.
deba@1627
   385
      /// It is always the target of the pointed edge.
deba@1563
   386
      Node baseNode(const InEdgeIt&) const { return INVALID; }
deba@1563
   387
deba@1563
   388
      /// \brief The running node of the iterator.
deba@1563
   389
      ///
deba@1563
   390
      /// Gives back the running node of the iterator.
deba@1627
   391
      /// It is always the source of the pointed edge.
deba@1563
   392
      Node runningNode(const InEdgeIt&) const { return INVALID; }
deba@1563
   393
deba@1563
   394
      /// \brief The base node of the iterator.
deba@1563
   395
      ///
deba@1563
   396
      /// Gives back the base node of the iterator.
deba@1627
   397
      /// It is always the source of the pointed edge.
deba@1563
   398
      Node baseNode(const OutEdgeIt&) const { return INVALID; }
deba@1563
   399
deba@1563
   400
      /// \brief The running node of the iterator.
deba@1563
   401
      ///
deba@1563
   402
      /// Gives back the running node of the iterator.
deba@1627
   403
      /// It is always the target of the pointed edge.
deba@1563
   404
      Node runningNode(const OutEdgeIt&) const { return INVALID; }
deba@1136
   405
deba@1627
   406
      /// \brief The opposite node on the given edge.
deba@1627
   407
      ///
deba@1627
   408
      /// Gives back the opposite node on the given edge.
deba@1627
   409
      Node oppositeNode(const Node&, const Edge&) const { return INVALID; }
deba@1627
   410
deba@1627
   411
      /// \brief Read write map of the nodes to type \c T.
deba@1627
   412
      /// 
deba@1136
   413
      /// ReadWrite map of the nodes to type \c T.
deba@1136
   414
      /// \sa Reference
deba@1136
   415
      /// \warning Making maps that can handle bool type (NodeMap<bool>)
deba@1136
   416
      /// needs some extra attention!
alpar@1630
   417
      /// \todo Wrong documentation
deba@1136
   418
      template<class T> 
deba@1136
   419
      class NodeMap : public ReadWriteMap< Node, T >
deba@1136
   420
      {
deba@1136
   421
      public:
deba@1136
   422
ladanyi@1426
   423
        ///\e
deba@2111
   424
        NodeMap(const Graph&) { }
ladanyi@1426
   425
        ///\e
deba@2111
   426
        NodeMap(const Graph&, T) { }
deba@1136
   427
ladanyi@1426
   428
        ///Copy constructor
ladanyi@1426
   429
        NodeMap(const NodeMap& nm) : ReadWriteMap< Node, T >(nm) { }
ladanyi@1426
   430
        ///Assignment operator
ladanyi@1426
   431
        NodeMap& operator=(const NodeMap&) { return *this; }
ladanyi@1426
   432
        // \todo fix this concept
deba@1136
   433
      };
deba@1136
   434
deba@1627
   435
      /// \brief Read write map of the edges to type \c T.
deba@1627
   436
      ///
deba@1627
   437
      /// Reference map of the edges to type \c T.
deba@1136
   438
      /// \sa Reference
deba@1136
   439
      /// \warning Making maps that can handle bool type (EdgeMap<bool>)
deba@1136
   440
      /// needs some extra attention!
alpar@1630
   441
      /// \todo Wrong documentation
deba@1136
   442
      template<class T> 
deba@1136
   443
      class EdgeMap : public ReadWriteMap<Edge,T>
deba@1136
   444
      {
deba@1136
   445
      public:
deba@1136
   446
ladanyi@1426
   447
        ///\e
deba@2111
   448
        EdgeMap(const Graph&) { }
ladanyi@1426
   449
        ///\e
deba@2111
   450
        EdgeMap(const Graph&, T) { }
ladanyi@1426
   451
        ///Copy constructor
ladanyi@1426
   452
        EdgeMap(const EdgeMap& em) : ReadWriteMap<Edge,T>(em) { }
ladanyi@1426
   453
        ///Assignment operator
ladanyi@1426
   454
        EdgeMap& operator=(const EdgeMap&) { return *this; }
ladanyi@1426
   455
        // \todo fix this concept    
deba@1136
   456
      };
deba@1136
   457
deba@2111
   458
      template <typename RGraph>
deba@2111
   459
      struct Constraints : public _Graph::Constraints<RGraph> {};
deba@1136
   460
deba@1136
   461
    };
deba@1136
   462
    
klao@959
   463
    // @}
klao@959
   464
  } //namespace concept  
klao@959
   465
} //namespace lemon
klao@959
   466
klao@959
   467
klao@959
   468
klao@959
   469
#endif // LEMON_CONCEPT_GRAPH_H