Statistics
| Revision:

root / trunk / src / linad99 / dvect20.cpp @ 1609

History | View | Annotate | Download (652 Bytes)

1 417 arnima
/*
2
 * $Id$
3
 *
4
 * Author: David Fournier
5 1112 johnoel
 * Copyright (c) 2008-2012 Regents of the University of California
6 417 arnima
 */
7
/**
8
 * \file
9
 * Description not yet available.
10
 */
11
#include "fvar.hpp"
12
13
/**
14 1609 stevenmartell
 * Divide elements of a vector by a constant
15
 * \param x constant to divide vector by.
16 417 arnima
 */
17 1112 johnoel
dvector& dvector::operator /= ( CGNU_DOUBLE x)
18
{
19
  for (int i=indexmin(); i<=indexmax(); i++)
20 417 arnima
  {
21 1112 johnoel
    elem(i)/=x;
22 417 arnima
  }
23 1112 johnoel
  return(*this);
24
}
25 417 arnima
26
/**
27 1609 stevenmartell
 * Multiply elements of a vector by a constant.
28
 * \param x constant for multiplication.
29 417 arnima
 */
30 1112 johnoel
dvector& dvector::operator *= ( CGNU_DOUBLE x)
31
{
32
  for (int i=indexmin(); i<=indexmax(); i++)
33 417 arnima
  {
34 1112 johnoel
    elem(i)*=x;
35 417 arnima
  }
36 1112 johnoel
  return(*this);
37
}