Changeset 2325


Ignore:
Timestamp:
Sep 22, 2010, 5:05:37 PM (11 years ago)
Author:
Peter
Message:

prefer using std::swap and avoid long lines

File:
1 edited

Legend:

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

    r2210 r2325  
    3535#include <gsl/gsl_blas.h>
    3636
     37#include <algorithm>
    3738#include <cassert>
    3839#include <climits>
     
    477478        throw utility::GSL_error("Matrix::operator*= failed to allocate memory");
    478479    }
    479     gsl_blas_dgemm(CblasNoTrans, CblasNoTrans, 1.0, m_, other.m_, 0.0, blas_result_);
    480     gsl_matrix* tmp=m_;
    481     m_ = blas_result_;
    482     blas_result_=tmp;
     480    gsl_blas_dgemm(CblasNoTrans, CblasNoTrans, 1.0, m_, other.m_, 0.0,
     481                   blas_result_);
     482    std::swap(m_, blas_result_);
    483483    return *this;
    484484  }
Note: See TracChangeset for help on using the changeset viewer.