CppAD: A C++ Algorithmic Differentiation Package  20130918
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-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 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 Deprecated$$
00039 $index deprecated, test vector$$
00040 The $code CPPAD_TEST_VECTOR$$ macro has been deprecated,
00041 use $cref/CPPAD_TESTVECTOR/testvector/$$ instead.
00042 
00043 $head Syntax$$
00044 $codei%CPPAD_TEST_VECTOR<%Scalar%>
00045 %$$
00046 
00047 $head Introduction$$
00048 Many of the CppAD $cref/examples/example/$$ and tests use 
00049 the $code CPPAD_TEST_VECTOR$$ template class to pass information.
00050 The default definition for this template class is
00051 $cref/CppAD::vector/CppAD_vector/$$.
00052 
00053 $head MS Windows$$
00054 The include path for boost is not defined in the Windows project files.
00055 If we are using Microsofts compiler, the following code overrides the setting
00056 of $code CPPAD_BOOSTVECTOR$$:
00057 $codep */
00058 // The next 7 lines are C++ source code.
00059 # ifdef _MSC_VER
00060 # if CPPAD_BOOSTVECTOR
00061 # undef  CPPAD_BOOSTVECTOR
00062 # define CPPAD_BOOSTVECTOR 0
00063 # undef  CPPAD_CPPADVECTOR
00064 # define CPPAD_CPPADVECTOR 1
00065 # endif
00066 # endif
00067 /* $$
00068 
00069 $head CppAD::vector$$
00070 By default $code CPPAD_CPPADVECTOR$$ is true
00071 and $code CPPAD_TEST_VECTOR$$ is defined by the following source code
00072 $codep */
00073 // The next 3 line are C++ source code.
00074 # if CPPAD_CPPADVECTOR
00075 # define CPPAD_TEST_VECTOR CppAD::vector
00076 # endif
00077 /* $$
00078 If you specify $code --with-eigenvector$$ on the 
00079 $cref/configure/InstallUnix/Configure/$$ command line,
00080 $code CPPAD_EIGENVECTOR$$ is true.
00081 This vector type cannot be supported by $code CPPAD_TEST_VECTOR$$
00082 (use $cref/CPPAD_TESTVECTOR/testvector/$$ for this support)
00083 so $code CppAD::vector$$ is used in this case
00084 $codep */
00085 // The next 3 line are C++ source code.
00086 # if CPPAD_EIGENVECTOR
00087 # define CPPAD_TEST_VECTOR CppAD::vector
00088 # endif
00089 /* $$
00090 
00091 
00092 $head std::vector$$
00093 If you specify $code --with-stdvector$$ on the 
00094 $cref/configure/InstallUnix/Configure/$$
00095 command line during CppAD installation,
00096 $code CPPAD_STDVECTOR$$ is true
00097 and $code CPPAD_TEST_VECTOR$$ is defined by the following source code
00098 $codep */
00099 // The next 4 lines are C++ source code.
00100 # if CPPAD_STDVECTOR
00101 # include <vector>
00102 # define CPPAD_TEST_VECTOR std::vector
00103 # endif
00104 /* $$
00105 In this case CppAD will use $code std::vector$$ for its examples and tests.
00106 Use of $code CppAD::vector$$, $code std::vector$$,
00107 and $code std::valarray$$ with CppAD is always tested to some degree.
00108 Specifying $code --with-stdvector$$ will increase the amount of
00109 $code std::vector$$ testing. 
00110 
00111 $head boost::numeric::ublas::vector$$
00112 If you specify a value for $icode boost_dir$$ on the configure
00113 command line during CppAD installation,
00114 $code CPPAD_BOOSTVECTOR$$ is true 
00115 and $code CPPAD_TEST_VECTOR$$ is defined by the following source code
00116 $codep */
00117 // The next 4 lines are C++ source code.
00118 # if CPPAD_BOOSTVECTOR
00119 # include <boost/numeric/ublas/vector.hpp>
00120 # define CPPAD_TEST_VECTOR boost::numeric::ublas::vector
00121 # endif
00122 /* $$
00123 In this case CppAD will use Ublas vectors for its examples and tests.
00124 Use of $code CppAD::vector$$, $code std::vector$$,
00125 and $code std::valarray$$ with CppAD is always tested to some degree.
00126 Specifying $icode boost_dir$$ will increase the amount of
00127 Ublas vector testing. 
00128 
00129 $head CppADvector$$
00130 The preprocessor symbol $code CppADvector$$ is defined to
00131 have the same value as $code CPPAD_TEST_VECTOR$$ but its use is deprecated:
00132 $codep */
00133 # define CppADvector CPPAD_TEST_VECTOR
00134 /* $$
00135 $end
00136 ------------------------------------------------------------------------ 
00137 */
00138 
00139 # endif
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines