CppAD: A C++ Algorithmic Differentiation Package  20130102
testvector.hpp
Go to the documentation of this file.
00001 /* $Id$ */
00002 # ifndef CPPAD_TESTVECTOR_INCLUDED
00003 # define CPPAD_TESTVECTOR_INCLUDED
00004 
00005 /* --------------------------------------------------------------------------
00006 CppAD: C++ Algorithmic Differentiation: Copyright (C) 2003-12 Bradley M. Bell
00007 
00008 CppAD is distributed under multiple licenses. This distribution is under
00009 the terms of the 
00010                     Eclipse Public License Version 1.0.
00011 
00012 A copy of this license is included in the COPYING file of this distribution.
00013 Please visit http://www.coin-or.org/CppAD/ for information on other licenses.
00014 -------------------------------------------------------------------------- */
00015 
00016 /*
00017 $begin testvector$$
00018 $spell
00019      CppAD
00020      cmake
00021      testvector
00022      cppad
00023      Eigen
00024      ifdef
00025      hpp
00026      std
00027      endif
00028      ublas
00029 $$
00030 
00031 $index CPPAD_TESTVECTOR$$
00032 $index vector, test$$
00033 $index test, vector$$
00034 
00035 $section Using The CppAD Test Vector Template Class$$
00036 
00037 $head Syntax$$
00038 $codei%CPPAD_TESTVECTOR(%Scalar%)
00039 %$$
00040 
00041 $head Introduction$$
00042 Many of the CppAD $cref/examples/example/$$ and tests use 
00043 the $code CPPAD_TESTVECTOR$$ template class to pass information to CppAD.
00044 This is not a true template class because it's syntax uses
00045 $codei%(%Scalar%)%$$ instead of $codei%<%Scalar%>%$$.
00046 This enables us to use
00047 $codei%
00048      Eigen::Matrix<%Scalar%, Eigen::Dynamic, 1>
00049 %$$
00050 as one of the possible cases for this 'template class'.
00051 
00052 $head CppAD::vector$$
00053 If in the $cref/cmake command/cmake/CMake Command/$$
00054 you specify $cref cppad_testvector$$ to be $code cppad$$,
00055 $code CPPAD_CPPADVECTOR$$ will be true.
00056 In this case,
00057 $code CPPAD_TESTVECTOR$$ is defined by the following source code:
00058 $codep */
00059 # if CPPAD_CPPADVECTOR
00060 # define CPPAD_TESTVECTOR(Scalar) CppAD::vector< Scalar >
00061 # endif
00062 /* $$
00063 In this case CppAD will use its own vector for 
00064 many of its examples and tests.
00065 
00066 $head std::vector$$
00067 If in the cmake command
00068 you specify $icode cppad_testvector$$ to be $code std$$,
00069 $code CPPAD_STDVECTOR$$ will be true.
00070 In this case,
00071 $code CPPAD_TESTVECTOR$$ is defined by the following source code:
00072 $codep */
00073 # if CPPAD_STDVECTOR
00074 # include <vector>
00075 # define CPPAD_TESTVECTOR(Scalar) std::vector< Scalar >
00076 # endif
00077 /* $$
00078 In this case CppAD will use standard vector for 
00079 many of its examples and tests.
00080 
00081 $head boost::numeric::ublas::vector$$
00082 If in the cmake command
00083 you specify $icode cppad_testvector$$ to be $code boost$$,
00084 $code CPPAD_BOOSTVECTOR$$ will be true.
00085 In this case,
00086 $code CPPAD_TESTVECTOR$$ is defined by the following source code:
00087 $codep */
00088 # if CPPAD_BOOSTVECTOR
00089 # include <boost/numeric/ublas/vector.hpp>
00090 # define CPPAD_TESTVECTOR(Scalar) boost::numeric::ublas::vector< Scalar >
00091 # endif
00092 /* $$
00093 In this case CppAD will use this boost vector for 
00094 many of its examples and tests.
00095 
00096 $head Eigen Vectors$$
00097 If in the cmake command
00098 you specify $icode cppad_testvector$$ to be $code eigen$$,
00099 $code CPPAD_EIGENVECTOR$$ will be true.
00100 In this case,
00101 $code CPPAD_TESTVECTOR$$ is defined by the following source code:
00102 $codep */
00103 # if CPPAD_EIGENVECTOR
00104 # include <cppad/example/cppad_eigen.hpp>
00105 # define CPPAD_TESTVECTOR(Scalar) Eigen::Matrix< Scalar , Eigen::Dynamic, 1>
00106 # endif
00107 /* $$
00108 In this case CppAD will use the Eigen vector 
00109 for many of its examples and tests.
00110 
00111 $end
00112 ------------------------------------------------------------------------ 
00113 */
00114 
00115 # endif
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines