lemon/concepts/digraph.h
author Alpar Juttner <alpar@cs.elte.hu>
Fri, 23 Mar 2018 16:09:06 +0100
branch1.3
changeset 1165 f0f15d07bf51
parent 1092 dceba191c00d
permissions -rw-r--r--
Merge bugfix #609 to branch 1.3
alpar@209
     1
/* -*- mode: C++; indent-tabs-mode: nil; -*-
deba@57
     2
 *
alpar@209
     3
 * This file is a part of LEMON, a generic C++ optimization library.
deba@57
     4
 *
alpar@1092
     5
 * Copyright (C) 2003-2013
deba@57
     6
 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport
deba@57
     7
 * (Egervary Research Group on Combinatorial Optimization, EGRES).
deba@57
     8
 *
deba@57
     9
 * Permission to use, modify and distribute this software is granted
deba@57
    10
 * provided that this copyright notice appears in all copies. For
deba@57
    11
 * precise terms see the accompanying LICENSE file.
deba@57
    12
 *
deba@57
    13
 * This software is provided "AS IS" with no warranty of any kind,
deba@57
    14
 * express or implied, and with no claim as to its suitability for any
deba@57
    15
 * purpose.
deba@57
    16
 *
deba@57
    17
 */
deba@57
    18
deba@529
    19
#ifndef LEMON_CONCEPTS_DIGRAPH_H
deba@529
    20
#define LEMON_CONCEPTS_DIGRAPH_H
deba@57
    21
deba@57
    22
///\ingroup graph_concepts
deba@57
    23
///\file
deba@57
    24
///\brief The concept of directed graphs.
deba@57
    25
deba@220
    26
#include <lemon/core.h>
deba@57
    27
#include <lemon/concepts/maps.h>
deba@57
    28
#include <lemon/concept_check.h>
deba@57
    29
#include <lemon/concepts/graph_components.h>
deba@57
    30
deba@57
    31
