COIN-OR::LEMON - Graph Library

Ignore:
Timestamp:
02/08/05 18:47:19 (15 years ago)
Author:
marci
Branch:
default
Phase:
public
Convert:
svn:c9d7d8f5-90d6-0310-b91f-818b3a526b0e/lemon/trunk@1542
Message:

The pair of setSomeThing function is getSomeThing.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/work/marci/lp/max_flow_expression.cc

    r1111 r1143  
    33#include <fstream>
    44
     5#include <lemon/graph_utils.h>
    56#include <lemon/smart_graph.h>
    67#include <lemon/list_graph.h>
     
    4950  typedef LPSolver::RowIt RowIt;
    5051  typedef Graph::EdgeMap<ColIt> EdgeIndexMap;
     52  typedef Graph::NodeMap<RowIt> NodeIndexMap;
    5153  EdgeIndexMap edge_index_map(g);
     54  NodeIndexMap node_index_map(g);
    5255  PrimalMap<Edge, EdgeIndexMap> flow(lp, edge_index_map);
    5356
     
    7679    if ((n!=s) && (n!=t)) {
    7780      RowIt row_it=lp.addRow();
     81      node_index_map.set(n, row_it);
    7882      lp.setRowCoeffs(row_it, expr);
    7983      lp.setRowLowerBound(row_it, 0.0);
    8084      lp.setRowUpperBound(row_it, 0.0);
     85//       cout << expr << endl;
     86//       {
     87//      LPSolver::Expression expr;
     88//      lp.getRowCoeffs(node_index_map[n], expr);       
     89//      cout << expr << endl;
     90//       }
    8191    }
    8292  }
    8393  lp.solveSimplex();
     94//   cout << "num of nodes: " << countNodes(g) << endl;
     95//   cout << "num of edges: " << countEdges(g) << endl;
     96//   cout << "num of rows: " << lp.rowNum() << endl;
     97//   cout << "num of rows: " << lp.int_row_map.size() << endl;
     98//   for (int i=0; i<lp.int_row_map.size(); ++i) {
     99//     cout << lp.int_row_map[i] << " " << endl;
     100//   }
     101//   cout << "num of columns: " << lp.colNum() << endl;
     102//   cout << "num of columns: " << lp.int_col_map.size() << endl;
     103//   for (int i=0; i<lp.int_col_map.size(); ++i) {
     104//     cout << lp.int_col_map[i] << " " << endl;
     105//   }
    84106  cout << "elapsed time: " << ts << endl;
     107//   Graph::NodeIt n(g);
     108//   ++n;
     109//   for(Graph::OutEdgeIt e(g, n); e!=INVALID; ++e) {
     110//     cout << edge_index_map[e] << endl;
     111//   }
     112//   for(Graph::InEdgeIt e(g, n); e!=INVALID; ++e) {
     113//     cout << edge_index_map[e] << endl;
     114//   }
     115//   LPSolver::DualExpression expr;
     116//   lp.getRowCoeffs(node_index_map[n], expr);
     117//   cout << expr << endl;
    85118}
Note: See TracChangeset for help on using the changeset viewer.