CppAD: A C++ Algorithmic Differentiation Package 20110419
test_vector.hpp
Go to the documentation of this file.
00001 /* $Id$ */
00002 # ifndef CPPAD_TEST_VECTOR_INCLUDED
00003 # define CPPAD_TEST_VECTOR_INCLUDED
00004 
00005 /* --------------------------------------------------------------------------
00006 CppAD: C++ Algorithmic Differentiation: Copyright (C) 2003-08 Bradley M. Bell
00007 
00008 CppAD is distributed under multiple licenses. This distribution is under
00009 the terms of the 
00010                     Common 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 test_vector$$
00018 $spell
00019         ifdef
00020         undef
00021         Microsofts
00022         CppADvector
00023         hpp
00024         std
00025         endif
00026         ublas
00027         Dir
00028         valarray
00029         stdvector
00030 $$
00031 
00032 $index CPPAD_TEST_VECTOR$$
00033 $index vector, test$$
00034 $index test, vector$$
00035 
00036 $section Choosing The Vector Testing Template Class$$
00037 
00038 $head Syntax$$
00039 $syntax%CPPAD_TEST_VECTOR<%Scalar%>
00040 %$$
00041 
00042 $head Introduction$$
00043 Many of the CppAD $xref/example//examples/$$ and tests use 
00044 the $code CPPAD_TEST_VECTOR$$ template class to pass information.
00045 The default definition for this template class is
00046 $xref/CppAD_vector//CppAD::vector/$$.
00047 
00048 $head MS Windows$$
00049 The include path for boost is not defined in the Windows project files.
00050 If we are using Microsofts compiler, the following code overrides the setting
00051 of $code CPPAD_BOOSTVECTOR$$:
00052 $codep */
00053 // The next 7 lines are C++ source code.
00054 # ifdef _MSC_VER
00055 # if CPPAD_BOOSTVECTOR
00056 # undef  CPPAD_BOOSTVECTOR
00057 # define CPPAD_BOOSTVECTOR 0
00058 # undef  CPPAD_CPPADVECTOR
00059 # define CPPAD_CPPADVECTOR 1
00060 # endif
00061 # endif
00062 /* $$
00063 
00064 $head CppAD::vector$$
00065 By default $code CPPAD_CPPADVECTOR$$ is true
00066 and $code CPPAD_TEST_VECTOR$$ is defined by the following source code
00067 $codep */
00068 // The next 3 line are C++ source code.
00069 # if CPPAD_CPPADVECTOR
00070 # define CPPAD_TEST_VECTOR CppAD::vector
00071 # endif
00072 /* $$
00073 You can replace this definition of the preprocessor symbol
00074 $code CPPAD_TEST_VECTOR$$ by any other $xref/SimpleVector/$$ template class.
00075 This will test using your replacement template vector class with CppAD.
00076 
00077 $head std::vector$$
00078 If you specify $code --with-stdvector$$ on the 
00079 $cref/configure/InstallUnix/Configure/$$
00080 command line during CppAD installation,
00081 $code CPPAD_STDVECTOR$$ is true
00082 and $code CPPAD_TEST_VECTOR$$ is defined by the following source code
00083 $codep */
00084 // The next 4 lines are C++ source code.
00085 # if CPPAD_STDVECTOR
00086 # include <vector>
00087 # define CPPAD_TEST_VECTOR std::vector
00088 # endif
00089 /* $$
00090 In this case CppAD will use $code std::vector$$ for its examples and tests.
00091 Use of $code CppAD::vector$$, $code std::vector$$,
00092 and $code std::valarray$$ with CppAD is always tested to some degree.
00093 Specifying $code --with-stdvector$$ will increase the amount of
00094 $code std::vector$$ testing. 
00095 
00096 $head boost::numeric::ublas::vector$$
00097 If you specify a value for $italic BoostDir$$ on the configure
00098 command line during CppAD installation,
00099 $code CPPAD_BOOSTVECTOR$$ is true 
00100 and $code CPPAD_TEST_VECTOR$$ is defined by the following source code
00101 $codep */
00102 // The next 4 lines are C++ source code.
00103 # if CPPAD_BOOSTVECTOR
00104 # include <boost/numeric/ublas/vector.hpp>
00105 # define CPPAD_TEST_VECTOR boost::numeric::ublas::vector
00106 # endif
00107 /* $$
00108 In this case CppAD will use Ublas vectors for its examples and tests.
00109 Use of $code CppAD::vector$$, $code std::vector$$,
00110 and $code std::valarray$$ with CppAD is always tested to some degree.
00111 Specifying $italic BoostDir$$ will increase the amount of
00112 Ublas vector testing. 
00113 
00114 $head Deprecated$$
00115 $index CppADvector, deprecated$$
00116 $index deprecated, CppADvector$$
00117 The preprocessor symbol $code CppADvector$$ is defined to
00118 have the same value as $code CPPAD_TEST_VECTOR$$ but its use is deprecated
00119 $codep */
00120 # define CppADvector CPPAD_TEST_VECTOR
00121 /* $$
00122 $end
00123 ------------------------------------------------------------------------ 
00124 */
00125 
00126 # endif