Skip to content

Commit 5074aa3

Browse files
committed
modified demo
1 parent f870ffa commit 5074aa3

File tree

2 files changed

+3
-21
lines changed

2 files changed

+3
-21
lines changed

experimental/algorithm/LAGr_MaxFlow.c

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,3 @@
1-
//************************HOUSE RULES *******************
2-
// user defined typedefs are MF for Max Flow
3-
// when registered with GraphBLAS, replace MF with GrB
4-
// macros are all caps
51

62
#include <LAGraphX.h>
73
#include "LG_internal.h"
@@ -11,7 +7,9 @@
117
// LG_augment_maxflow
128
//------------------------------------------------------------------------------
139

14-
// FIXME: describe me
10+
// LG_augment_maxflow is a function used to sum the current excess flow of the
11+
// sink into the output variable f for each iteration.
12+
1513

1614
#undef LG_FREE_ALL
1715
#define LG_FREE_ALL ;

experimental/benchmark/maxflow_demo.c

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -26,22 +26,11 @@ int main (int argc, char ** argv){
2626
LAGRAPH_TRY(LAGraph_Init(msg));
2727

2828
//read in graph
29-
double t = LAGraph_WallClockTime ( ) ;
30-
//char *matrix_name = (argc > 1) ? argv [1] : "stdin" ;
31-
3229
LAGRAPH_TRY(readproblem(&G, NULL, false, true, false, NULL, true, argc, argv));
3330
LAGRAPH_TRY(LAGraph_Cached_AT(G, msg));
3431
LAGRAPH_TRY(LAGraph_Cached_EMin(G, msg));
35-
36-
t = LAGraph_WallClockTime() - t;
37-
printf ("Time to read the graph: %g sec\n", t) ;
38-
39-
40-
//GRB_TRY(GrB_Matrix_nrows(&T, G->A));
41-
//T--;
4232

4333
char* end1, *end2;
44-
4534
S = strtoul(argv[2], &end1, 10);
4635
T = strtoul(argv[3], &end2, 10);
4736
if(argc > 4){
@@ -52,22 +41,17 @@ int main (int argc, char ** argv){
5241
if(end1 == 0 || end2 == 0){
5342
printf("values for source and sink are incorrect.\n");
5443
}
55-
56-
57-
5844
printf("Starting max flow from %ld to %ld", S, T);
5945

6046
//LG_SET_BURBLE(1);
6147
double time = LAGraph_WallClockTime();
6248
LAGRAPH_TRY(LAGr_MaxFlow(&flow, NULL, G, S, T, msg));
6349
time = LAGraph_WallClockTime() - time;
64-
6550
printf("Time for LAGraph_MaxFlow: %g sec\n", time);
6651
printf("Max Flow is: %lf\n", flow);
6752

6853
LAGraph_Delete(&G, msg);
6954
LAGRAPH_TRY(LAGraph_Finalize(msg));
7055

7156
return GrB_SUCCESS;
72-
7357
}

0 commit comments

Comments
 (0)