Ignore:
Timestamp:
Jan 8, 2009, 10:36:27 PM (13 years ago)
Author:
Peter
Message:

implementing swap function

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/yat/utility/MatrixWeighted.cc

    r1589 r1706  
    66  Copyright (C) 2005, 2006 Jari Häkkinen, Peter Johansson, Markus Ringnér
    77  Copyright (C) 2007, 2008 Jari Häkkinen, Peter Johansson
     8  Copyright (C) 2009 Peter Johansson
    89
    910  This file is part of the yat library, http://dev.thep.lu.se/yat
     
    167168
    168169
     170  void MatrixWeighted::swap(MatrixWeighted& other)
     171  {
     172    std::swap(vec_, other.vec_);
     173    std::swap(columns_, other.columns_);
     174  }
     175
     176
    169177  void MatrixWeighted::resize(size_t rows, size_t columns)
    170178  {
     
    199207  }
    200208
     209
     210  void swap(MatrixWeighted& lhs, MatrixWeighted& rhs)
     211  {
     212    lhs.swap(rhs);
     213  }
     214
    201215}}} // of namespace utility, yat and thep
Note: See TracChangeset for help on using the changeset viewer.