1.1 --- a/lemon/dimacs.h Wed Apr 15 07:05:32 2009 +0100
1.2 +++ b/lemon/dimacs.h Wed Apr 15 07:07:25 2009 +0100
1.3 @@ -37,11 +37,16 @@
1.4 /// DIMACS file type descriptor.
1.5 struct DimacsDescriptor
1.6 {
1.7 - ///File type enum
1.8 - enum Type
1.9 - {
1.10 - NONE, MIN, MAX, SP, MAT
1.11 - };
1.12 + ///\brief DIMACS file type enum
1.13 + ///
1.14 + ///DIMACS file type enum.
1.15 + enum Type {
1.16 + NONE, ///< Undefined type.
1.17 + MIN, ///< DIMACS file type for minimum cost flow problems.
1.18 + MAX, ///< DIMACS file type for maximum flow problems.
1.19 + SP, ///< DIMACS file type for shostest path problems.
1.20 + MAT ///< DIMACS file type for plain graphs and matching problems.
1.21 + };
1.22 ///The file type
1.23 Type type;
1.24 ///The number of nodes in the graph
1.25 @@ -49,16 +54,16 @@
1.26 ///The number of edges in the graph
1.27 int edgeNum;
1.28 int lineShift;
1.29 - /// Constructor. Sets the type to NONE.
1.30 + ///Constructor. It sets the type to \c NONE.
1.31 DimacsDescriptor() : type(NONE) {}
1.32 };
1.33
1.34 ///Discover the type of a DIMACS file
1.35
1.36 - ///It starts seeking the beginning of the file for the problem type
1.37 - ///and size info. The found data is returned in a special struct
1.38 - ///that can be evaluated and passed to the appropriate reader
1.39 - ///function.
1.40 + ///This function starts seeking the beginning of the given file for the
1.41 + ///problem type and size info.
1.42 + ///The found data is returned in a special struct that can be evaluated
1.43 + ///and passed to the appropriate reader function.
1.44 DimacsDescriptor dimacsType(std::istream& is)
1.45 {
1.46 DimacsDescriptor r;
1.47 @@ -96,8 +101,7 @@
1.48 }
1.49
1.50
1.51 -
1.52 - /// DIMACS minimum cost flow reader function.
1.53 + /// \brief DIMACS minimum cost flow reader function.
1.54 ///
1.55 /// This function reads a minimum cost flow instance from DIMACS format,
1.56 /// i.e. from a DIMACS file having a line starting with
1.57 @@ -253,7 +257,7 @@
1.58 }
1.59 }
1.60
1.61 - /// DIMACS maximum flow reader function.
1.62 + /// \brief DIMACS maximum flow reader function.
1.63 ///
1.64 /// This function reads a maximum flow instance from DIMACS format,
1.65 /// i.e. from a DIMACS file having a line starting with
1.66 @@ -287,7 +291,7 @@
1.67 _readDimacs(is,g,capacity,s,t,infty,desc);
1.68 }
1.69
1.70 - /// DIMACS shortest path reader function.
1.71 + /// \brief DIMACS shortest path reader function.
1.72 ///
1.73 /// This function reads a shortest path instance from DIMACS format,
1.74 /// i.e. from a DIMACS file having a line starting with
1.75 @@ -313,7 +317,7 @@
1.76 _readDimacs(is, g, length, s, t, 0, desc);
1.77 }
1.78
1.79 - /// DIMACS capacitated digraph reader function.
1.80 + /// \brief DIMACS capacitated digraph reader function.
1.81 ///
1.82 /// This function reads an arc capacitated digraph instance from
1.83 /// DIMACS 'max' or 'sp' format.
1.84 @@ -359,11 +363,11 @@
1.85 g.addArc(s,t);
1.86 }
1.87
1.88 - /// DIMACS plain (di)graph reader function.
1.89 + /// \brief DIMACS plain (di)graph reader function.
1.90 ///
1.91 - /// This function reads a (di)graph without any designated nodes and
1.92 - /// maps from DIMACS format, i.e. from DIMACS files having a line
1.93 - /// starting with
1.94 + /// This function reads a plain (di)graph without any designated nodes
1.95 + /// and maps (e.g. a matching instance) from DIMACS format, i.e. from
1.96 + /// DIMACS files having a line starting with
1.97 /// \code
1.98 /// p mat
1.99 /// \endcode