Prev Next test_vector

@(@\newcommand{\W}[1]{ \; #1 \; } \newcommand{\R}[1]{ {\rm #1} } \newcommand{\B}[1]{ {\bf #1} } \newcommand{\D}[2]{ \frac{\partial #1}{\partial #2} } \newcommand{\DD}[3]{ \frac{\partial^2 #1}{\partial #2 \partial #3} } \newcommand{\Dpow}[2]{ \frac{\partial^{#1}}{\partial {#2}^{#1}} } \newcommand{\dpow}[2]{ \frac{ {\rm d}^{#1}}{{\rm d}\, {#2}^{#1}} }@)@
Choosing The Vector Testing Template Class

Deprecated 2012-07-03
The CPPAD_TEST_VECTOR macro has been deprecated, use CPPAD_TESTVECTOR instead.

Syntax
CPPAD_TEST_VECTOR<Scalar>

Introduction
Many of the CppAD examples and tests use the CPPAD_TEST_VECTOR template class to pass information. The default definition for this template class is CppAD::vector .

MS Windows
The include path for boost is not defined in the Windows project files. If we are using Microsofts compiler, the following code overrides the setting of CPPAD_BOOSTVECTOR:
// The next 7 lines are C++ source code.
# ifdef _MSC_VER
# if CPPAD_BOOSTVECTOR
# undef  CPPAD_BOOSTVECTOR
# define CPPAD_BOOSTVECTOR 0
# undef  CPPAD_CPPADVECTOR
# define CPPAD_CPPADVECTOR 1
# endif
# endif

CppAD::vector
By default CPPAD_CPPADVECTOR is true and CPPAD_TEST_VECTOR is defined by the following source code
// The next 3 line are C++ source code.
# if CPPAD_CPPADVECTOR
# define CPPAD_TEST_VECTOR CppAD::vector
# endif
If you specify --with-eigenvector on the configure command line, CPPAD_EIGENVECTOR is true. This vector type cannot be supported by CPPAD_TEST_VECTOR (use CPPAD_TESTVECTOR for this support) so CppAD::vector is used in this case
// The next 3 line are C++ source code.
# if CPPAD_EIGENVECTOR
# define CPPAD_TEST_VECTOR CppAD::vector
# endif

std::vector
If you specify --with-stdvector on the configure command line during CppAD installation, CPPAD_STDVECTOR is true and CPPAD_TEST_VECTOR is defined by the following source code
// The next 4 lines are C++ source code.
# if CPPAD_STDVECTOR
# include <vector>
# define CPPAD_TEST_VECTOR std::vector
# endif
In this case CppAD will use std::vector for its examples and tests. Use of CppAD::vector, std::vector, and std::valarray with CppAD is always tested to some degree. Specifying --with-stdvector will increase the amount of std::vector testing.

boost::numeric::ublas::vector
If you specify a value for boost_dir on the configure command line during CppAD installation, CPPAD_BOOSTVECTOR is true and CPPAD_TEST_VECTOR is defined by the following source code
// The next 4 lines are C++ source code.
# if CPPAD_BOOSTVECTOR
# include <boost/numeric/ublas/vector.hpp>
# define CPPAD_TEST_VECTOR boost::numeric::ublas::vector
# endif
In this case CppAD will use Ublas vectors for its examples and tests. Use of CppAD::vector, std::vector, and std::valarray with CppAD is always tested to some degree. Specifying boost_dir will increase the amount of Ublas vector testing.

CppADvector Deprecated 2007-07-28
The preprocessor symbol CppADvector is defined to have the same value as CPPAD_TEST_VECTOR but its use is deprecated:

# define CppADvector CPPAD_TEST_VECTOR

Input File: cppad/core/test_vector.hpp