ADMB Documentation  11.5.3197
 All Classes Files Functions Variables Typedefs Friends Defines
f1b2vc7.cpp
Go to the documentation of this file.
00001 /*
00002  * $Id$
00003  *
00004  * Author: David Fournier
00005  * Copyright (c) 2008-2012 Regents of the University of California
00006  */
00011 #include <df1b2fun.h>
00012 
00017 df1b2vector& df1b2vector::shift(int min)
00018 {
00019   v += indexmin()-min;
00020   index_max=index_max-index_min+min;
00021   index_min=min;
00022   //shape->shift(min);
00023   return *this;
00024 }
00025 
00026 /*
00027  df1b2vector::df1b2vector(const predf1b2vector& pdv)
00028  {
00029 #ifndef OPT_LIB
00030    if (pdv.ub<pdv.lb)
00031    {
00032      cerr << "lower index greater than upper index in df1b2vector::"
00033        " dvar-vector(const predf1b2vector&) " << endl;
00034      ad_exit (1);
00035    }
00036    if ((pdv.lb<pdv.p->indexmin()) || (pdv.lb>pdv.p->indexmax()))
00037    {
00038      cerr << "lower index out of bounds in df1b2vector::"
00039        " operator(int lb,int ub) " << endl;
00040      ad_exit (1);
00041    }
00042 
00043    if ((pdv.ub<pdv.p->indexmin()) || (pdv.ub>pdv.p->indexmax()))
00044    {
00045      cerr << " upper index out of bounds in df1b2vector::"
00046        " operator(int lb,int ub) " << endl;
00047      ad_exit (1);
00048    }
00049 #endif
00050    index_min=pdv.lb;
00051    index_max=pdv.ub;
00052    shape=pdv.p->shape;
00053    (shape->ncopies)++;
00054    v = pdv.p->v;
00055  }
00056 */