src/hugo/list_graph.h
changeset 610 4ce8c695e748
parent 579 859f8c7e2a40
child 681 06a3cba90f94
equal deleted inserted replaced
1:90202268e2c4 2:9ab0548771aa
   417       template<typename TT> friend class NodeMap;
   417       template<typename TT> friend class NodeMap;
   418  
   418  
   419       ///\todo It can copy between different types.
   419       ///\todo It can copy between different types.
   420       ///
   420       ///
   421       template<typename TT> NodeMap(const NodeMap<TT> &m) :
   421       template<typename TT> NodeMap(const NodeMap<TT> &m) :
   422 	DynMapBase<Node>(*m.G)
   422 	DynMapBase<Node>(*m.G), container(m.container.size())
       
   423 
   423       {
   424       {
   424 	G->dyn_node_maps.push_back(this);
   425 	G->dyn_node_maps.push_back(this);
   425 	typename std::vector<TT>::const_iterator i;
   426 	typename std::vector<TT>::const_iterator i;
   426 	for(typename std::vector<TT>::const_iterator i=m.container.begin();
   427 	for(typename std::vector<TT>::const_iterator i=m.container.begin();
   427 	    i!=m.container.end();
   428 	    i!=m.container.end();
   509       template<typename TT> friend class EdgeMap;
   510       template<typename TT> friend class EdgeMap;
   510 
   511 
   511       ///\todo It can copy between different types.
   512       ///\todo It can copy between different types.
   512       ///
   513       ///
   513       template<typename TT> EdgeMap(const EdgeMap<TT> &m) :
   514       template<typename TT> EdgeMap(const EdgeMap<TT> &m) :
   514 	DynMapBase<Edge>(*m.G)
   515 	DynMapBase<Edge>(*m.G), container(m.container.size())
   515       {
   516       {
   516 	G->dyn_edge_maps.push_back(this);
   517 	G->dyn_edge_maps.push_back(this);
   517 	typename std::vector<TT>::const_iterator i;
   518 	typename std::vector<TT>::const_iterator i;
   518 	for(typename std::vector<TT>::const_iterator i=m.container.begin();
   519 	for(typename std::vector<TT>::const_iterator i=m.container.begin();
   519 	    i!=m.container.end();
   520 	    i!=m.container.end();
   660 
   661 
   661       ///\todo It can copy between different types.
   662       ///\todo It can copy between different types.
   662       ///
   663       ///
   663 
   664 
   664       template<typename TT> SymEdgeMap(const SymEdgeMap<TT> &m) :
   665       template<typename TT> SymEdgeMap(const SymEdgeMap<TT> &m) :
   665 	DynMapBase<SymEdge>(*m.G)
   666 	DynMapBase<SymEdge>(*m.G), container(m.container.size())
   666       {
   667       {
   667 	G->dyn_node_maps.push_back(this);
   668 	G->dyn_node_maps.push_back(this);
   668 	typename std::vector<TT>::const_iterator i;
   669 	typename std::vector<TT>::const_iterator i;
   669 	for(typename std::vector<TT>::const_iterator i=m.container.begin();
   670 	for(typename std::vector<TT>::const_iterator i=m.container.begin();
   670 	    i!=m.container.end();
   671 	    i!=m.container.end();
  1031       template<typename TT> friend class NodeMap;
  1032       template<typename TT> friend class NodeMap;
  1032  
  1033  
  1033       ///\todo It can copy between different types.
  1034       ///\todo It can copy between different types.
  1034       ///
  1035       ///
  1035       template<typename TT> NodeMap(const NodeMap<TT> &m) :
  1036       template<typename TT> NodeMap(const NodeMap<TT> &m) :
  1036 	DynMapBase<Node>(*m.G)
  1037 	DynMapBase<Node>(*m.G), container(m.container.size())
  1037       {
  1038       {
  1038 	G->dyn_node_maps.push_back(this);
  1039 	G->dyn_node_maps.push_back(this);
  1039 	typename std::vector<TT>::const_iterator i;
  1040 	typename std::vector<TT>::const_iterator i;
  1040 	for(typename std::vector<TT>::const_iterator i=m.container.begin();
  1041 	for(typename std::vector<TT>::const_iterator i=m.container.begin();
  1041 	    i!=m.container.end();
  1042 	    i!=m.container.end();
  1553       template<typename TT> friend class EdgeMap;
  1554       template<typename TT> friend class EdgeMap;
  1554 
  1555 
  1555       ///\todo It can copy between different types.
  1556       ///\todo It can copy between different types.
  1556       ///
  1557       ///
  1557       template<typename TT> EdgeMap(const EdgeMap<TT> &m) :
  1558       template<typename TT> EdgeMap(const EdgeMap<TT> &m) :
  1558 	DynMapBase<Edge>(*m.G)
  1559 	DynMapBase<Edge>(*m.G), container(m.container.size())
  1559       {
  1560       {
  1560 	G->dyn_edge_maps.push_back(this);
  1561 	G->dyn_edge_maps.push_back(this);
  1561 	typename std::vector<TT>::const_iterator i;
  1562 	typename std::vector<TT>::const_iterator i;
  1562 	for(typename std::vector<TT>::const_iterator i=m.container.begin();
  1563 	for(typename std::vector<TT>::const_iterator i=m.container.begin();
  1563 	    i!=m.container.end();
  1564 	    i!=m.container.end();