Changeset 1536:308150155bb5 in lemon0.x for lemon/maps.h
 Timestamp:
 07/04/05 18:27:54 (16 years ago)
 Branch:
 default
 Phase:
 public
 Convert:
 svn:c9d7d8f590d60310b91f818b3a526b0e/lemon/trunk@2028
 File:

 1 edited
Legend:
 Unmodified
 Added
 Removed

lemon/maps.h
r1531 r1536 228 228 ///Its \c Value is inherited from \c M. 229 229 /// 230 ///Actually,231 ///\code232 /// ConvertMap<X> sh(x,v);233 ///\endcode234 ///it is equivalent with235 ///\code236 /// ConstMap<X::Key, X::Value> c_tmp(v);237 /// AddMap<X, ConstMap<X::Key, X::Value> > sh(x,v);238 ///\endcode239 230 ///\bug wrong documentation 240 231 template<class M, class T> … … 253 244 254 245 ///Constructor 255 ///\param _m is the undelying map 256 ///\param _v is the convert value 246 ///\param _m is the underlying map 257 247 ConvertMap(const M &_m) : m(_m) {}; 258 248 … … 260 250 /// 261 251 /// The subscript operator. 262 /// \param edge The edge252 /// \param k The key 263 253 /// \return The target of the edge 264 254 Value operator[](Key k) const {return m[k];} … … 298 288 299 289 ///Constructor 300 301 ///\e302 ///303 290 AddMap(const M1 &_m1,const M2 &_m2) : m1(_m1), m2(_m2) {}; 304 291 Value operator[](Key k) const {return m1[k]+m2[k];} … … 387 374 388 375 ///Constructor 389 390 ///\e391 ///392 376 SubMap(const M1 &_m1,const M2 &_m2) : m1(_m1), m2(_m2) {}; 393 377 Value operator[](Key k) const {return m1[k]m2[k];} … … 427 411 428 412 ///Constructor 429 430 ///\e431 ///432 413 MulMap(const M1 &_m1,const M2 &_m2) : m1(_m1), m2(_m2) {}; 433 414 Value operator[](Key k) const {return m1[k]*m2[k];} … … 513 494 514 495 ///Constructor 515 516 ///\e517 ///518 496 DivMap(const M1 &_m1,const M2 &_m2) : m1(_m1), m2(_m2) {}; 519 497 Value operator[](Key k) const {return m1[k]/m2[k];} … … 561 539 562 540 ///Constructor 563 564 ///\e565 ///566 541 ComposeMap(const M1 &_m1,const M2 &_m2) : m1(_m1), m2(_m2) {}; 567 542 Value operator[](Key k) const {return m1[m2[k]];} … … 616 591 617 592 ///Constructor 618 619 ///\e620 ///621 593 CombineMap(const M1 &_m1,const M2 &_m2,const F &_f) 622 594 : m1(_m1), m2(_m2), f(_f) {}; … … 667 639 668 640 ///Constructor 669 670 ///\e671 ///672 641 NegMap(const M &_m) : m(_m) {}; 673 642 Value operator[](Key k) const {return m[k];} … … 721 690 722 691 ///Constructor 723 724 ///\e725 ///726 692 AbsMap(const M &_m) : m(_m) {}; 727 693 Value operator[](Key k) const {Value tmp=m[k]; return tmp>=0?tmp:tmp;} … … 764 730 765 731 ///Constructor 766 767 ///\e768 ///769 732 FunctorMap(const F &_f) : f(_f) {}; 770 733 Value operator[](Key k) const {return f(k);}
Note: See TracChangeset
for help on using the changeset viewer.