octave-maintainers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Algorithmic Differentiation in Octave


From: Olaf Till
Subject: Re: Algorithmic Differentiation in Octave
Date: Sat, 28 Jan 2017 09:42:43 +0100
User-agent: Mutt/1.5.23 (2014-03-12)

On Fri, Jan 27, 2017 at 01:47:49PM -0700, Brad Bell wrote:
> <...snip...>
> The function gets recorded by:
> 1. first declaring the independent variables, say the vector ax. I use ax to
> denote the fact that its elements have type a_double.
> 2. Performing Operations to eventually get the vector of dependent varialbes
> ay.
> 3. Stopping the recording and declaring that the function maps ax -> ay.
> For example, suppose that we have overloaded matrix multiplication for
> a_double and we enter
> 
> ax = m_cppad.independent(x)
> A = [ ax(0), ax(1) ; ax(2), ax(3) ]
> B = A * A
> ay=m_cppad.vec_a_double(4)
> ay(0)=B(1,1)
> ay(1)=B(1,2)
> ay(2)=B(2,1)
> ay(3)=B(2,2)
> af = m_cppad.a_fun(ax, ay)
> 
> Then the function mapping x to y (which uses matrix multiplication in its
> definition) would have been recorded in the function object af.
> Does this help ?

Yes, think I got it, thanks. The declaration of mapping at the end was
the clue.

For finding an overall way to fit this into Octave, I still have to
find out about some issues in your interface which are not clear to
me. But before asking, I'd like to give it a try, making it compile
and experimenting with it a bit. Since I have currently some other
things on my schedule, I guess it'll take a week.

Olaf

-- 
public key id EAFE0591, e.g. on x-hkp://pool.sks-keyservers.net

Attachment: signature.asc
Description: Digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]