|
| 1 | +//------------------------------------------------------------------------------ |
| 2 | +// LAGr_MaxFlow: max flow |
| 3 | +//------------------------------------------------------------------------------ |
| 4 | + |
| 5 | +// LAGraph, (c) 2019-2022 by The LAGraph Contributors, All Rights Reserved. |
| 6 | +// SPDX-License-Identifier: BSD-2-Clause |
| 7 | +// |
| 8 | +// For additional details (including references to third party source code and |
| 9 | +// other files) see the LICENSE file or contact [email protected]. See |
| 10 | +// Contributors.txt for a full list of contributors. Created, in part, with |
| 11 | +// funding and support from the U.S. Government (see Acknowledgments.txt file). |
| 12 | +// DM22-0790 |
| 13 | + |
| 14 | +// Contributed by Darin Peries and Tim Davis, Texas A&M University |
| 15 | + |
| 16 | +//------------------------------------------------------------------------------ |
1 | 17 |
|
2 | 18 | #include <LAGraphX.h> |
3 | 19 | #include "LG_internal.h" |
4 | 20 | #include <LAGraph.h> |
5 | 21 |
|
| 22 | +#if LG_SUITESPARSE_GRAPHBLAS_V10 |
| 23 | + |
6 | 24 | //------------------------------------------------------------------------------ |
7 | 25 | // LG_augment_maxflow |
8 | 26 | //------------------------------------------------------------------------------ |
9 | 27 |
|
10 | 28 | // LG_augment_maxflow is a function used to sum the current excess flow of the |
11 | 29 | // sink into the output variable f for each iteration. |
12 | 30 |
|
13 | | - |
14 | 31 | #undef LG_FREE_ALL |
15 | 32 | #define LG_FREE_ALL ; |
16 | 33 |
|
@@ -450,13 +467,16 @@ JIT_STR(void MF_getResidual(double * res, const MF_flowEdge * flow_edge){ |
450 | 467 | JIT_STR(void MF_extractMatrixFlow(double* flow, const MF_flowEdge* edge){*flow = edge->flow;}, GRB_EMFLOW_STR) |
451 | 468 |
|
452 | 469 |
|
| 470 | +#endif |
453 | 471 |
|
454 | 472 | //------------------------------------------------------------------------------ |
455 | 473 | // LAGraph_MaxFlow |
456 | 474 | //------------------------------------------------------------------------------ |
457 | 475 |
|
458 | 476 | int LAGr_MaxFlow(double* f, GrB_Matrix* flow_mtx, LAGraph_Graph G, GrB_Index src, GrB_Index sink, char *msg){ |
459 | 477 |
|
| 478 | +#if LG_SUITESPARSE_GRAPHBLAS_V10 |
| 479 | + |
460 | 480 | //types |
461 | 481 | GrB_Type GrB_FlowEdge = NULL ; |
462 | 482 | GrB_Type GrB_ResultTuple = NULL ; |
@@ -930,4 +950,7 @@ int LAGr_MaxFlow(double* f, GrB_Matrix* flow_mtx, LAGraph_Graph G, GrB_Index src |
930 | 950 |
|
931 | 951 | LG_FREE_ALL; |
932 | 952 | return GrB_SUCCESS; |
| 953 | +#else |
| 954 | + return GrB_NOT_IMPLEMENTED ; |
| 955 | +#endif |
933 | 956 | } |
0 commit comments