lemon/matrix_maps.h
changeset 2287 16954ac69517
parent 2088 68f8d17ced51
child 2305 4a2236cc98a0
equal deleted inserted replaced
11:92246e5d607e 12:6a15b8db70fd
    23 #include <vector>
    23 #include <vector>
    24 #include <lemon/bits/utility.h>
    24 #include <lemon/bits/utility.h>
    25 #include <lemon/bits/invalid.h>
    25 #include <lemon/bits/invalid.h>
    26 #include <lemon/maps.h>
    26 #include <lemon/maps.h>
    27 
    27 
    28 #include <lemon/concept/matrix_maps.h>
    28 #include <lemon/concepts/matrix_maps.h>
    29 
    29 
    30 /// \file
    30 /// \file
    31 /// \ingroup matrices
    31 /// \ingroup matrices
    32 /// \brief Maps indexed with pairs of items.
    32 /// \brief Maps indexed with pairs of items.
    33 ///
    33 ///
    34 /// \todo This file has the same name as the concept file in concept/,
    34 /// \todo This file has the same name as the concept file in concepts/,
    35 ///  and this is not easily detectable in docs...
    35 ///  and this is not easily detectable in docs...
    36 namespace lemon {
    36 namespace lemon {
    37 
    37 
    38   /// \brief Map for the coloumn view of the matrix
    38   /// \brief Map for the coloumn view of the matrix
    39   ///
    39   ///
   293     ///
   293     ///
   294     ///It copy the element of the given map to its own container.  The
   294     ///It copy the element of the given map to its own container.  The
   295     ///type of the two map shall be the same.
   295     ///type of the two map shall be the same.
   296     template <typename CMap>
   296     template <typename CMap>
   297     DynamicMatrixMap& operator=(const CMap& _cmap){
   297     DynamicMatrixMap& operator=(const CMap& _cmap){
   298       checkConcept<concept::ReadMatrixMap<FirstKey, SecondKey, Value>, CMap>();
   298       checkConcept<concepts::ReadMatrixMap<FirstKey, SecondKey, Value>, CMap>();
   299       typename Parent::Notifier* notifier = Parent::getNotifier();
   299       typename Parent::Notifier* notifier = Parent::getNotifier();
   300       Key first, second;
   300       Key first, second;
   301       for(notifier->first(first); first != INVALID; 
   301       for(notifier->first(first); first != INVALID; 
   302           notifier->next(first)){
   302           notifier->next(first)){
   303         for(notifier->first(second); second != INVALID; 
   303         for(notifier->first(second); second != INVALID; 
   430     ///
   430     ///
   431     ///It copy the element of the given map to its own container.  The
   431     ///It copy the element of the given map to its own container.  The
   432     ///type of the two map shall be the same.
   432     ///type of the two map shall be the same.
   433     template <typename CMap>
   433     template <typename CMap>
   434     DynamicSymMatrixMap& operator=(const CMap& _cmap){
   434     DynamicSymMatrixMap& operator=(const CMap& _cmap){
   435       checkConcept<concept::ReadMatrixMap<FirstKey, SecondKey, Value>, CMap>();
   435       checkConcept<concepts::ReadMatrixMap<FirstKey, SecondKey, Value>, CMap>();
   436       typename Parent::Notifier* notifier = Parent::getNotifier();
   436       typename Parent::Notifier* notifier = Parent::getNotifier();
   437       Key first, second;
   437       Key first, second;
   438       for(notifier->first(first); first != INVALID; 
   438       for(notifier->first(first); first != INVALID; 
   439           notifier->next(first)){
   439           notifier->next(first)){
   440         for(notifier->first(second); second != first; 
   440         for(notifier->first(second); second != first; 
   517   ///data with different key types from different container types. It
   517   ///data with different key types from different container types. It
   518   ///increases the size of the container if the linked containers
   518   ///increases the size of the container if the linked containers
   519   ///content change, so it is updated automaticly whenever it is
   519   ///content change, so it is updated automaticly whenever it is
   520   ///needed.
   520   ///needed.
   521   ///
   521   ///
   522   ///This map meet with the concept::ReferenceMatrixMap<typename K1,
   522   ///This map meet with the concepts::ReferenceMatrixMap<typename K1,
   523   ///typename K2, typename V, typename R, typename CR> called as
   523   ///typename K2, typename V, typename R, typename CR> called as
   524   ///"ReferenceMatrixMap".
   524   ///"ReferenceMatrixMap".
   525   ///
   525   ///
   526   ///\param _FirstContainer the desired type of first container. It is
   526   ///\param _FirstContainer the desired type of first container. It is
   527   ///ususally a Graph type, but can be any type with alteration
   527   ///ususally a Graph type, but can be any type with alteration
   858     ///
   858     ///
   859     ///It copy the element of the given map to its own container.  The
   859     ///It copy the element of the given map to its own container.  The
   860     ///type of the two map shall be the same.
   860     ///type of the two map shall be the same.
   861     template <typename CMap>
   861     template <typename CMap>
   862     DynamicAsymMatrixMap& operator=(const CMap& _cdmap){
   862     DynamicAsymMatrixMap& operator=(const CMap& _cdmap){
   863       checkConcept<concept::ReadMatrixMap<FirstKey, SecondKey, Value>, CMap>();
   863       checkConcept<concepts::ReadMatrixMap<FirstKey, SecondKey, Value>, CMap>();
   864       const typename FirstKeyProxy::Notifier* notifierFirstKey = 
   864       const typename FirstKeyProxy::Notifier* notifierFirstKey = 
   865         _first_key_proxy.getNotifier();
   865         _first_key_proxy.getNotifier();
   866       const typename SecondKeyProxy::Notifier* notifierSecondKey = 
   866       const typename SecondKeyProxy::Notifier* notifierSecondKey = 
   867         _second_key_proxy.getNotifier();
   867         _second_key_proxy.getNotifier();
   868       FirstKey itemFirst;
   868       FirstKey itemFirst;