COIN-OR::LEMON - Graph Library

Changeset 1049:e27446e1deda in lemon-0.x for src


Ignore:
Timestamp:
01/04/05 23:14:42 (16 years ago)
Author:
Alpar Juttner
Branch:
default
Phase:
public
Convert:
svn:c9d7d8f5-90d6-0310-b91f-818b3a526b0e/lemon/trunk@1443
Message:

Conversion constructor added

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/lemon/xy.h

    r1045 r1049  
    6262
    6363
     64      ///Conversion constructor
     65      template<class TT> xy(const xy<TT> &p) : x(p.x), y(p.y) {}
     66
    6467      ///Gives back the square of the norm of the vector
    6568      T normSquare(){
     
    104107        xy<T> b=*this;
    105108        return b+=u;
     109      };
     110
     111      ///Returns the neg of the vectors
     112      xy<T> operator-() const {
     113        xy<T> b=*this;
     114        b.x=-b.x; b.y=-b.y;
     115        return b;
    106116      };
    107117
Note: See TracChangeset for help on using the changeset viewer.