/[escript]/branches/diaplayground/cusplibrary/cusp/graph/maximum_flow.h
ViewVC logotype

Contents of /branches/diaplayground/cusplibrary/cusp/graph/maximum_flow.h

Parent Directory Parent Directory | Revision Log Revision Log


Revision 4955 - (show annotations)
Tue May 20 04:33:15 2014 UTC (6 years, 2 months ago) by caltinay
File MIME type: text/plain
File size: 1857 byte(s)
added pristine copy of cusplibrary (apache license) to be used by ripley.

1 /*
2 * Copyright 2008-2009 NVIDIA Corporation
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17 /*! \file maximum_flow.h
18 * \brief Max-flow in a flow network
19 */
20
21 #pragma once
22
23 #include <cusp/detail/config.h>
24
25 namespace cusp
26 {
27 namespace graph
28 {
29 /*! \addtogroup algorithms Algorithms
30 * \ingroup algorithms
31 * \{
32 */
33
34 /*! \p maximum_flow : Performs a maximum flow computation on a flow network
35 * starting from a given source vertex to a given sink vertex.
36 *
37 * \param A matrix that represents a flow network
38 * \param source vertex
39 * \param sink vertex
40 *
41 * \tparam Matrix matrix
42 *
43 * \see http://en.wikipedia.org/wiki/Maximum_flow_problem
44 */
45 template<typename MatrixType, typename IndexType>
46 typename MatrixType::value_type
47 maximum_flow(const MatrixType& G, const IndexType src, const IndexType sink);
48
49 template<typename MatrixType, typename ArrayType, typename IndexType>
50 typename MatrixType::value_type
51 maximum_flow(const MatrixType& G, ArrayType& flow, const IndexType src, const IndexType sink);
52
53 template<typename MatrixType, typename ArrayType1, typename ArrayType2, typename IndexType>
54 size_t max_flow_to_min_cut(const MatrixType& G, const ArrayType1& flow, const IndexType src, ArrayType2& min_cut_edges);
55
56 /*! \}
57 */
58
59
60 } // end namespace graph
61 } // end namespace cusp
62
63 #include <cusp/graph/detail/maximum_flow.inl>
64

  ViewVC Help
Powered by ViewVC 1.1.26