00001 /* 00002 * $Id$ 00003 * 00004 * Author: David Fournier 00005 * Copyright (c) 2008-2012 Regents of the University of California 00006 */ 00011 #include <fvar.hpp> 00012 00017 dvector operator&(const dvector& t1, const dvector& t2) 00018 { 00019 int size =t1.size()+t2.size(); 00020 dvector tmp(1,size); 00021 int min=t1.indexmin(); 00022 int max=t1.indexmax(); 00023 int ii=0; 00024 int i; 00025 for (i=min;i<=max;i++) 00026 { 00027 tmp(++ii)=t1(i); 00028 } 00029 min=t2.indexmin(); 00030 max=t2.indexmax(); 00031 for (i=min;i<=max;i++) 00032 { 00033 tmp(++ii)=t2(i); 00034 } 00035 return tmp; 00036 } 00037 00042 dvar_vector operator&(const dvar_vector& t1, const dvar_vector& t2) 00043 { 00044 int size =t1.size()+t2.size(); 00045 dvar_vector tmp(1,size); 00046 int min=t1.indexmin(); 00047 int max=t1.indexmax(); 00048 int ii=0; 00049 int i; 00050 for (i=min;i<=max;i++) 00051 { 00052 tmp(++ii)=t1(i); 00053 } 00054 min=t2.indexmin(); 00055 max=t2.indexmax(); 00056 for (i=min;i<=max;i++) 00057 { 00058 tmp(++ii)=t2(i); 00059 } 00060 return tmp; 00061 }
Generated on Tue Mar 8 2016 19:51:32 for ADMB Documentation by 1.8.0 |