source: trunk/test_more/check_simple_vector.cpp @ 1632

Last change on this file since 1632 was 1612, checked in by bradbell, 11 years ago

trunk: Improve cummulative addition speed (only affects optimized tape). only error exit when doxygen version >= 1.5.5.
check_simple_vector.cpp: fix error when compiling with boost library. include csum_op.hpp in distribution.
whats_new_09.omh: changes from uses point of view.
player.hpp: add special functions for CSumOp variable number of arguments.
prototype.hpp: minor edits to doxygen documentation.
optimize.hpp: use separate stack for operators, adds, and subtracts.
op.hpp: include csum_op.hpp in source.

Convert CAddOp, CSubOp and CSumOp to just CSumOp:

for_jac_sweep.hpp, op_code.hpp, forward0sweep.hpp, forward_sweep.hpp,
rev_jac_sweep.hpp, rev_hes_sweep.hpp, reverse_sweep.hpp


Subversion download will not work because changes to needs
to be checked in (from a different system with different version of automake).

  • Property svn:keywords set to Id
File size: 1.3 KB
1/* $Id: check_simple_vector.cpp 1612 2009-12-22 13:51:29Z bradbell $ */
2/* --------------------------------------------------------------------------
3CppAD: C++ Algorithmic Differentiation: Copyright (C) 2003-09 Bradley M. Bell
5CppAD is distributed under multiple licenses. This distribution is under
6the terms of the
7                    Common Public License Version 1.0.
9A copy of this license is included in the COPYING file of this distribution.
10Please visit for information on other licenses.
11-------------------------------------------------------------------------- */
13# include <cppad/cppad.hpp>
14# include <set>
15# include <vector>
16# include <valarray>
18namespace {
19        template <class Scalar>
20        void Case(const Scalar& x, const Scalar& y)
21        {       using CppAD::CheckSimpleVector;
23                CheckSimpleVector<Scalar, CppAD::vector<Scalar> > (x, y);
24                CheckSimpleVector<Scalar, std::vector<Scalar>   > (x, y);
25                CheckSimpleVector<Scalar, std::valarray<Scalar> > (x, y);
27                typedef boost::numeric::ublas::vector<Scalar> boost_vector;
28                CheckSimpleVector<Scalar, boost_vector > (x, y);
29# endif
30        }
32bool check_simple_vector(void)
33{       // Unusal test in that CheckSimpleVector will abort if an error occurs
34        Case(float(0), float(1));
35        Case(double(0), double(1));
36        //
37        std::set<size_t> x, y;
38        x.insert(1);
39        y.insert(2);
40        Case(x, y);
41        //
42        return true;
Note: See TracBrowser for help on using the repository browser.