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 dvariable mf_upper_bound(const prevariable& x, double M, prevariable& fpen) 00018 { 00019 if (x<=M) 00020 { 00021 return x; 00022 } 00023 else 00024 { 00025 fpen+=square(x-M); 00026 return M+(1.+2.*(x-M))/(1.+x-M); 00027 } 00028 }
Generated on Tue Mar 8 2016 19:51:34 for ADMB Documentation by 1.8.0 |