Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r52117 - trunk/boost/graph
From: jewillco_at_[hidden]
Date: 2009-04-01 14:49:52


Author: jewillco
Date: 2009-04-01 14:49:52 EDT (Wed, 01 Apr 2009)
New Revision: 52117
URL: http://svn.boost.org/trac/boost/changeset/52117

Log:
Removed #if 0 code
Text files modified:
   trunk/boost/graph/dimacs.hpp | 94 ----------------------------------------
   1 files changed, 0 insertions(+), 94 deletions(-)

Modified: trunk/boost/graph/dimacs.hpp
==============================================================================
--- trunk/boost/graph/dimacs.hpp (original)
+++ trunk/boost/graph/dimacs.hpp 2009-04-01 14:49:52 EDT (Wed, 01 Apr 2009)
@@ -195,100 +195,6 @@
   bool want_weights;
 };
 
-#if 0
-class dimacs_indexed_reader : public dimacs_basic_reader {
-public:
- dimacs_indexed_reader( std::istream& in, std::istream& idx ) :
- dimacs_basic_reader( in ),
- index( idx ), start( 0 ), stop( 0 ), still_reading( true ) {
-
- int n = process_id( pg );
- std::stringstream instr;
-
- while( getline( index, buf ) ) {
- instr.str( buf );
- instr.clear();
- long p, begin, end;
-
- instr >> p >> begin >> end;
-
- if( p == n ) {
- start = begin;
- stop = end;
- break;
- }
- }
-
- std::cerr << "start is " << start << " stop is " << stop << std::endl;
- assert( start != 0 && stop != 0 );
- inpt.seekg( start, std::ios::beg );
-
- //what a kludge!
- seen_edges = 0;
- read_edges.pop();
- incr( dimacs_basic_reader::edge_weight );
- }
-
- dimacs_indexed_reader() : dimacs_basic_reader(), index( std::cin ) {
- }
- bool done_edges() {
- return (stop < 0 ? (long)inpt.tellg() == stop && read_edges.size() == 0 : (long)inpt.tellg())
- >= stop && read_edges.size() == 0;
- }
-
- inline dimacs_indexed_reader incr( incr_mode mode ) {
- if( mode == edge ) {
- assert( !read_edges.empty() );
- read_edges.pop();
- }
- else if( mode == edge_weight ) {
- assert( !read_edge_weights.empty() );
- read_edge_weights.pop();
- }
-
- if( (mode == edge && read_edges.empty()) ||
- (mode == edge_weight && read_edge_weights.empty() )) {
-
- if( seen_edges > num_edges ) {
- boost::throw_exception(dimacs_exception());
- }
-
- while( getline( inpt, buf ) && !buf.empty() && buf[0] == 'c' );
-
- if( still_reading && !inpt.eof() ) {
- std::stringstream instr( buf );
- vertices_size_type source, dest;
- edge_weight_type weight;
- instr >> buf >> source >> dest >> weight;
- seen_edges++;
-
- // take care of indexing
- source--;
- dest--;
-
- read_edges.push( edge_type( source, dest ) );
- read_edge_weights.push( weight );
- }
- still_reading = stop < 0 ? (long)inpt.tellg() != stop : (long)inpt.tellg() < stop;
- assert( read_edges.size() < 100 );
- assert( read_edge_weights.size() < 100 );
- }
-
- // the 1000000 just happens to be about how many edges can be read in
- // 10s
- if( !(seen_edges % 1000000) && !process_id( pg ) && mode == edge ) {
- // std::cout << "read " << seen_edges << " edges" << std::endl;
- }
- return *this;
- }
-
-private:
- std::istream& index;
- long start, stop;
- bool still_reading;
-};
-#endif
-
 template<typename T>
 class dimacs_edge_iterator {
 public:


Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk