[CppAD] Getting the value of AD<Base> objects without calling Value()

Brad Bell bradbell at seanet.com
Tue Oct 10 08:18:41 EDT 2006


I thought that the discrete functions specified in
   http://www.coin-or.org/CppAD/Doc/discrete.htm
could be used to convert a variable to a parameter, but this is not the 
case. (You can call Value(x) during tape recording so long as x is a 
parameter.). Thus you have pointed out a missing feature in CppAD.

I have added a new function for this called var2par; see
   http://www.coin-or.org/CppAD/Doc/var2par.htm
Its example
   http://www.coin-or.org/CppAD/Doc/var2par.cpp.htm
demonstrates how to do what you are asking for.

Mitch Watrous wrote:

> Hi.
>
> Is there a way to get the Base value of an AD<Base> type that is an 
> independent variable being taped other than using the Value function, 
> which won't work for such a variable?
>
> Mitch
> _______________________________________________
> CppAD mailing list
> CppAD at list.coin-or.org
> http://list.coin-or.org/mailman/listinfo/cppad
>
>



More information about the CppAD mailing list