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 #if defined(__TURBOC__) 00013 #pragma hdrstop 00014 #include <alloc.h> 00015 #endif 00016 00017 #include <stdlib.h> 00018 00023 dvar_vector& dvar_vector::operator=(const dvector& t) 00024 { 00025 if (indexmin() != t.indexmin() || indexmax() != t.indexmax()) 00026 { 00027 cerr << " Incompatible bounds in " 00028 "dvar_vector& dvar_vector::operator = (const dvector& t)\n"; 00029 ad_exit(21); 00030 } 00031 00032 for ( int i=indexmin(); i<=indexmax(); i++) 00033 { 00034 va[i].x=t[i]; 00035 } 00036 save_identifier_string("b"); 00037 this->save_dvar_vector_position(); 00038 save_identifier_string("a"); 00039 gradient_structure::GRAD_STACK1-> 00040 set_gradient_stack(dv_init); 00041 return(*this); 00042 }
Generated on Tue Mar 8 2016 19:51:33 for ADMB Documentation by 1.8.0 |