Skip to content

Commit

Permalink
master: example: valvector: move includes inside displayed code.
Browse files Browse the repository at this point in the history
  • Loading branch information
bradbell committed Apr 20, 2024
1 parent b2d3b85 commit 2c9aa47
Show file tree
Hide file tree
Showing 9 changed files with 20 additions and 14 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ IF( POLICY CMP0054 )
ENDIF( POLICY CMP0054 )
#
# cppad_version is used by version.sh to get the version number.
SET(cppad_version "20240419")
SET(cppad_version "20240420")
SET(cppad_url "https://coin-or.github.io/CppAD" )
SET(cppad_description "Differentiation of C++ Algorithms" )
IF( NOT DEFINED CMAKE_BUILD_TYPE)
Expand Down
6 changes: 6 additions & 0 deletions appendix/whats_new/2024.xrst
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,12 @@ Release Notes for 2024
mm-dd
*****

04-20
=====
The ``# include`` commands were missing at the top of
some of the valvector examples.
This has been fixed; e.g., see ref:`valvector_get_started-name` .

04-04
=====
The file example/multi_thread/bthread/get_started.cpp had an error
Expand Down
4 changes: 2 additions & 2 deletions example/valvector/ad_join.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@
// SPDX-FileCopyrightText: Bradley M. Bell <[email protected]>
// SPDX-FileContributor: 2024 Bradley M. Bell
// ---------------------------------------------------------------------------
# include <cppad/example/valvector/split_join.hpp>
# include <cppad/cppad.hpp>
/*
{xrst_begin valvector_ad_join.cpp}
Expand All @@ -19,6 +17,8 @@ Example and Test of Joining a valvector
-------------------------------------------------------------------------------
*/
// BEGIN C++
# include <cppad/example/valvector/split_join.hpp>
# include <cppad/cppad.hpp>
bool ad_join(void)
{ // ok
bool ok = true;
Expand Down
4 changes: 2 additions & 2 deletions example/valvector/ad_split.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@
// SPDX-FileCopyrightText: Bradley M. Bell <[email protected]>
// SPDX-FileContributor: 2024 Bradley M. Bell
// ---------------------------------------------------------------------------
# include <cppad/example/valvector/split_join.hpp>
# include <cppad/cppad.hpp>
/*
{xrst_begin valvector_ad_split.cpp}
Expand All @@ -19,6 +17,8 @@ Example and Test of Splitting a valvector
-------------------------------------------------------------------------------
*/
// BEGIN C++
# include <cppad/example/valvector/split_join.hpp>
# include <cppad/cppad.hpp>
bool ad_split(void)
{ // ok
bool ok = true;
Expand Down
4 changes: 2 additions & 2 deletions example/valvector/ad_sum.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@
// SPDX-FileCopyrightText: Bradley M. Bell <[email protected]>
// SPDX-FileContributor: 2024 Bradley M. Bell
// ---------------------------------------------------------------------------
# include <cppad/example/valvector/sum.hpp>
# include <cppad/cppad.hpp>
/*
{xrst_begin valvector_ad_sum.cpp}
Expand All @@ -19,6 +17,8 @@ Example and Test of Summing a valvector
-------------------------------------------------------------------------------
*/
// BEGIN C++
# include <cppad/example/valvector/sum.hpp>
# include <cppad/cppad.hpp>
bool ad_sum(void)
{ // ok
bool ok = true;
Expand Down
2 changes: 1 addition & 1 deletion example/valvector/base_require.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
// SPDX-FileCopyrightText: Bradley M. Bell <[email protected]>
// SPDX-FileContributor: 2024 Bradley M. Bell
// ---------------------------------------------------------------------------
# include <cppad/example/valvector/class.hpp>
/*
{xrst_begin valvector_base_require.cpp}
Expand All @@ -25,6 +24,7 @@ Source Code
-------------------------------------------------------------------------------
*/
// BEGIN C++
# include <cppad/example/valvector/class.hpp>
//
// base_require
bool base_require(void)
Expand Down
4 changes: 2 additions & 2 deletions example/valvector/get_started.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@
// SPDX-FileCopyrightText: Bradley M. Bell <[email protected]>
// SPDX-FileContributor: 2024 Bradley M. Bell
// ---------------------------------------------------------------------------
# include <cppad/example/valvector/class.hpp>
# include <cppad/cppad.hpp>
/*
{xrst_begin valvector_get_started.cpp}
Expand All @@ -19,6 +17,8 @@ Getting Started Using valvector as a CppAD Base Class
-------------------------------------------------------------------------------
*/
// BEGIN C++
# include <cppad/example/valvector/class.hpp>
# include <cppad/cppad.hpp>
bool get_started(void)
{ // ok
bool ok = true;
Expand Down
6 changes: 3 additions & 3 deletions example/valvector/llsq_obj.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,6 @@
// SPDX-FileCopyrightText: Bradley M. Bell <[email protected]>
// SPDX-FileContributor: 2024 Bradley M. Bell
// ---------------------------------------------------------------------------
# include <cppad/example/valvector/sum.hpp>
# include <cppad/example/valvector/class.hpp>
# include <cppad/cppad.hpp>
/*
{xrst_begin valvector_llsq_obj.cpp}
Expand All @@ -20,6 +17,9 @@ Using valvector to Represent Linear Least Squares Objective
-------------------------------------------------------------------------------
*/
// BEGIN C++
# include <cppad/example/valvector/sum.hpp>
# include <cppad/example/valvector/class.hpp>
# include <cppad/cppad.hpp>
bool llsq_obj(void)
{ // ok
bool ok = true;
Expand Down
2 changes: 1 addition & 1 deletion user_guide.xrst
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

{xrst_comment BEGIN: Before changing see new_release.sh and check_version.sh}

cppad-20240419: CppAD User's Manual
cppad-20240420: CppAD User's Manual
###################################

.. image:: {xrst_dir coin.png}
Expand Down

0 comments on commit 2c9aa47

Please sign in to comment.