Index: lemon/maps.h
===================================================================
--- lemon/maps.h	(revision 1993)
+++ lemon/maps.h	(revision 2032)
@@ -352,4 +352,38 @@
     Value operator[](Key k) const {return m[k] + v;}
   };
+
+  ///Shift a map with a constant.
+
+  ///This \ref concept::ReadWriteMap "read-write map" returns the sum of the
+  ///given map and a constant value. It makes also possible to write the map.
+  ///Its \c Key and \c Value is inherited from \c M.
+  ///
+  ///Actually,
+  ///\code
+  ///  ShiftMap<X> sh(x,v);
+  ///\endcode
+  ///is equivalent with
+  ///\code
+  ///  ConstMap<X::Key, X::Value> c_tmp(v);
+  ///  AddMap<X, ConstMap<X::Key, X::Value> > sh(x,v);
+  ///\endcode
+  template<typename M, typename C = typename M::Value> 
+  class ShiftWriteMap : public MapBase<typename M::Key, typename M::Value> {
+    M& m;
+    C v;
+  public:
+    typedef MapBase<typename M::Key, typename M::Value> Parent;
+    typedef typename Parent::Key Key;
+    typedef typename Parent::Value Value;
+
+    ///Constructor
+
+    ///Constructor
+    ///\param _m is the undelying map
+    ///\param _v is the shift value
+    ShiftWriteMap(const M &_m, const C &_v ) : m(_m), v(_v) {};
+    Value operator[](Key k) const {return m[k] + v;}
+    void set(Key k, const Value& c) { m.set(k, c - v); }
+  };
   
   ///Returns an \ref ShiftMap class
@@ -361,4 +395,9 @@
   inline ShiftMap<M, C> shiftMap(const M &m,const C &v) {
     return ShiftMap<M, C>(m,v);
+  }
+
+  template<typename M, typename C> 
+  inline ShiftWriteMap<M, C> shiftMap(M &m,const C &v) {
+    return ShiftWriteMap<M, C>(m,v);
   }
 
@@ -457,4 +496,29 @@
     Value operator[](Key k) const {return v * m[k];}
   };
+
+  ///Scales a maps with a constant.
+
+  ///This \ref concept::ReadWriteMap "read-write map" returns the value of the
+  ///given map multiplied from the left side with a constant value. It can
+  ///be used as write map also if the given multiplier is not zero.
+  ///Its \c Key and \c Value is inherited from \c M.
+  template<typename M, typename C = typename M::Value> 
+  class ScaleWriteMap : public MapBase<typename M::Key, typename M::Value> {
+    M& m;
+    C v;
+  public:
+    typedef MapBase<typename M::Key, typename M::Value> Parent;
+    typedef typename Parent::Key Key;
+    typedef typename Parent::Value Value;
+
+    ///Constructor
+
+    ///Constructor
+    ///\param _m is the undelying map
+    ///\param _v is the scaling value
+    ScaleWriteMap(M &_m, const C &_v ) : m(_m), v(_v) {};
+    Value operator[](Key k) const {return v * m[k];}
+    void set(Key k, const Value& c) { m.set(k, c / v);}
+  };
   
   ///Returns an \ref ScaleMap class
@@ -466,4 +530,9 @@
   inline ScaleMap<M, C> scaleMap(const M &m,const C &v) {
     return ScaleMap<M, C>(m,v);
+  }
+
+  template<typename M, typename C> 
+  inline ScaleWriteMap<M, C> scaleMap(M &m,const C &v) {
+    return ScaleWriteMap<M, C>(m,v);
   }
 
@@ -636,4 +705,25 @@
   };
   
+  ///Negative value of a map
+
+  ///This \ref concept::ReadWriteMap "read-write map" returns the negative
+  ///value of the value returned by the
+  ///given map. Its \c Key and \c Value will be inherited from \c M.
+  ///The unary \c - operator must be defined for \c Value, of course.
+
+  template<typename M> 
+  class NegWriteMap : public MapBase<typename M::Key, typename M::Value> {
+    M& m;
+  public:
+    typedef MapBase<typename M::Key, typename M::Value> Parent;
+    typedef typename Parent::Key Key;
+    typedef typename Parent::Value Value;
+
+    ///Constructor
+    NegWriteMap(M &_m) : m(_m) {};
+    Value operator[](Key k) const {return -m[k];}
+    void set(Key k, const Value& v) { m.set(k, -v); }
+  };
+
   ///Returns a \ref NegMap class
 
@@ -645,4 +735,8 @@
   }
 
+  template <typename M> 
+  inline NegWriteMap<M> negMap(M &m) {
+    return NegWriteMap<M>(m);
+  }
 
   ///Absolute value of a map
@@ -788,4 +882,27 @@
   }
 
+  ///Applies all map setting operations to two maps
+
+  ///This map has two \ref concept::ReadMap "readable map"
+  ///parameters and each read request will be passed just to the
+  ///first map. This class is the just readable map type of the ForkWriteMap.
+  ///
+  ///The \c Key and \c Value will be inherited from \c M1.
+  ///The \c Key and \c Value of M2 must be convertible from those of \c M1.
+
+  template<typename  M1, typename M2> 
+  class ForkMap : public MapBase<typename M1::Key, typename M1::Value> {
+    const M1& m1;
+    const M2& m2;
+  public:
+    typedef MapBase<typename M1::Key, typename M1::Value> Parent;
+    typedef typename Parent::Key Key;
+    typedef typename Parent::Value Value;
+
+    ///Constructor
+    ForkMap(const M1 &_m1, const M2 &_m2) : m1(_m1), m2(_m2) {};
+    Value operator[](Key k) const {return m1[k];}
+  };
+
 
   ///Applies all map setting operations to two maps
