valvector_ad_join

View page source

Join a Vector of AD valvectors

Join a vector of AD<valvector>, each with size one, into one AD<valvector>.

Syntax

valvector_ad_join ajoin
ajoin( *ax_vec , ay )

m

We use m to denote ax_vec .size() .

ax_vec

This is a SimpleVector with elements of type CppAD::AD<valvector> . It is const and is passed by reference. For i = 0 , … , m - 1 , the size ax [ i ].size() is one.

ay

This CppAD::AD<valvector> is passed by reference and its input value does not matter. Upon return, its size in m and for i = 0 , … , m - 1

ay[i] = ax_vec[i][0]

Example

The file valvector_ad_join.cpp is an example and test of this operation.