ADMB Documentation  11.5.3197
 All Classes Files Functions Variables Typedefs Friends Defines
dvect21.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  */
00007 #include "fvar.hpp"
00008 /*
00009     dvector dvector::operator()(int low,int high)
00010     {
00011       if (low>high)
00012       {
00013         cerr << " low index > high index in"
00014                  " dvector::operator()(int low,int high)"  << endl;
00015         ad_exit(1);
00016       }
00017       if (low<indexmin())
00018       {
00019         cerr << "lower index out of bounds in"
00020                 " dvector::operator()(int low,int high)" << endl ;
00021         ad_exit(1);
00022       }
00023       if (high>indexmax())
00024       {
00025         cerr << "upper index out of bounds in"
00026                 " dvector::operator()(int low,int high)" << endl;
00027         ad_exit(1);
00028       }
00029       dvector tmp(low,high);
00030       for (int i=low;i<=high;i++)
00031       {
00032         tmp(i)=(*this)(i);
00033       }
00034       return tmp;
00035     }
00036 */