@@ -801,7 +918,7 @@
 
   template<typename  M1, typename M2> 
-  class ForkMap : public MapBase<typename M1::Key, typename M1::Value> {
-    const M1& m1;
-    const M2& m2;
+  class ForkWriteMap : public MapBase<typename M1::Key, typename M1::Value> {
+    M1& m1;
+    M2& m2;
   public:
     typedef MapBase<typename M1::Key, typename M1::Value> Parent;
@@ -810,7 +927,7 @@
 
     ///Constructor
-    ForkMap(const M1 &_m1,const M2 &_m2) : m1(_m1), m2(_m2) {};
+    ForkWriteMap(M1 &_m1, M2 &_m2) : m1(_m1), m2(_m2) {};
     Value operator[](Key k) const {return m1[k];}
-    //    void set(Key k, const Value &v) {m1.set(k,v); m2.set(k,v);}
+    void set(Key k, const Value &v) {m1.set(k,v); m2.set(k,v);}
   };
   
@@ -823,6 +940,11 @@
   ///\todo Wrong scope in Doxygen when \c \\relates is used
   template <typename M1, typename M2> 
-  inline ForkMap<M1, M2> forkMap(const M1 &m1,const M2 &m2) {
+  inline ForkMap<M1, M2> forkMap(const M1 &m1, const M2 &m2) {
     return ForkMap<M1, M2>(m1,m2);
+  }
+
+  template <typename M1, typename M2> 
+  inline ForkWriteMap<M1, M2> forkMap(M1 &m1, M2 &m2) {
+    return ForkWriteMap<M1, M2>(m1,m2);
   }
 
@@ -851,4 +973,25 @@
     Value operator[](Key k) const {return !m[k];}
   };
+
+  ///Logical 'not' of a map with writing possibility
+  
+  ///This bool \ref concept::ReadWriteMap "read-write map" returns the 
+  ///logical negation of value returned by the given map. It is setted
+  ///then the negation of the value be setted to the original map.
+  ///Its \c Key and will be inherited from \c M,
+  ///its Value is <tt>bool</tt>.
+  template <typename M> 
+  class NotWriteMap : public MapBase<typename M::Key, bool> {
+    M& m;
+  public:
+    typedef MapBase<typename M::Key, bool> Parent;
+    typedef typename Parent::Key Key;
+    typedef typename Parent::Value Value;
+
+    /// Constructor
+    NotWriteMap(M &_m) : m(_m) {};
+    Value operator[](Key k) const {return !m[k];}
+    void set(Key k, bool v) { m.set(k, !v); }
+  };
   
   ///Returns a \ref NotMap class
@@ -861,4 +1004,9 @@
   }
 
+  template <typename M> 
+  inline NotWriteMap<M> notMap(M &m) {
+    return NotWriteMap<M>(m);
+  }
+
   /// \brief Writable bool map for store each true assigned elements.
   ///
Index: test/maps_test.cc
===================================================================
--- test/maps_test.cc	(revision 1956)
+++ test/maps_test.cc	(revision 2032)
@@ -17,4 +17,7 @@
  */
 
+#include <deque>
+#include <set>
+
 #include <lemon/concept_check.h>
 #include <lemon/concept/maps.h>
@@ -27,4 +30,5 @@
 
 struct A {};
+inline bool operator<(A, A) { return true; }
 struct B {};
 
@@ -42,4 +46,8 @@
 
 typedef ReadMap<A,double> DoubleMap;
+typedef ReadWriteMap<A, double> WriteDoubleMap;
+
+typedef ReadMap<A,bool> BoolMap;
+typedef ReadWriteMap<A, bool> BoolWriteMap;
 
 int main()
@@ -56,11 +64,27 @@
   checkConcept<ReadMap<A,double>, DivMap<DoubleMap,DoubleMap> >();
   checkConcept<ReadMap<A,double>, NegMap<DoubleMap> >();
+  checkConcept<ReadWriteMap<A,double>, NegWriteMap<WriteDoubleMap> >();
   checkConcept<ReadMap<A,double>, AbsMap<DoubleMap> >();
   checkConcept<ReadMap<A,double>, ShiftMap<DoubleMap> >();
+  checkConcept<ReadWriteMap<A,double>, ShiftWriteMap<WriteDoubleMap> >();
   checkConcept<ReadMap<A,double>, ScaleMap<DoubleMap> >();
+  checkConcept<ReadWriteMap<A,double>, ScaleWriteMap<WriteDoubleMap> >();
+  checkConcept<ReadMap<A,double>, ForkMap<DoubleMap, DoubleMap> >();
+  checkConcept<ReadWriteMap<A,double>, 
+    ForkWriteMap<WriteDoubleMap, WriteDoubleMap> >();
   
   checkConcept<ReadMap<B,double>, ComposeMap<DoubleMap,ReadMap<B,A> > >();
 
   checkConcept<ReadMap<A,B>, FunctorMap<F, A, B> >();
+
+  checkConcept<ReadMap<A, bool>, NotMap<BoolMap> >();
+  checkConcept<ReadWriteMap<A, bool>, NotWriteMap<BoolWriteMap> >();
+
+  checkConcept<WriteMap<A, bool>, StoreBoolMap<A*> >();
+  checkConcept<WriteMap<A, bool>, BackInserterBoolMap<std::deque<A> > >();
+  checkConcept<WriteMap<A, bool>, FrontInserterBoolMap<std::deque<A> > >();
+  checkConcept<WriteMap<A, bool>, InserterBoolMap<std::set<A> > >();
+  checkConcept<WriteMap<A, bool>, FillBoolMap<WriteMap<A, B> > >();
+  checkConcept<WriteMap<A, bool>, SettingOrderBoolMap<WriteMap<A, int> > >();
 
   int a;
