ADMB Documentation  -a65f1c97
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
dvect22.cpp
Go to the documentation of this file.
1 /*
2  * $Id$
3  *
4  * Author: David Fournier
5  * Copyright (c) 2008-2012 Regents of the University of California
6  */
11 #include <fvar.hpp>
12 
18 {
19  int mmin=indexmin();
20  int mmax=indexmax();
21  dvector tmp(mmin,mmax);
22  double* pvi = v + mmin;
23  double* ptmpi = tmp.get_v() + mmin;
24  for (int i=mmin;i<=mmax;i++)
25  {
26  *ptmpi = -(*pvi);
27 
28  ++pvi;
29  ++ptmpi;
30  }
31  return tmp;
32 }
double * v
pointer to the data
Definition: dvector.h:53
dvector operator-()
Description not yet available.
Definition: dvect22.cpp:17
Vector of double precision numbers.
Definition: dvector.h:50
int indexmin() const
Get minimum valid index.
Definition: dvector.h:199
int indexmax() const
Get maximum valid index.
Definition: dvector.h:204
Author: David Fournier Copyright (c) 2008-2012 Regents of the University of California.
double *& get_v(void)
Definition: dvector.h:148