Show
Ignore:
Timestamp:
10/13/08 00:29:21 (6 years ago)
Author:
mrkn
Message:

boost_supplement/graph/detail/line_input_iterator.hpp: line_input_iterator::operator++ must return *this.
boost_supplement/graph/read_lgl.hpp: change the name of the member variables according to google coding standard.

Location:
lang/cplusplus/boost-supplement/trunk
Files:
3 modified

Legend:

Unmodified
Added
Removed
  • lang/cplusplus/boost-supplement/trunk/ChangeLog

    r17469 r21200  
     12008-10-12  Kenta Murata  <mrkn@mrkn.jp> 
     2 
     3        * boost_supplement/graph/detail/line_input_iterator.hpp: 
     4        line_input_iterator::operator++ must return *this. 
     5 
     6        * boost_supplement/graph/read_lgl.hpp: change the name of the 
     7        member variables according to google coding standard. 
     8 
     92008-10-10  Kenta Murata  <mrkn@mrkn.jp> 
     10 
     11        * boost_supplement/graph/read_lgl.hpp (lgl_reader): VertexNameMap 
     12        and EdgeWeightMap are kept by now reference. 
     13 
    1142008-08-12  Kenta Murata  <muraken@gmail.com> 
    215 
  • lang/cplusplus/boost-supplement/trunk/boost_supplement/graph/detail/line_input_iterator.hpp

    r17466 r21200  
    6666    { 
    6767      if (in_ != 0) next_line(); 
     68      return *this; 
    6869    } 
    6970   
     
    8283                         line_input_iterator<IS> const& b); 
    8384}; 
    84  
    85 }} 
    8685 
    8786template<class InputStream> 
     
    108107} 
    109108 
     109}} 
     110 
    110111#endif // ifndef BOOST_SUPPLEMENT_GRAPH_DETAIL_LINE_INPUT_ITERATOR_HPP_INCLUDED 
  • lang/cplusplus/boost-supplement/trunk/boost_supplement/graph/read_lgl.hpp

    r17467 r21200  
    2323 
    2424  const boost::char_separator<char> SEP; 
    25   Graph* m_graph; 
    26   VertexNameMap m_vnm; 
    27   EdgeWeightMap m_ewm; 
    28   NameVertexMap m_nvm; 
    29   std::string m_base; 
     25  Graph* graph_; 
     26  VertexNameMap* vnm_; 
     27  EdgeWeightMap* ewm_; 
     28  NameVertexMap nvm_; 
     29  std::string base_; 
    3030 
    3131  Vertex name_to_vertex(std::string const& n) 
    3232    { 
    33       typename NameVertexMap::iterator i = m_nvm.find(n); 
    34       if (i == m_nvm.end()) { 
    35         Vertex u = add_vertex(*m_graph); 
    36         m_vnm[u] = n; 
    37         m_nvm[n] = u; 
     33      typename NameVertexMap::iterator i = nvm_.find(n); 
     34      if (i == nvm_.end()) { 
     35        Vertex u = add_vertex(*graph_); 
     36        (*vnm_)[u] = n; 
     37        nvm_[n] = u; 
    3838        return u; 
    3939      } 
     
    5555          return; 
    5656        } 
    57         m_base = *tok_iter; 
     57        base_ = *tok_iter; 
    5858      } 
    5959      else { 
    60         Vertex u = name_to_vertex(m_base); 
     60        Vertex u = name_to_vertex(base_); 
    6161        Vertex v = name_to_vertex(tok1); 
    6262        if (tok_iter == tokens.end()) { 
    63           add_edge(u, v, *m_graph); 
     63          add_edge(u, v, *graph_); 
    6464        } 
    6565        else { 
     
    6767          double w = atof(tok2.c_str()); 
    6868          // if (has_w && w > cutoff) continue; 
    69           add_edge(u, v, *m_graph); 
    70           m_ewm[edge(u, v, *m_graph).first] = w; 
     69          add_edge(u, v, *graph_); 
     70          (*ewm_)[edge(u, v, *graph_).first] = w; 
    7171        } 
    7272      } 
     
    7474   
    7575public: 
    76   lgl_reader(Graph& g, VertexNameMap n, EdgeWeightMap w) 
     76  lgl_reader(Graph& g, VertexNameMap& n, EdgeWeightMap& w) 
    7777    : SEP(" "), 
    78       m_graph(&g), 
    79       m_vnm(n), 
    80       m_ewm(w), 
    81       m_base("") 
     78      graph_(&g), 
     79      vnm_(&n), 
     80      ewm_(&w), 
     81      base_("") 
    8282    {} 
    8383 
     
    8585  bool read(InputStream& is) 
    8686    { 
    87       m_graph->clear(); 
     87      graph_->clear(); 
    8888      for (line_input_iterator<InputStream> line_iter(is); 
    8989           line_iter != line_input_iterator<InputStream>();