COIN-OR::LEMON - Graph Library

Changeset 1706:163746ec3094 in lemon-0.x


Ignore:
Timestamp:
10/05/05 15:19:30 (14 years ago)
Author:
Balazs Dezso
Branch:
default
Phase:
public
Convert:
svn:c9d7d8f5-90d6-0310-b91f-818b3a526b0e/lemon/trunk@2233
Message:

Removing NeedCopy?

File:
1 edited

Legend:

Unmodified
Added
Removed
  • lemon/xy.h

    r1588 r1706  
    365365  class XMap
    366366  {
    367     typename SmartReference<M>::Type _map;
     367    M& _map;
    368368  public:
    369     typedef True NeedCopy;
    370369
    371370    typedef typename M::Value::Value Value;
    372371    typedef typename M::Key Key;
    373372    ///\e
    374     XMap(typename SmartParameter<M>::Type map) : _map(map) {}
     373    XMap(M& map) : _map(map) {}
    375374    Value operator[](Key k) const {return _map[k].x;}
    376375    void set(Key k,Value v) {_map.set(k,typename M::Value(v,_map[k].y));}
     
    402401  class ConstXMap
    403402  {
    404     typename SmartConstReference<M>::Type _map;
     403    const M& _map;
    405404  public:
    406     typedef True NeedCopy;
    407405
    408406    typedef typename M::Value::Value Value;
     
    432430  class YMap
    433431  {
    434     typename SmartReference<M>::Type _map;
     432    M& _map;
    435433  public:
    436     typedef True NeedCopy;
    437434
    438435    typedef typename M::Value::Value Value;
    439436    typedef typename M::Key Key;
    440437    ///\e
    441     YMap(typename SmartParameter<M>::Type map) : _map(map) {}
     438    YMap(M& map) : _map(map) {}
    442439    Value operator[](Key k) const {return _map[k].y;}
    443440    void set(Key k,Value v) {_map.set(k,typename M::Value(_map[k].x,v));}
     
    469466  class ConstYMap
    470467  {
    471     typename SmartConstReference<M>::Type _map;
     468    const M& _map;
    472469  public:
    473     typedef True NeedCopy;
    474470
    475471    typedef typename M::Value::Value Value;
     
    501497  class NormSquareMap
    502498  {
    503     typename SmartConstReference<M>::Type _map;
     499    const M& _map;
    504500  public:
    505     typedef True NeedCopy;
    506501
    507502    typedef typename M::Value::Value Value;
Note: See TracChangeset for help on using the changeset viewer.