equal
deleted
inserted
replaced
33 /// @{ |
33 /// @{ |
34 |
34 |
35 /// Dimacs min cost flow reader function. |
35 /// Dimacs min cost flow reader function. |
36 |
36 |
37 /// This function reads a min cost flow instance from dimacs format, |
37 /// This function reads a min cost flow instance from dimacs format, |
38 /// i.e. from dimacs files having a line starting with \c p \c "min". |
38 /// i.e. from dimacs files having a line starting with |
|
39 /// \code |
|
40 /// p "min" |
|
41 /// \endcode |
39 /// At the beginning \c g is cleared by \c g.clear(). The edge |
42 /// At the beginning \c g is cleared by \c g.clear(). The edge |
40 /// capacities are written to \c capacity, \c s and \c t are set to |
43 /// capacities are written to \c capacity, \c s and \c t are set to |
41 /// the source and the target nodes resp. and the cost of the edges |
44 /// the source and the target nodes resp. and the cost of the edges |
42 /// are written to \c cost. |
45 /// are written to \c cost. |
43 /// |
46 /// |
110 |
113 |
111 |
114 |
112 /// Dimacs max flow reader function. |
115 /// Dimacs max flow reader function. |
113 |
116 |
114 /// This function reads a max flow instance from dimacs format, |
117 /// This function reads a max flow instance from dimacs format, |
115 /// i.e. from dimacs files having a line starting with \c p \c |
118 /// i.e. from dimacs files having a line starting with |
116 /// "max". At the beginning \c g is cleared by \c g.clear(). The |
119 /// \code |
|
120 /// p "max" |
|
121 /// \endcode |
|
122 ///At the beginning \c g is cleared by \c g.clear(). The |
117 /// edge capacities are written to \c capacity and \c s and \c t are |
123 /// edge capacities are written to \c capacity and \c s and \c t are |
118 /// set to the source and the target nodes. |
124 /// set to the source and the target nodes. |
119 /// |
125 /// |
120 /// \author Marton Makai |
126 /// \author Marton Makai |
121 template<typename Graph, typename CapacityMap> |
127 template<typename Graph, typename CapacityMap> |
127 |
133 |
128 |
134 |
129 /// Dimacs shortest path reader function. |
135 /// Dimacs shortest path reader function. |
130 |
136 |
131 /// This function reads a shortest path instance from dimacs format, |
137 /// This function reads a shortest path instance from dimacs format, |
132 /// i.e. from dimacs files having a line starting with \c p \c "sp". |
138 /// i.e. from dimacs files having a line starting with |
|
139 /// \code |
|
140 /// p "sp" |
|
141 /// \endcode |
133 /// At the beginning \c g is cleared by \c g.clear(). The edge |
142 /// At the beginning \c g is cleared by \c g.clear(). The edge |
134 /// capacities are written to \c capacity and \c s is set to the |
143 /// capacities are written to \c capacity and \c s is set to the |
135 /// source node. |
144 /// source node. |
136 /// |
145 /// |
137 /// \author Marton Makai |
146 /// \author Marton Makai |
160 |
169 |
161 /// Dimacs plain graph reader function. |
170 /// Dimacs plain graph reader function. |
162 |
171 |
163 /// This function reads a graph without any designated nodes and |
172 /// This function reads a graph without any designated nodes and |
164 /// maps from dimacs format, i.e. from dimacs files having a line |
173 /// maps from dimacs format, i.e. from dimacs files having a line |
165 /// starting with \c p \c "mat". At the beginning \c g is cleared |
174 /// starting with |
|
175 /// \code |
|
176 /// p "mat" |
|
177 /// \endcode |
|
178 /// At the beginning \c g is cleared |
166 /// by \c g.clear(). |
179 /// by \c g.clear(). |
167 /// |
180 /// |
168 /// \author Marton Makai |
181 /// \author Marton Makai |
169 template<typename Graph> |
182 template<typename Graph> |
170 void readDimacs(std::istream& is, Graph &g) { |
183 void readDimacs(std::istream& is, Graph &g) { |