ADMB Documentation  11.1.2397
 All Classes Files Functions Variables Typedefs Friends Defines
ivec3.cpp
Go to the documentation of this file.
00001 /*
00002  * $Id: ivec3.cpp 542 2012-07-10 21:04:06Z johnoel $
00003  *
00004  * Author: David Fournier
00005  * Copyright (c) 2008-2012 Regents of the University of California
00006  */
00011 #include "fvar.hpp"
00012 
00017 ivector ivector::operator()(const ivector& u)
00018  {
00019    ivector tmp(u.indexmin(),u.indexmax());
00020 
00021    for ( int i=u.indexmin(); i<=u.indexmax(); i++)
00022    {
00023      tmp(i)=(*this)(u(i));
00024    }
00025    return tmp;
00026  }
00027 
00032 lvector lvector::operator()(const lvector& u)
00033  {
00034    lvector tmp(u.indexmin(),u.indexmax());
00035 
00036    for ( int i=u.indexmin(); i<=u.indexmax(); i++)
00037    {
00038      tmp(i)=(*this)(u(i));
00039    }
00040    return tmp;
00041  }