Skip to content
Snippets Groups Projects
Commit 706b308f authored by Oliver Sander's avatar Oliver Sander
Browse files

operator-=

[[Imported from SVN: r530]]
parent a30417a6
Branches
Tags
No related merge requests found
// -*- tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
// vi: set et ts=4 sw=2 sts=2:
#ifndef __DUNE_SIMPLEVECTOR_HH
#define __DUNE_SIMPLEVECTOR_HH
#ifndef __DUNE_SIMPLEVECTOR_HH__
#define __DUNE_SIMPLEVECTOR_HH__
//***********************************************************************
......@@ -41,7 +41,7 @@ namespace Dune
return *this;
}
//!
//! Addition
SimpleVector<T>& operator+= (const SimpleVector<T>& vec)
{
for (int i=0; i<this->n; ++i)
......@@ -49,6 +49,14 @@ namespace Dune
return *this;
}
//! Subtraction
SimpleVector<T>& operator-= (const SimpleVector<T>& vec)
{
for (int i=0; i<this->n; ++i)
this->p[i] -= vec[i];
return *this;
}
//! scalar product of two vectors, no check for size !
T ddot (const SimpleVector<T>& x)
{
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment