![]() |
Prev | Next | test_vector |
CPPAD_TEST_VECTOR<
Scalar>
CPPAD_TEST_VECTOR
template class to pass information.
The default definition for this template class is
CppAD::vector
.
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_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
You can replace this definition of the preprocessor symbol
CPPAD_TEST_VECTOR
by any other SimpleVector
template class.
This will test using your replacement template vector class with CppAD.
--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.
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 BoostDir will increase the amount of
Ublas vector testing.
CppADvector
is defined to
have the same value as CPPAD_TEST_VECTOR
but its use is deprecated
# define CppADvector CPPAD_TEST_VECTOR