namespace lemon {
deba@57
    32
  namespace concepts {
deba@57
    33
deba@57
    34
    /// \ingroup graph_concepts
deba@57
    35
    ///
deba@57
    36
    /// \brief Class describing the concept of directed graphs.
deba@57
    37
    ///
kpeter@734
    38
    /// This class describes the common interface of all directed
kpeter@734
    39
    /// graphs (digraphs).
deba@57
    40
    ///
kpeter@734
    41
    /// Like all concept classes, it only provides an interface
kpeter@734
    42
    /// without any sensible implementation. So any general algorithm for
kpeter@734
    43
    /// directed graphs should compile with this class, but it will not
kpeter@734
    44
    /// run properly, of course.
kpeter@734
    45
    /// An actual digraph implementation like \ref ListDigraph or
kpeter@734
    46
    /// \ref SmartDigraph may have additional functionality.
deba@57
    47
    ///
kpeter@734
    48
    /// \sa Graph
deba@57
    49
    class Digraph {
deba@57
    50
    private:
kpeter@734
    51
      /// Diraphs are \e not copy constructible. Use DigraphCopy instead.
kpeter@734
    52
      Digraph(const Digraph &) {}
kpeter@734
    53
      /// \brief Assignment of a digraph to another one is \e not allowed.
kpeter@734
    54
      /// Use DigraphCopy instead.
kpeter@734
    55
      void operator=(const Digraph &) {}
alpar@209
    56
kpeter@734
    57
    public:
kpeter@734
    58
      /// Default constructor.
kpeter@734
    59
      Digraph() { }
alpar@209
    60
kpeter@734
    61
      /// The node type of the digraph
deba@57
    62
deba@57
    63
      /// This class identifies a node of the digraph. It also serves
deba@57
    64
      /// as a base class of the node iterators,
kpeter@734
    65
      /// thus they convert to this type.
deba@57
    66
      class Node {
deba@57
    67
      public:
deba@57
    68
        /// Default constructor
deba@57
    69
kpeter@734
    70
        /// Default constructor.
kpeter@734
    71
        /// \warning It sets the object to an undefined value.
deba@57
    72
        Node() { }
deba@57
    73
        /// Copy constructor.
deba@57
    74
deba@57
    75
        /// Copy constructor.
deba@57
    76
        ///
deba@57
    77
        Node(const Node&) { }
deba@57
    78
kpeter@734
    79
        /// %Invalid constructor \& conversion.
deba@57
    80
kpeter@734
    81
        /// Initializes the object to be invalid.
deba@57
    82
        /// \sa Invalid for more details.
deba@57
    83
        Node(Invalid) { }
deba@57
    84
        /// Equality operator
deba@57
    85
kpeter@734
    86
        /// Equality operator.
kpeter@734
    87
        ///
deba@57
    88
        /// Two iterators are equal if and only if they point to the
kpeter@734
    89
        /// same object or both are \c INVALID.
deba@57
    90
        bool operator==(Node) const { return true; }
deba@57
    91
deba@57
    92
        /// Inequality operator
alpar@209
    93
kpeter@734
    94
        /// Inequality operator.
deba@57
    95
        bool operator!=(Node) const { return true; }
deba@57
    96
alpar@209
    97
        /// Artificial ordering operator.
alpar@209
    98
kpeter@734
    99
        /// Artificial ordering operator.
alpar@209
   100
        ///
kpeter@734
   101
        /// \note This operator only has to define some strict ordering of
kpeter@734
   102
        /// the nodes; this order has nothing to do with the iteration
kpeter@734
   103
        /// ordering of the nodes.
alpar@209
   104
        bool operator<(Node) const { return false; }
deba@57
   105
      };
alpar@209
   106
kpeter@734
   107
      /// Iterator class for the nodes.
deba@57
   108
kpeter@734
   109
      /// This iterator goes through each node of the digraph.
kpeter@786
   110
      /// Its usage is quite simple, for example, you can count the number
kpeter@734
   111
      /// of nodes in a digraph \c g of type \c %Digraph like this:
deba@57
   112
      ///\code
deba@57
   113
      /// int count=0;
deba@57
   114
      /// for (Digraph::NodeIt n(g); n!=INVALID; ++n) ++count;
deba@57
   115
      ///\endcode
deba@57
   116
      class NodeIt : public Node {
deba@57
   117
      public:
deba@57
   118
        /// Default constructor
deba@57
   119
kpeter@734
   120
        /// Default constructor.
kpeter@734
   121
        /// \warning It sets the iterator to an undefined value.
deba@57
   122
        NodeIt() { }
deba@57
   123
        /// Copy constructor.
alpar@209
   124
deba@57
   125
        /// Copy constructor.
deba@57
   126
        ///
deba@57
   127
        NodeIt(const NodeIt& n) : Node(n) { }
kpeter@734
   128
        /// %Invalid constructor \& conversion.
deba@57
   129
kpeter@734
   130
        /// Initializes the iterator to be invalid.
deba@57
   131
        /// \sa Invalid for more details.
deba@57
   132
        NodeIt(Invalid) { }
deba@57
   133
        /// Sets the iterator to the first node.
deba@57
   134
kpeter@734
   135
        /// Sets the iterator to the first node of the given digraph.
deba@57
   136
        ///
kpeter@734
   137
        explicit NodeIt(const Digraph&) { }
kpeter@734
   138
        /// Sets the iterator to the given node.
deba@57
   139
kpeter@734
   140
        /// Sets the iterator to the given node of the given digraph.
kpeter@734
   141
        ///
deba@57
   142
        NodeIt(const Digraph&, const Node&) { }
deba@57
   143
        /// Next node.
deba@57
   144
deba@57
   145
        /// Assign the iterator to the next node.
deba@57
   146
        ///
deba@57
   147
        NodeIt& operator++() { return *this; }
deba@57
   148
      };
alpar@209
   149
alpar@209
   150
kpeter@734
   151
      /// The arc type of the digraph
deba@57
   152
deba@57
   153
      /// This class identifies an arc of the digraph. It also serves
deba@57
   154
      /// as a base class of the arc iterators,
deba@57
   155
      /// thus they will convert to this type.
deba@57
   156
      class Arc {
deba@57
   157
      public:
deba@57
   158
        /// Default constructor
deba@57
   159
kpeter@734
   160
        /// Default constructor.
kpeter@734
   161
        /// \warning It sets the object to an undefined value.
deba@57
   162
        Arc() { }
deba@57
   163
        /// Copy constructor.
deba@57
   164
deba@57
   165
        /// Copy constructor.
deba@57
   166
        ///
deba@57
   167
        Arc(const Arc&) { }
kpeter@734
   168
        /// %Invalid constructor \& conversion.
deba@57
   169
kpeter@734
   170
        /// Initializes the object to be invalid.
kpeter@734
   171
        /// \sa Invalid for more details.
deba@57
   172
        Arc(Invalid) { }
deba@57
   173
        /// Equality operator
deba@57
   174
kpeter@734
   175
        /// Equality operator.
kpeter@734
   176
        ///
deba@57
   177
        /// Two iterators are equal if and only if they point to the
kpeter@734
   178
        /// same object or both are \c INVALID.
deba@57
   179
        bool operator==(Arc) const { return true; }
deba@57
   180
        /// Inequality operator
deba@57
   181
kpeter@734
   182
        /// Inequality operator.
deba@57
   183
        bool operator!=(Arc) const { return true; }
deba@57
   184
alpar@209
   185
        /// Artificial ordering operator.
alpar@209
   186
kpeter@734
   187
        /// Artificial ordering operator.
alpar@209
   188
        ///
kpeter@734
   189
        /// \note This operator only has to define some strict ordering of
kpeter@734
   190
        /// the arcs; this order has nothing to do with the iteration
kpeter@734
   191
        /// ordering of the arcs.
alpar@209
   192
        bool operator<(Arc) const { return false; }
deba@57
   193
      };
alpar@209
   194
kpeter@734
   195
      /// Iterator class for the outgoing arcs of a node.
deba@57
   196
deba@57
   197
      /// This iterator goes trough the \e outgoing arcs of a certain node
deba@57
   198
      /// of a digraph.
kpeter@786
   199
      /// Its usage is quite simple, for example, you can count the number
deba@57
   200
      /// of outgoing arcs of a node \c n
kpeter@734
   201
      /// in a digraph \c g of type \c %Digraph as follows.
deba@57
   202
      ///\code
deba@57
   203
      /// int count=0;
kpeter@734
   204
      /// for (Digraph::OutArcIt a(g, n); a!=INVALID; ++a) ++count;
deba@57
   205
      ///\endcode
deba@57
   206
      class OutArcIt : public Arc {
deba@57
   207
      public:
deba@57
   208
        /// Default constructor
deba@57
   209
kpeter@734
   210
        /// Default constructor.
kpeter@734
   211
        /// \warning It sets the iterator to an undefined value.
deba@57
   212
        OutArcIt() { }
deba@57
   213
        /// Copy constructor.
deba@57
   214
deba@57
   215
        /// Copy constructor.
deba@57
   216
        ///
deba@57
   217
        OutArcIt(const OutArcIt& e) : Arc(e) { }
kpeter@734
   218
        /// %Invalid constructor \& conversion.
deba@57
   219
kpeter@734
   220
        /// Initializes the iterator to be invalid.
kpeter@734
   221
        /// \sa Invalid for more details.
kpeter@734
   222
        OutArcIt(Invalid) { }
kpeter@734
   223
        /// Sets the iterator to the first outgoing arc.
kpeter@734
   224
kpeter@734
   225
        /// Sets the iterator to the first outgoing arc of the given node.
deba@57
   226
        ///
kpeter@734
   227
        OutArcIt(const Digraph&, const Node&) { }
kpeter@734
   228
        /// Sets the iterator to the given arc.
alpar@209
   229
kpeter@734
   230
        /// Sets the iterator to the given arc of the given digraph.
kpeter@734
   231
        ///
deba@57
   232
        OutArcIt(const Digraph&, const Arc&) { }
kpeter@734
   233
        /// Next outgoing arc
alpar@209
   234
alpar@209
   235
        /// Assign the iterator to the next
deba@57
   236
        /// outgoing arc of the corresponding node.
deba@57
   237
        OutArcIt& operator++() { return *this; }
deba@57
   238
      };
deba@57
   239
kpeter@734
   240
      /// Iterator class for the incoming arcs of a node.
deba@57
   241
deba@57
   242
      /// This iterator goes trough the \e incoming arcs of a certain node
deba@57
   243
      /// of a digraph.
kpeter@786
   244
      /// Its usage is quite simple, for example, you can count the number
kpeter@734
   245
      /// of incoming arcs of a node \c n
kpeter@734
   246
      /// in a digraph \c g of type \c %Digraph as follows.
deba@57
   247
      ///\code
deba@57
   248
      /// int count=0;
kpeter@734
   249
      /// for(Digraph::InArcIt a(g, n); a!=INVALID; ++a) ++count;
deba@57
   250
      ///\endcode
deba@57
   251
      class InArcIt : public Arc {
deba@57
   252
      public:
deba@57
   253
        /// Default constructor
deba@57
   254
kpeter@734
   255
        /// Default constructor.
kpeter@734
   256
        /// \warning It sets the iterator to an undefined value.
deba@57
   257
        InArcIt() { }
deba@57
   258
        /// Copy constructor.
deba@57
   259
deba@57
   260
        /// Copy constructor.
deba@57
   261
        ///
deba@57
   262
        InArcIt(const InArcIt& e) : Arc(e) { }
kpeter@734
   263
        /// %Invalid constructor \& conversion.
deba@57
   264
kpeter@734
   265
        /// Initializes the iterator to be invalid.
kpeter@734
   266
        /// \sa Invalid for more details.
kpeter@734
   267
        InArcIt(Invalid) { }
kpeter@734
   268
        /// Sets the iterator to the first incoming arc.
kpeter@734
   269
kpeter@734
   270
        /// Sets the iterator to the first incoming arc of the given node.
deba@57
   271
        ///
kpeter@734
   272
        InArcIt(const Digraph&, const Node&) { }
kpeter@734
   273
        /// Sets the iterator to the given arc.
alpar@209
   274
kpeter@734
   275
        /// Sets the iterator to the given arc of the given digraph.
kpeter@734
   276
        ///
deba@57
   277
        InArcIt(const Digraph&, const Arc&) { }
deba@57
   278
        /// Next incoming arc
deba@57
   279
kpeter@734
   280
        /// Assign the iterator to the next
kpeter@734
   281
        /// incoming arc of the corresponding node.
deba@57
   282
        InArcIt& operator++() { return *this; }
deba@57
   283
      };
deba@57
   284
kpeter@734
   285
      /// Iterator class for the arcs.
kpeter@734
   286
kpeter@734
   287
      /// This iterator goes through each arc of the digraph.
kpeter@786
   288
      /// Its usage is quite simple, for example, you can count the number
kpeter@734
   289
      /// of arcs in a digraph \c g of type \c %Digraph as follows:
deba@57
   290
      ///\code
deba@57
   291
      /// int count=0;
kpeter@734
   292
      /// for(Digraph::ArcIt a(g); a!=INVALID; ++a) ++count;
deba@57
   293
      ///\endcode
deba@57
   294
      class ArcIt : public Arc {
deba@57
   295
      public:
deba@57
   296
        /// Default constructor
deba@57
   297
kpeter@734
   298
        /// Default constructor.
kpeter@734
   299
        /// \warning It sets the iterator to an undefined value.
deba@57
   300
        ArcIt() { }
deba@57
   301
        /// Copy constructor.
deba@57
   302
deba@57
   303
        /// Copy constructor.
deba@57
   304
        ///
deba@57
   305
        ArcIt(const ArcIt& e) : Arc(e) { }
kpeter@734
   306
        /// %Invalid constructor \& conversion.
deba@57
   307
kpeter@734
   308
        /// Initializes the iterator to be invalid.
kpeter@734
   309
        /// \sa Invalid for more details.
kpeter@734
   310
        ArcIt(Invalid) { }
kpeter@734
   311
        /// Sets the iterator to the first arc.
kpeter@734
   312
kpeter@734
   313
        /// Sets the iterator to the first arc of the given digraph.
deba@57
   314
        ///
alpar@1093
   315
        explicit ArcIt(const Digraph& g) {
alpar@1093
   316
          ::lemon::ignore_unused_variable_warning(g);
alpar@1093
   317
        }
kpeter@734
   318
        /// Sets the iterator to the given arc.
alpar@209
   319
kpeter@734
   320
        /// Sets the iterator to the given arc of the given digraph.
kpeter@734
   321
        ///
alpar@209
   322
        ArcIt(const Digraph&, const Arc&) { }
kpeter@734
   323
        /// Next arc
alpar@209
   324
deba@57
   325
        /// Assign the iterator to the next arc.
kpeter@734
   326
        ///
deba@57
   327
        ArcIt& operator++() { return *this; }
deba@57
   328
      };
deba@57
   329
kpeter@734
   330
      /// \brief The source node of the arc.
deba@57
   331
      ///
kpeter@734
   332
      /// Returns the source node of the given arc.
deba@57
   333
      Node source(Arc) const { return INVALID; }
deba@57
   334
kpeter@734
   335
      /// \brief The target node of the arc.
kpeter@734
   336
      ///
kpeter@734
   337
      /// Returns the target node of the given arc.
kpeter@734
   338
      Node target(Arc) const { return INVALID; }
kpeter@734
   339
kpeter@734
   340
      /// \brief The ID of the node.
kpeter@734
   341
      ///
kpeter@734
   342
      /// Returns the ID of the given node.
alpar@209
   343
      int id(Node) const { return -1; }
deba@61
   344
kpeter@734
   345
      /// \brief The ID of the arc.
kpeter@734
   346
      ///
kpeter@734
   347
      /// Returns the ID of the given arc.
alpar@209
   348
      int id(Arc) const { return -1; }
deba@61
   349
kpeter@734
   350
      /// \brief The node with the given ID.
deba@61
   351
      ///
kpeter@734
   352
      /// Returns the node with the given ID.
kpeter@734
   353
      /// \pre The argument should be a valid node ID in the digraph.
alpar@209
   354
      Node nodeFromId(int) const { return INVALID; }
deba@61
   355
kpeter@734
   356
      /// \brief The arc with the given ID.
deba@61
   357
      ///
kpeter@734
   358
      /// Returns the arc with the given ID.
kpeter@734
   359
      /// \pre The argument should be a valid arc ID in the digraph.
alpar@209
   360
      Arc arcFromId(int) const { return INVALID; }
deba@61
   361
kpeter@734
   362
      /// \brief An upper bound on the node IDs.
kpeter@734
   363
      ///
kpeter@734
   364
      /// Returns an upper bound on the node IDs.
alpar@209
   365
      int maxNodeId() const { return -1; }
deba@61
   366
kpeter@734
   367
      /// \brief An upper bound on the arc IDs.
kpeter@734
   368
      ///
kpeter@734
   369
      /// Returns an upper bound on the arc IDs.
alpar@209
   370
      int maxArcId() const { return -1; }
deba@61
   371
deba@57
   372
      void first(Node&) const {}
deba@57
   373
      void next(Node&) const {}
deba@57
   374
deba@57
   375
      void first(Arc&) const {}
deba@57
   376
      void next(Arc&) const {}
deba@57
   377
deba@57
   378
deba@57
   379
      void firstIn(Arc&, const Node&) const {}
deba@57
   380
      void nextIn(Arc&) const {}
deba@57
   381
deba@57
   382
      void firstOut(Arc&, const Node&) const {}
deba@57
   383
      void nextOut(Arc&) const {}
deba@57
   384
deba@61
   385
      // The second parameter is dummy.
deba@61
   386
      Node fromId(int, Node) const { return INVALID; }
deba@61
   387
      // The second parameter is dummy.
deba@61
   388
      Arc fromId(int, Arc) const { return INVALID; }
deba@61
   389
deba@61
   390
      // Dummy parameter.
alpar@209
   391
      int maxId(Node) const { return -1; }
deba@61
   392
      // Dummy parameter.
alpar@209
   393
      int maxId(Arc) const { return -1; }
deba@61
   394
kpeter@734
   395
      /// \brief The opposite node on the arc.
kpeter@734
   396
      ///
kpeter@734
   397
      /// Returns the opposite node on the given arc.
kpeter@734
   398
      Node oppositeNode(Node, Arc) const { return INVALID; }
kpeter@734
   399
deba@57
   400
      /// \brief The base node of the iterator.
deba@57
   401
      ///
kpeter@734
   402
      /// Returns the base node of the given outgoing arc iterator
kpeter@734
   403
      /// (i.e. the source node of the corresponding arc).
kpeter@734
   404
      Node baseNode(OutArcIt) const { return INVALID; }
deba@57
   405
deba@57
   406
      /// \brief The running node of the iterator.
deba@57
   407
      ///
kpeter@734
   408
      /// Returns the running node of the given outgoing arc iterator
kpeter@734
   409
      /// (i.e. the target node of the corresponding arc).
kpeter@734
   410
      Node runningNode(OutArcIt) const { return INVALID; }
deba@57
   411
deba@57
   412
      /// \brief The base node of the iterator.
deba@57
   413
      ///
kpeter@1049
   414
      /// Returns the base node of the given incoming arc iterator
kpeter@734
   415
      /// (i.e. the target node of the corresponding arc).
kpeter@734
   416
      Node baseNode(InArcIt) const { return INVALID; }
deba@57
   417
deba@57
   418
      /// \brief The running node of the iterator.
deba@57
   419
      ///
kpeter@1049
   420
      /// Returns the running node of the given incoming arc iterator
kpeter@734
   421
      /// (i.e. the source node of the corresponding arc).
kpeter@734
   422
      Node runningNode(InArcIt) const { return INVALID; }
deba@57
   423
kpeter@734
   424
      /// \brief Standard graph map type for the nodes.
deba@57
   425
      ///
kpeter@734
   426
      /// Standard graph map type for the nodes.
kpeter@734
   427
      /// It conforms to the ReferenceMap concept.
alpar@209
   428
      template<class T>
kpeter@580
   429
      class NodeMap : public ReferenceMap<Node, T, T&, const T&> {
deba@57
   430
      public:
deba@57
   431
kpeter@734
   432
        /// Constructor
kpeter@734
   433
        explicit NodeMap(const Digraph&) { }
kpeter@734
   434
        /// Constructor with given initial value
deba@57
   435
        NodeMap(const Digraph&, T) { }
deba@57
   436
kpeter@263
   437
      private:
deba@57
   438
        ///Copy constructor
alpar@877
   439
        NodeMap(const NodeMap& nm) :
kpeter@580
   440
          ReferenceMap<Node, T, T&, const T&>(nm) { }
deba@57
   441
        ///Assignment operator
deba@57
   442
        template <typename CMap>
alpar@209
   443
        NodeMap& operator=(const CMap&) {
deba@57
   444
          checkConcept<ReadMap<Node, T>, CMap>();
alpar@209
   445
          return *this;
deba@57
   446
        }
deba@57
   447
      };
deba@57
   448
kpeter@734
   449
      /// \brief Standard graph map type for the arcs.
deba@57
   450
      ///
kpeter@734
   451
      /// Standard graph map type for the arcs.
kpeter@734
   452
      /// It conforms to the ReferenceMap concept.
alpar@209
   453
      template<class T>
kpeter@580
   454
      class ArcMap : public ReferenceMap<Arc, T, T&, const T&> {
deba@57
   455
      public:
deba@57
   456
kpeter@734
   457
        /// Constructor
kpeter@734
   458
        explicit ArcMap(const Digraph&) { }
kpeter@734
   459
        /// Constructor with given initial value
deba@57
   460
        ArcMap(const Digraph&, T) { }
kpeter@734
   461
kpeter@263
   462
      private:
deba@57
   463
        ///Copy constructor
kpeter@580
   464
        ArcMap(const ArcMap& em) :
kpeter@580
   465
          ReferenceMap<Arc, T, T&, const T&>(em) { }
deba@57
   466
        ///Assignment operator
deba@57
   467
        template <typename CMap>
alpar@209
   468
        ArcMap& operator=(const CMap&) {
deba@57
   469
          checkConcept<ReadMap<Arc, T>, CMap>();
alpar@209
   470
          return *this;
deba@57
   471
        }
deba@57
   472
      };
deba@57
   473
deba@125
   474
      template <typename _Digraph>
deba@57
   475
      struct Constraints {
deba@57
   476
        void constraints() {
kpeter@580
   477
          checkConcept<BaseDigraphComponent, _Digraph>();
deba@125
   478
          checkConcept<IterableDigraphComponent<>, _Digraph>();
alpar@209
   479
          checkConcept<IDableDigraphComponent<>, _Digraph>();
deba@125
   480
          checkConcept<MappableDigraphComponent<>, _Digraph>();
deba@57
   481
        }
deba@57
   482
      };
deba@57
   483
deba@57
   484
    };
alpar@209
   485
alpar@209
   486
  } //namespace concepts
deba@57
   487
} //namespace lemon
deba@57
   488
deba@57
   489
deba@57
   490
deba@529
   491
#endif