docs for iterators

This commit is contained in:
Karsten Ahnert 2012-08-14 09:33:46 +02:00
parent a7a71eea75
commit 38b68b2a7c
38 changed files with 161 additions and 96 deletions

View File

@ -71,4 +71,9 @@
#include <boost/numeric/odeint/stepper/generation.hpp> #include <boost/numeric/odeint/stepper/generation.hpp>
#include <boost/numeric/odeint/iterator/const_step_iterator.hpp>
#include <boost/numeric/odeint/iterator/const_step_time_iterator.hpp>
#include <boost/numeric/odeint/iterator/adaptive_iterator.hpp>
#include <boost/numeric/odeint/iterator/adaptive_time_iterator.hpp>
#endif // BOOST_NUMERIC_ODEINT_HPP_INCLUDED #endif // BOOST_NUMERIC_ODEINT_HPP_INCLUDED

View File

@ -10,8 +10,6 @@
<link rel="next" href="concepts/system.html" title="System"> <link rel="next" href="concepts/system.html" title="System">
</head> </head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table cellpadding="2" width="100%"><tr><td valign="top"></td></tr></table>
<hr>
<div class="spirit-nav"> <div class="spirit-nav">
<a accesskey="p" href="odeint_in_detail/using_boost__range.html"><img src="../images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../images/home.png" alt="Home"></a><a accesskey="n" href="concepts/system.html"><img src="../images/next.png" alt="Next"></a> <a accesskey="p" href="odeint_in_detail/using_boost__range.html"><img src="../images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../images/home.png" alt="Home"></a><a accesskey="n" href="concepts/system.html"><img src="../images/next.png" alt="Next"></a>
</div> </div>

View File

@ -10,8 +10,6 @@
<link rel="next" href="dense_output_stepper.html" title="Dense Output Stepper"> <link rel="next" href="dense_output_stepper.html" title="Dense Output Stepper">
</head> </head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table cellpadding="2" width="100%"><tr><td valign="top"></td></tr></table>
<hr>
<div class="spirit-nav"> <div class="spirit-nav">
<a accesskey="p" href="error_stepper.html"><img src="../../images/prev.png" alt="Prev"></a><a accesskey="u" href="../concepts.html"><img src="../../images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../images/home.png" alt="Home"></a><a accesskey="n" href="dense_output_stepper.html"><img src="../../images/next.png" alt="Next"></a> <a accesskey="p" href="error_stepper.html"><img src="../../images/prev.png" alt="Prev"></a><a accesskey="u" href="../concepts.html"><img src="../../images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../images/home.png" alt="Home"></a><a accesskey="n" href="dense_output_stepper.html"><img src="../../images/next.png" alt="Next"></a>
</div> </div>

View File

@ -10,8 +10,6 @@
<link rel="next" href="state_algebra_operations.html" title="State Algebra Operations"> <link rel="next" href="state_algebra_operations.html" title="State Algebra Operations">
</head> </head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table cellpadding="2" width="100%"><tr><td valign="top"></td></tr></table>
<hr>
<div class="spirit-nav"> <div class="spirit-nav">
<a accesskey="p" href="controlled_stepper.html"><img src="../../images/prev.png" alt="Prev"></a><a accesskey="u" href="../concepts.html"><img src="../../images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../images/home.png" alt="Home"></a><a accesskey="n" href="state_algebra_operations.html"><img src="../../images/next.png" alt="Next"></a> <a accesskey="p" href="controlled_stepper.html"><img src="../../images/prev.png" alt="Prev"></a><a accesskey="u" href="../concepts.html"><img src="../../images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../images/home.png" alt="Home"></a><a accesskey="n" href="state_algebra_operations.html"><img src="../../images/next.png" alt="Next"></a>
</div> </div>

View File

@ -10,8 +10,6 @@
<link rel="next" href="controlled_stepper.html" title="Controlled Stepper"> <link rel="next" href="controlled_stepper.html" title="Controlled Stepper">
</head> </head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table cellpadding="2" width="100%"><tr><td valign="top"></td></tr></table>
<hr>
<div class="spirit-nav"> <div class="spirit-nav">
<a accesskey="p" href="stepper.html"><img src="../../images/prev.png" alt="Prev"></a><a accesskey="u" href="../concepts.html"><img src="../../images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../images/home.png" alt="Home"></a><a accesskey="n" href="controlled_stepper.html"><img src="../../images/next.png" alt="Next"></a> <a accesskey="p" href="stepper.html"><img src="../../images/prev.png" alt="Prev"></a><a accesskey="u" href="../concepts.html"><img src="../../images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../images/home.png" alt="Home"></a><a accesskey="n" href="controlled_stepper.html"><img src="../../images/next.png" alt="Next"></a>
</div> </div>

View File

@ -10,8 +10,6 @@
<link rel="next" href="stepper.html" title="Stepper"> <link rel="next" href="stepper.html" title="Stepper">
</head> </head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table cellpadding="2" width="100%"><tr><td valign="top"></td></tr></table>
<hr>
<div class="spirit-nav"> <div class="spirit-nav">
<a accesskey="p" href="simple_symplectic_system.html"><img src="../../images/prev.png" alt="Prev"></a><a accesskey="u" href="../concepts.html"><img src="../../images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../images/home.png" alt="Home"></a><a accesskey="n" href="stepper.html"><img src="../../images/next.png" alt="Next"></a> <a accesskey="p" href="simple_symplectic_system.html"><img src="../../images/prev.png" alt="Prev"></a><a accesskey="u" href="../concepts.html"><img src="../../images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../images/home.png" alt="Home"></a><a accesskey="n" href="stepper.html"><img src="../../images/next.png" alt="Next"></a>
</div> </div>

View File

@ -10,8 +10,6 @@
<link rel="next" href="implicit_system.html" title="Implicit System"> <link rel="next" href="implicit_system.html" title="Implicit System">
</head> </head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table cellpadding="2" width="100%"><tr><td valign="top"></td></tr></table>
<hr>
<div class="spirit-nav"> <div class="spirit-nav">
<a accesskey="p" href="symplectic_system.html"><img src="../../images/prev.png" alt="Prev"></a><a accesskey="u" href="../concepts.html"><img src="../../images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../images/home.png" alt="Home"></a><a accesskey="n" href="implicit_system.html"><img src="../../images/next.png" alt="Next"></a> <a accesskey="p" href="symplectic_system.html"><img src="../../images/prev.png" alt="Prev"></a><a accesskey="u" href="../concepts.html"><img src="../../images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../images/home.png" alt="Home"></a><a accesskey="n" href="implicit_system.html"><img src="../../images/next.png" alt="Next"></a>
</div> </div>

View File

@ -10,8 +10,6 @@
<link rel="next" href="state_wrapper.html" title="State Wrapper"> <link rel="next" href="state_wrapper.html" title="State Wrapper">
</head> </head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table cellpadding="2" width="100%"><tr><td valign="top"></td></tr></table>
<hr>
<div class="spirit-nav"> <div class="spirit-nav">
<a accesskey="p" href="dense_output_stepper.html"><img src="../../images/prev.png" alt="Prev"></a><a accesskey="u" href="../concepts.html"><img src="../../images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../images/home.png" alt="Home"></a><a accesskey="n" href="state_wrapper.html"><img src="../../images/next.png" alt="Next"></a> <a accesskey="p" href="dense_output_stepper.html"><img src="../../images/prev.png" alt="Prev"></a><a accesskey="u" href="../concepts.html"><img src="../../images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../images/home.png" alt="Home"></a><a accesskey="n" href="state_wrapper.html"><img src="../../images/next.png" alt="Next"></a>
</div> </div>

View File

@ -9,8 +9,6 @@
<link rel="prev" href="state_algebra_operations.html" title="State Algebra Operations"> <link rel="prev" href="state_algebra_operations.html" title="State Algebra Operations">
</head> </head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table cellpadding="2" width="100%"><tr><td valign="top"></td></tr></table>
<hr>
<div class="spirit-nav"> <div class="spirit-nav">
<a accesskey="p" href="state_algebra_operations.html"><img src="../../images/prev.png" alt="Prev"></a><a accesskey="u" href="../concepts.html"><img src="../../images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../images/home.png" alt="Home"></a> <a accesskey="p" href="state_algebra_operations.html"><img src="../../images/prev.png" alt="Prev"></a><a accesskey="u" href="../concepts.html"><img src="../../images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../images/home.png" alt="Home"></a>
</div> </div>

View File

@ -10,8 +10,6 @@
<link rel="next" href="error_stepper.html" title="Error Stepper"> <link rel="next" href="error_stepper.html" title="Error Stepper">
</head> </head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table cellpadding="2" width="100%"><tr><td valign="top"></td></tr></table>
<hr>
<div class="spirit-nav"> <div class="spirit-nav">
<a accesskey="p" href="implicit_system.html"><img src="../../images/prev.png" alt="Prev"></a><a accesskey="u" href="../concepts.html"><img src="../../images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../images/home.png" alt="Home"></a><a accesskey="n" href="error_stepper.html"><img src="../../images/next.png" alt="Next"></a> <a accesskey="p" href="implicit_system.html"><img src="../../images/prev.png" alt="Prev"></a><a accesskey="u" href="../concepts.html"><img src="../../images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../images/home.png" alt="Home"></a><a accesskey="n" href="error_stepper.html"><img src="../../images/next.png" alt="Next"></a>
</div> </div>

View File

@ -10,8 +10,6 @@
<link rel="next" href="simple_symplectic_system.html" title="Simple Symplectic System"> <link rel="next" href="simple_symplectic_system.html" title="Simple Symplectic System">
</head> </head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table cellpadding="2" width="100%"><tr><td valign="top"></td></tr></table>
<hr>
<div class="spirit-nav"> <div class="spirit-nav">
<a accesskey="p" href="system.html"><img src="../../images/prev.png" alt="Prev"></a><a accesskey="u" href="../concepts.html"><img src="../../images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../images/home.png" alt="Home"></a><a accesskey="n" href="simple_symplectic_system.html"><img src="../../images/next.png" alt="Next"></a> <a accesskey="p" href="system.html"><img src="../../images/prev.png" alt="Prev"></a><a accesskey="u" href="../concepts.html"><img src="../../images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../images/home.png" alt="Home"></a><a accesskey="n" href="simple_symplectic_system.html"><img src="../../images/next.png" alt="Next"></a>
</div> </div>

View File

@ -10,8 +10,6 @@
<link rel="next" href="symplectic_system.html" title="Symplectic System"> <link rel="next" href="symplectic_system.html" title="Symplectic System">
</head> </head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table cellpadding="2" width="100%"><tr><td valign="top"></td></tr></table>
<hr>
<div class="spirit-nav"> <div class="spirit-nav">
<a accesskey="p" href="../concepts.html"><img src="../../images/prev.png" alt="Prev"></a><a accesskey="u" href="../concepts.html"><img src="../../images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../images/home.png" alt="Home"></a><a accesskey="n" href="symplectic_system.html"><img src="../../images/next.png" alt="Next"></a> <a accesskey="p" href="../concepts.html"><img src="../../images/prev.png" alt="Prev"></a><a accesskey="u" href="../concepts.html"><img src="../../images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../images/home.png" alt="Home"></a><a accesskey="n" href="symplectic_system.html"><img src="../../images/next.png" alt="Next"></a>
</div> </div>

View File

@ -10,8 +10,6 @@
<link rel="next" href="getting_started/overview.html" title="Overview"> <link rel="next" href="getting_started/overview.html" title="Overview">
</head> </head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table cellpadding="2" width="100%"><tr><td valign="top"></td></tr></table>
<hr>
<div class="spirit-nav"> <div class="spirit-nav">
<a accesskey="p" href="../index.html"><img src="../images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../images/home.png" alt="Home"></a><a accesskey="n" href="getting_started/overview.html"><img src="../images/next.png" alt="Next"></a> <a accesskey="p" href="../index.html"><img src="../images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../images/home.png" alt="Home"></a><a accesskey="n" href="getting_started/overview.html"><img src="../images/next.png" alt="Next"></a>
</div> </div>

View File

@ -10,8 +10,6 @@
<link rel="next" href="usage__compilation__headers.html" title="Usage, Compilation, Headers"> <link rel="next" href="usage__compilation__headers.html" title="Usage, Compilation, Headers">
</head> </head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table cellpadding="2" width="100%"><tr><td valign="top"></td></tr></table>
<hr>
<div class="spirit-nav"> <div class="spirit-nav">
<a accesskey="p" href="../getting_started.html"><img src="../../images/prev.png" alt="Prev"></a><a accesskey="u" href="../getting_started.html"><img src="../../images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../images/home.png" alt="Home"></a><a accesskey="n" href="usage__compilation__headers.html"><img src="../../images/next.png" alt="Next"></a> <a accesskey="p" href="../getting_started.html"><img src="../../images/prev.png" alt="Prev"></a><a accesskey="u" href="../getting_started.html"><img src="../../images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../images/home.png" alt="Home"></a><a accesskey="n" href="usage__compilation__headers.html"><img src="../../images/next.png" alt="Next"></a>
</div> </div>

View File

@ -10,8 +10,6 @@
<link rel="next" href="../tutorial.html" title="Tutorial"> <link rel="next" href="../tutorial.html" title="Tutorial">
</head> </head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table cellpadding="2" width="100%"><tr><td valign="top"></td></tr></table>
<hr>
<div class="spirit-nav"> <div class="spirit-nav">
<a accesskey="p" href="usage__compilation__headers.html"><img src="../../images/prev.png" alt="Prev"></a><a accesskey="u" href="../getting_started.html"><img src="../../images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../images/home.png" alt="Home"></a><a accesskey="n" href="../tutorial.html"><img src="../../images/next.png" alt="Next"></a> <a accesskey="p" href="usage__compilation__headers.html"><img src="../../images/prev.png" alt="Prev"></a><a accesskey="u" href="../getting_started.html"><img src="../../images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../images/home.png" alt="Home"></a><a accesskey="n" href="../tutorial.html"><img src="../../images/next.png" alt="Next"></a>
</div> </div>

View File

@ -10,8 +10,6 @@
<link rel="next" href="short_example.html" title="Short Example"> <link rel="next" href="short_example.html" title="Short Example">
</head> </head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table cellpadding="2" width="100%"><tr><td valign="top"></td></tr></table>
<hr>
<div class="spirit-nav"> <div class="spirit-nav">
<a accesskey="p" href="overview.html"><img src="../../images/prev.png" alt="Prev"></a><a accesskey="u" href="../getting_started.html"><img src="../../images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../images/home.png" alt="Home"></a><a accesskey="n" href="short_example.html"><img src="../../images/next.png" alt="Next"></a> <a accesskey="p" href="overview.html"><img src="../../images/prev.png" alt="Prev"></a><a accesskey="u" href="../getting_started.html"><img src="../../images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../images/home.png" alt="Home"></a><a accesskey="n" href="short_example.html"><img src="../../images/next.png" alt="Next"></a>
</div> </div>

View File

@ -10,8 +10,6 @@
<link rel="next" href="odeint_in_detail/steppers.html" title="Steppers"> <link rel="next" href="odeint_in_detail/steppers.html" title="Steppers">
</head> </head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table cellpadding="2" width="100%"><tr><td valign="top"></td></tr></table>
<hr>
<div class="spirit-nav"> <div class="spirit-nav">
<a accesskey="p" href="tutorial/references.html"><img src="../images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../images/home.png" alt="Home"></a><a accesskey="n" href="odeint_in_detail/steppers.html"><img src="../images/next.png" alt="Next"></a> <a accesskey="p" href="tutorial/references.html"><img src="../images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../images/home.png" alt="Home"></a><a accesskey="n" href="odeint_in_detail/steppers.html"><img src="../images/next.png" alt="Next"></a>
</div> </div>
@ -25,6 +23,7 @@
functions</a></span></dt> functions</a></span></dt>
<dt><span class="section"><a href="odeint_in_detail/integrate_functions.html">Integrate <dt><span class="section"><a href="odeint_in_detail/integrate_functions.html">Integrate
functions</a></span></dt> functions</a></span></dt>
<dt><span class="section"><a href="odeint_in_detail/iterators.html">Iterators</a></span></dt>
<dt><span class="section"><a href="odeint_in_detail/state_types__algebras_and_operations.html">State <dt><span class="section"><a href="odeint_in_detail/state_types__algebras_and_operations.html">State
types, algebras and operations</a></span></dt> types, algebras and operations</a></span></dt>
<dt><span class="section"><a href="odeint_in_detail/using_boost__ref.html">Using <dt><span class="section"><a href="odeint_in_detail/using_boost__ref.html">Using

View File

@ -10,8 +10,6 @@
<link rel="next" href="integrate_functions.html" title="Integrate functions"> <link rel="next" href="integrate_functions.html" title="Integrate functions">
</head> </head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table cellpadding="2" width="100%"><tr><td valign="top"></td></tr></table>
<hr>
<div class="spirit-nav"> <div class="spirit-nav">
<a accesskey="p" href="steppers.html"><img src="../../images/prev.png" alt="Prev"></a><a accesskey="u" href="../odeint_in_detail.html"><img src="../../images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../images/home.png" alt="Home"></a><a accesskey="n" href="integrate_functions.html"><img src="../../images/next.png" alt="Next"></a> <a accesskey="p" href="steppers.html"><img src="../../images/prev.png" alt="Prev"></a><a accesskey="u" href="../odeint_in_detail.html"><img src="../../images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../images/home.png" alt="Home"></a><a accesskey="n" href="integrate_functions.html"><img src="../../images/next.png" alt="Next"></a>
</div> </div>

View File

@ -7,13 +7,11 @@
<link rel="home" href="../../index.html" title="Chapter&#160;1.&#160;Boost.Numeric.Odeint"> <link rel="home" href="../../index.html" title="Chapter&#160;1.&#160;Boost.Numeric.Odeint">
<link rel="up" href="../odeint_in_detail.html" title="odeint in detail"> <link rel="up" href="../odeint_in_detail.html" title="odeint in detail">
<link rel="prev" href="generation_functions.html" title="Generation functions"> <link rel="prev" href="generation_functions.html" title="Generation functions">
<link rel="next" href="state_types__algebras_and_operations.html" title="State types, algebras and operations"> <link rel="next" href="iterators.html" title="Iterators">
</head> </head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table cellpadding="2" width="100%"><tr><td valign="top"></td></tr></table>
<hr>
<div class="spirit-nav"> <div class="spirit-nav">
<a accesskey="p" href="generation_functions.html"><img src="../../images/prev.png" alt="Prev"></a><a accesskey="u" href="../odeint_in_detail.html"><img src="../../images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../images/home.png" alt="Home"></a><a accesskey="n" href="state_types__algebras_and_operations.html"><img src="../../images/next.png" alt="Next"></a> <a accesskey="p" href="generation_functions.html"><img src="../../images/prev.png" alt="Prev"></a><a accesskey="u" href="../odeint_in_detail.html"><img src="../../images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../images/home.png" alt="Home"></a><a accesskey="n" href="iterators.html"><img src="../../images/next.png" alt="Next"></a>
</div> </div>
<div class="section"> <div class="section">
<div class="titlepage"><div><div><h3 class="title"> <div class="titlepage"><div><div><h3 class="title">
@ -336,7 +334,7 @@
</tr></table> </tr></table>
<hr> <hr>
<div class="spirit-nav"> <div class="spirit-nav">
<a accesskey="p" href="generation_functions.html"><img src="../../images/prev.png" alt="Prev"></a><a accesskey="u" href="../odeint_in_detail.html"><img src="../../images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../images/home.png" alt="Home"></a><a accesskey="n" href="state_types__algebras_and_operations.html"><img src="../../images/next.png" alt="Next"></a> <a accesskey="p" href="generation_functions.html"><img src="../../images/prev.png" alt="Prev"></a><a accesskey="u" href="../odeint_in_detail.html"><img src="../../images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../images/home.png" alt="Home"></a><a accesskey="n" href="iterators.html"><img src="../../images/next.png" alt="Next"></a>
</div> </div>
</body> </body>
</html> </html>

View File

@ -6,14 +6,12 @@
<meta name="generator" content="DocBook XSL Stylesheets V1.75.2"> <meta name="generator" content="DocBook XSL Stylesheets V1.75.2">
<link rel="home" href="../../index.html" title="Chapter&#160;1.&#160;Boost.Numeric.Odeint"> <link rel="home" href="../../index.html" title="Chapter&#160;1.&#160;Boost.Numeric.Odeint">
<link rel="up" href="../odeint_in_detail.html" title="odeint in detail"> <link rel="up" href="../odeint_in_detail.html" title="odeint in detail">
<link rel="prev" href="integrate_functions.html" title="Integrate functions"> <link rel="prev" href="iterators.html" title="Iterators">
<link rel="next" href="using_boost__ref.html" title="Using boost::ref"> <link rel="next" href="using_boost__ref.html" title="Using boost::ref">
</head> </head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table cellpadding="2" width="100%"><tr><td valign="top"></td></tr></table>
<hr>
<div class="spirit-nav"> <div class="spirit-nav">
<a accesskey="p" href="integrate_functions.html"><img src="../../images/prev.png" alt="Prev"></a><a accesskey="u" href="../odeint_in_detail.html"><img src="../../images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../images/home.png" alt="Home"></a><a accesskey="n" href="using_boost__ref.html"><img src="../../images/next.png" alt="Next"></a> <a accesskey="p" href="iterators.html"><img src="../../images/prev.png" alt="Prev"></a><a accesskey="u" href="../odeint_in_detail.html"><img src="../../images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../images/home.png" alt="Home"></a><a accesskey="n" href="using_boost__ref.html"><img src="../../images/next.png" alt="Next"></a>
</div> </div>
<div class="section"> <div class="section">
<div class="titlepage"><div><div><h3 class="title"> <div class="titlepage"><div><div><h3 class="title">
@ -1305,7 +1303,7 @@
</tr></table> </tr></table>
<hr> <hr>
<div class="spirit-nav"> <div class="spirit-nav">
<a accesskey="p" href="integrate_functions.html"><img src="../../images/prev.png" alt="Prev"></a><a accesskey="u" href="../odeint_in_detail.html"><img src="../../images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../images/home.png" alt="Home"></a><a accesskey="n" href="using_boost__ref.html"><img src="../../images/next.png" alt="Next"></a> <a accesskey="p" href="iterators.html"><img src="../../images/prev.png" alt="Prev"></a><a accesskey="u" href="../odeint_in_detail.html"><img src="../../images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../images/home.png" alt="Home"></a><a accesskey="n" href="using_boost__ref.html"><img src="../../images/next.png" alt="Next"></a>
</div> </div>
</body> </body>
</html> </html>

View File

@ -10,8 +10,6 @@
<link rel="next" href="generation_functions.html" title="Generation functions"> <link rel="next" href="generation_functions.html" title="Generation functions">
</head> </head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table cellpadding="2" width="100%"><tr><td valign="top"></td></tr></table>
<hr>
<div class="spirit-nav"> <div class="spirit-nav">
<a accesskey="p" href="../odeint_in_detail.html"><img src="../../images/prev.png" alt="Prev"></a><a accesskey="u" href="../odeint_in_detail.html"><img src="../../images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../images/home.png" alt="Home"></a><a accesskey="n" href="generation_functions.html"><img src="../../images/next.png" alt="Next"></a> <a accesskey="p" href="../odeint_in_detail.html"><img src="../../images/prev.png" alt="Prev"></a><a accesskey="u" href="../odeint_in_detail.html"><img src="../../images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../images/home.png" alt="Home"></a><a accesskey="n" href="generation_functions.html"><img src="../../images/next.png" alt="Next"></a>
</div> </div>
@ -152,7 +150,7 @@
<span class="identifier">rk</span><span class="special">.</span><span class="identifier">do_step</span><span class="special">(</span> <span class="identifier">sys1</span> <span class="special">,</span> <span class="identifier">in</span> <span class="special">,</span> <span class="identifier">t</span> <span class="special">,</span> <span class="identifier">out</span> <span class="special">,</span> <span class="identifier">dt</span> <span class="special">);</span> <span class="comment">// Out-of-place transformation</span> <span class="identifier">rk</span><span class="special">.</span><span class="identifier">do_step</span><span class="special">(</span> <span class="identifier">sys1</span> <span class="special">,</span> <span class="identifier">in</span> <span class="special">,</span> <span class="identifier">t</span> <span class="special">,</span> <span class="identifier">out</span> <span class="special">,</span> <span class="identifier">dt</span> <span class="special">);</span> <span class="comment">// Out-of-place transformation</span>
<span class="identifier">rk</span><span class="special">.</span><span class="identifier">do_step</span><span class="special">(</span> <span class="identifier">sys1</span> <span class="special">,</span> <span class="identifier">inout</span> <span class="special">,</span> <span class="identifier">dxdtin</span> <span class="special">,</span> <span class="identifier">t</span> <span class="special">,</span> <span class="identifier">dt</span> <span class="special">);</span> <span class="comment">// In-place tranformation of inout</span> <span class="identifier">rk</span><span class="special">.</span><span class="identifier">do_step</span><span class="special">(</span> <span class="identifier">sys1</span> <span class="special">,</span> <span class="identifier">inout</span> <span class="special">,</span> <span class="identifier">dxdtin</span> <span class="special">,</span> <span class="identifier">t</span> <span class="special">,</span> <span class="identifier">dt</span> <span class="special">);</span> <span class="comment">// In-place tranformation of inout</span>
<span class="identifier">rk</span><span class="special">.</span><span class="identifier">do_step</span><span class="special">(</span> <span class="identifier">sys1</span> <span class="special">,</span> <span class="identifier">in</span> <span class="special">,</span> <span class="identifier">dxdtin</span> <span class="special">,</span> <span class="identifier">t</span> <span class="special">,</span> <span class="identifier">out</span> <span class="special">,</span> <span class="identifier">dt</span> <span class="special">);</span> <span class="comment">// Out-of-place transformation</span> <span class="identifier">rk</span><span class="special">.</span><span class="identifier">do_step</span><span class="special">(</span> <span class="identifier">sys1</span> <span class="special">,</span> <span class="identifier">in</span> <span class="special">,</span> <span class="identifier">dxdtin</span> <span class="special">,</span> <span class="identifier">t</span> <span class="special">,</span> <span class="identifier">out</span> <span class="special">,</span> <span class="identifier">dt</span> <span class="special">);</span> <span class="comment">// Out-of-place transformation</span>
</pre> </pre>
<p> <p>
</p> </p>
<p> <p>
@ -2004,8 +2002,8 @@
<span class="special">{</span> <span class="special">{</span>
<span class="keyword">public</span><span class="special">:</span> <span class="keyword">public</span><span class="special">:</span>
<span class="keyword">typedef</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">array</span><span class="special">&lt;</span> <span class="keyword">double</span> <span class="special">,</span> <span class="identifier">N</span> <span class="special">&gt;</span> <span class="identifier">state_type</span><span class="special">;</span> <span class="keyword">typedef</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">array</span><span class="special">&lt;</span> <span class="keyword">double</span> <span class="special">,</span> <span class="identifier">N</span> <span class="special">&gt;</span> <span class="identifier">state_type</span><span class="special">;</span>
<span class="keyword">typedef</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">array</span><span class="special">&lt;</span> <span class="keyword">double</span> <span class="special">,</span> <span class="identifier">N</span> <span class="special">&gt;</span> <span class="identifier">deriv_type</span><span class="special">;</span> <span class="keyword">typedef</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">array</span><span class="special">&lt;</span> <span class="keyword">double</span> <span class="special">,</span> <span class="identifier">N</span> <span class="special">&gt;</span> <span class="identifier">deriv_type</span><span class="special">;</span>
<span class="keyword">typedef</span> <span class="keyword">double</span> <span class="identifier">value_type</span><span class="special">;</span> <span class="keyword">typedef</span> <span class="keyword">double</span> <span class="identifier">value_type</span><span class="special">;</span>
<span class="keyword">typedef</span> <span class="keyword">double</span> <span class="identifier">time_type</span><span class="special">;</span> <span class="keyword">typedef</span> <span class="keyword">double</span> <span class="identifier">time_type</span><span class="special">;</span>
<span class="keyword">typedef</span> <span class="keyword">unsigned</span> <span class="keyword">short</span> <span class="identifier">order_type</span><span class="special">;</span> <span class="keyword">typedef</span> <span class="keyword">unsigned</span> <span class="keyword">short</span> <span class="identifier">order_type</span><span class="special">;</span>
@ -2091,7 +2089,7 @@
<p> <p>
</p> </p>
<pre class="programlisting"><span class="keyword">const</span> <span class="keyword">static</span> <span class="identifier">size_t</span> <span class="identifier">N</span> <span class="special">=</span> <span class="number">1</span><span class="special">;</span> <pre class="programlisting"><span class="keyword">const</span> <span class="keyword">static</span> <span class="identifier">size_t</span> <span class="identifier">N</span> <span class="special">=</span> <span class="number">1</span><span class="special">;</span>
<span class="keyword">typedef</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">array</span><span class="special">&lt;</span> <span class="keyword">double</span> <span class="special">,</span> <span class="identifier">N</span> <span class="special">&gt;</span> <span class="identifier">state_type</span><span class="special">;</span> <span class="keyword">typedef</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">array</span><span class="special">&lt;</span> <span class="keyword">double</span> <span class="special">,</span> <span class="identifier">N</span> <span class="special">&gt;</span> <span class="identifier">state_type</span><span class="special">;</span>
<span class="keyword">struct</span> <span class="identifier">ornstein_det</span> <span class="keyword">struct</span> <span class="identifier">ornstein_det</span>
<span class="special">{</span> <span class="special">{</span>
@ -2103,8 +2101,8 @@
<span class="keyword">struct</span> <span class="identifier">ornstein_stoch</span> <span class="keyword">struct</span> <span class="identifier">ornstein_stoch</span>
<span class="special">{</span> <span class="special">{</span>
<span class="identifier">std</span><span class="special">::</span><span class="identifier">mt19937</span> <span class="identifier">m_rng</span><span class="special">;</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">mt19937</span> <span class="identifier">m_rng</span><span class="special">;</span>
<span class="identifier">std</span><span class="special">::</span><span class="identifier">normal_distribution</span><span class="special">&lt;&gt;</span> <span class="identifier">m_dist</span><span class="special">;</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">normal_distribution</span><span class="special">&lt;&gt;</span> <span class="identifier">m_dist</span><span class="special">;</span>
<span class="identifier">ornstein_stoch</span><span class="special">(</span> <span class="keyword">double</span> <span class="identifier">sigma</span> <span class="special">)</span> <span class="special">:</span> <span class="identifier">m_rng</span><span class="special">()</span> <span class="special">,</span> <span class="identifier">m_dist</span><span class="special">(</span> <span class="number">0.0</span> <span class="special">,</span> <span class="identifier">sigma</span> <span class="special">)</span> <span class="special">{</span> <span class="special">}</span> <span class="identifier">ornstein_stoch</span><span class="special">(</span> <span class="keyword">double</span> <span class="identifier">sigma</span> <span class="special">)</span> <span class="special">:</span> <span class="identifier">m_rng</span><span class="special">()</span> <span class="special">,</span> <span class="identifier">m_dist</span><span class="special">(</span> <span class="number">0.0</span> <span class="special">,</span> <span class="identifier">sigma</span> <span class="special">)</span> <span class="special">{</span> <span class="special">}</span>
@ -2281,14 +2279,12 @@ c3 = 2/3, a31 = 0 , a32 = 2/3
</p> </p>
<p> <p>
</p> </p>
<pre class="programlisting"><span class="keyword">typedef</span> <span class="identifier">array</span><span class="special">&lt;</span> <span class="keyword">double</span> <span class="special">,</span> <span class="number">3</span> <span class="special">&gt;</span> <span class="identifier">state_type</span><span class="special">;</span> <pre class="programlisting"><span class="keyword">typedef</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">array</span><span class="special">&lt;</span> <span class="keyword">double</span> <span class="special">,</span> <span class="number">3</span> <span class="special">&gt;</span> <span class="identifier">state_type</span><span class="special">;</span>
<span class="identifier">heun</span><span class="special">&lt;</span> <span class="identifier">state_type</span> <span class="special">&gt;</span> <span class="identifier">h</span><span class="special">;</span> <span class="identifier">heun</span><span class="special">&lt;</span> <span class="identifier">state_type</span> <span class="special">&gt;</span> <span class="identifier">h</span><span class="special">;</span>
<span class="identifier">state_type</span> <span class="identifier">x</span> <span class="special">=</span> <span class="special">{{</span> <span class="number">10.0</span> <span class="special">,</span> <span class="number">10.0</span> <span class="special">,</span> <span class="number">10.0</span> <span class="special">}};</span> <span class="identifier">state_type</span> <span class="identifier">x</span> <span class="special">=</span> <span class="special">{{</span> <span class="number">10.0</span> <span class="special">,</span> <span class="number">10.0</span> <span class="special">,</span> <span class="number">10.0</span> <span class="special">}};</span>
<span class="identifier">integrate_const</span><span class="special">(</span> <span class="identifier">h</span> <span class="special">,</span> <span class="identifier">lorenz</span><span class="special">()</span> <span class="special">,</span> <span class="identifier">x</span> <span class="special">,</span> <span class="number">0.0</span> <span class="special">,</span> <span class="number">100.0</span> <span class="special">,</span> <span class="number">0.01</span> <span class="special">,</span> <span class="identifier">integrate_const</span><span class="special">(</span> <span class="identifier">h</span> <span class="special">,</span> <span class="identifier">lorenz</span><span class="special">()</span> <span class="special">,</span> <span class="identifier">x</span> <span class="special">,</span> <span class="number">0.0</span> <span class="special">,</span> <span class="number">100.0</span> <span class="special">,</span> <span class="number">0.01</span> <span class="special">,</span>
<span class="special">[](</span> <span class="keyword">const</span> <span class="identifier">state_type</span> <span class="special">&amp;</span><span class="identifier">_x</span> <span class="special">,</span> <span class="keyword">double</span> <span class="identifier">_t</span> <span class="special">)</span> <span class="special">{</span> <span class="identifier">streaming_observer</span><span class="special">(</span> <span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special">)</span> <span class="special">);</span>
<span class="identifier">std</span><span class="special">::</span><span class="identifier">cout</span> <span class="special">&lt;&lt;</span> <span class="identifier">_t</span> <span class="special">&lt;&lt;</span> <span class="string">"\t"</span> <span class="special">&lt;&lt;</span> <span class="identifier">_x</span><span class="special">[</span><span class="number">0</span><span class="special">]</span> <span class="special">&lt;&lt;</span> <span class="string">"\t"</span> <span class="special">&lt;&lt;</span> <span class="identifier">_x</span><span class="special">[</span><span class="number">1</span><span class="special">]</span> <span class="special">&lt;&lt;</span> <span class="string">"\t"</span> <span class="special">&lt;&lt;</span> <span class="identifier">_x</span><span class="special">[</span><span class="number">2</span><span class="special">]</span> <span class="special">&lt;&lt;</span> <span class="string">"\n"</span><span class="special">;</span>
<span class="special">});</span>
</pre> </pre>
<p> <p>
</p> </p>

View File

@ -10,8 +10,6 @@
<link rel="next" href="../concepts.html" title="Concepts"> <link rel="next" href="../concepts.html" title="Concepts">
</head> </head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table cellpadding="2" width="100%"><tr><td valign="top"></td></tr></table>
<hr>
<div class="spirit-nav"> <div class="spirit-nav">
<a accesskey="p" href="using_boost__ref.html"><img src="../../images/prev.png" alt="Prev"></a><a accesskey="u" href="../odeint_in_detail.html"><img src="../../images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../images/home.png" alt="Home"></a><a accesskey="n" href="../concepts.html"><img src="../../images/next.png" alt="Next"></a> <a accesskey="p" href="using_boost__ref.html"><img src="../../images/prev.png" alt="Prev"></a><a accesskey="u" href="../odeint_in_detail.html"><img src="../../images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../images/home.png" alt="Home"></a><a accesskey="n" href="../concepts.html"><img src="../../images/next.png" alt="Next"></a>
</div> </div>

View File

@ -10,8 +10,6 @@
<link rel="next" href="using_boost__range.html" title="Using boost::range"> <link rel="next" href="using_boost__range.html" title="Using boost::range">
</head> </head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table cellpadding="2" width="100%"><tr><td valign="top"></td></tr></table>
<hr>
<div class="spirit-nav"> <div class="spirit-nav">
<a accesskey="p" href="state_types__algebras_and_operations.html"><img src="../../images/prev.png" alt="Prev"></a><a accesskey="u" href="../odeint_in_detail.html"><img src="../../images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../images/home.png" alt="Home"></a><a accesskey="n" href="using_boost__range.html"><img src="../../images/next.png" alt="Next"></a> <a accesskey="p" href="state_types__algebras_and_operations.html"><img src="../../images/prev.png" alt="Prev"></a><a accesskey="u" href="../odeint_in_detail.html"><img src="../../images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../images/home.png" alt="Home"></a><a accesskey="n" href="using_boost__range.html"><img src="../../images/next.png" alt="Next"></a>
</div> </div>

View File

@ -10,8 +10,6 @@
<link rel="next" href="tutorial/harmonic_oscillator.html" title="Harmonic oscillator"> <link rel="next" href="tutorial/harmonic_oscillator.html" title="Harmonic oscillator">
</head> </head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table cellpadding="2" width="100%"><tr><td valign="top"></td></tr></table>
<hr>
<div class="spirit-nav"> <div class="spirit-nav">
<a accesskey="p" href="getting_started/short_example.html"><img src="../images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../images/home.png" alt="Home"></a><a accesskey="n" href="tutorial/harmonic_oscillator.html"><img src="../images/next.png" alt="Next"></a> <a accesskey="p" href="getting_started/short_example.html"><img src="../images/prev.png" alt="Prev"></a><a accesskey="u" href="../index.html"><img src="../images/up.png" alt="Up"></a><a accesskey="h" href="../index.html"><img src="../images/home.png" alt="Home"></a><a accesskey="n" href="tutorial/harmonic_oscillator.html"><img src="../images/next.png" alt="Next"></a>
</div> </div>

View File

@ -10,8 +10,6 @@
<link rel="next" href="references.html" title="References"> <link rel="next" href="references.html" title="References">
</head> </head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table cellpadding="2" width="100%"><tr><td valign="top"></td></tr></table>
<hr>
<div class="spirit-nav"> <div class="spirit-nav">
<a accesskey="p" href="using_opencl_and_vexcl.html"><img src="../../images/prev.png" alt="Prev"></a><a accesskey="u" href="../tutorial.html"><img src="../../images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../images/home.png" alt="Home"></a><a accesskey="n" href="references.html"><img src="../../images/next.png" alt="Next"></a> <a accesskey="p" href="using_opencl_and_vexcl.html"><img src="../../images/prev.png" alt="Prev"></a><a accesskey="u" href="../tutorial.html"><img src="../../images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../images/home.png" alt="Home"></a><a accesskey="n" href="references.html"><img src="../../images/next.png" alt="Next"></a>
</div> </div>

View File

@ -10,8 +10,6 @@
<link rel="next" href="stiff_systems.html" title="Stiff systems"> <link rel="next" href="stiff_systems.html" title="Stiff systems">
</head> </head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table cellpadding="2" width="100%"><tr><td valign="top"></td></tr></table>
<hr>
<div class="spirit-nav"> <div class="spirit-nav">
<a accesskey="p" href="solar_system.html"><img src="../../images/prev.png" alt="Prev"></a><a accesskey="u" href="../tutorial.html"><img src="../../images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../images/home.png" alt="Home"></a><a accesskey="n" href="stiff_systems.html"><img src="../../images/next.png" alt="Next"></a> <a accesskey="p" href="solar_system.html"><img src="../../images/prev.png" alt="Prev"></a><a accesskey="u" href="../tutorial.html"><img src="../../images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../images/home.png" alt="Home"></a><a accesskey="n" href="stiff_systems.html"><img src="../../images/next.png" alt="Next"></a>
</div> </div>
@ -131,7 +129,6 @@
<span class="identifier">lorenz</span><span class="special">()(</span> <span class="identifier">x</span> <span class="special">,</span> <span class="identifier">dxdt</span> <span class="special">,</span> <span class="identifier">t</span> <span class="special">);</span> <span class="identifier">lorenz</span><span class="special">()(</span> <span class="identifier">x</span> <span class="special">,</span> <span class="identifier">dxdt</span> <span class="special">,</span> <span class="identifier">t</span> <span class="special">);</span>
<span class="special">...</span> <span class="special">...</span>
<span class="special">}</span> <span class="special">}</span>
</pre> </pre>
<p> <p>
This works fine and <code class="computeroutput"><span class="identifier">lorenz_with_lyap</span></code> This works fine and <code class="computeroutput"><span class="identifier">lorenz_with_lyap</span></code>

View File

@ -10,8 +10,6 @@
<link rel="next" href="solar_system.html" title="Solar system"> <link rel="next" href="solar_system.html" title="Solar system">
</head> </head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table cellpadding="2" width="100%"><tr><td valign="top"></td></tr></table>
<hr>
<div class="spirit-nav"> <div class="spirit-nav">
<a accesskey="p" href="../tutorial.html"><img src="../../images/prev.png" alt="Prev"></a><a accesskey="u" href="../tutorial.html"><img src="../../images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../images/home.png" alt="Home"></a><a accesskey="n" href="solar_system.html"><img src="../../images/next.png" alt="Next"></a> <a accesskey="p" href="../tutorial.html"><img src="../../images/prev.png" alt="Prev"></a><a accesskey="u" href="../tutorial.html"><img src="../../images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../images/home.png" alt="Home"></a><a accesskey="n" href="solar_system.html"><img src="../../images/next.png" alt="Next"></a>
</div> </div>
@ -29,6 +27,8 @@
with Constant Step Size</a></span></dt> with Constant Step Size</a></span></dt>
<dt><span class="section"><a href="harmonic_oscillator.html#boost_numeric_odeint.tutorial.harmonic_oscillator.integration_with_adaptive_step_size">Integration <dt><span class="section"><a href="harmonic_oscillator.html#boost_numeric_odeint.tutorial.harmonic_oscillator.integration_with_adaptive_step_size">Integration
with Adaptive Step Size</a></span></dt> with Adaptive Step Size</a></span></dt>
<dt><span class="section"><a href="harmonic_oscillator.html#boost_numeric_odeint.tutorial.harmonic_oscillator.using_iterators">Using
iterators</a></span></dt>
</dl></div> </dl></div>
<div class="section"> <div class="section">
<div class="titlepage"><div><div><h4 class="title"> <div class="titlepage"><div><div><h4 class="title">
@ -1448,6 +1448,26 @@
works. works.
</p> </p>
</div> </div>
<div class="section">
<div class="titlepage"><div><div><h4 class="title">
<a name="boost_numeric_odeint.tutorial.harmonic_oscillator.using_iterators"></a><a class="link" href="harmonic_oscillator.html#boost_numeric_odeint.tutorial.harmonic_oscillator.using_iterators" title="Using iterators">Using
iterators</a>
</h4></div></div></div>
<p>
odeint supports iterators for solving ODEs. That is you instantiate a pair
of iterators and instead of using the integrate routines with an appropriate
observer you put the iterators in one of the algorithm from the C++ standard
library or from Boost.Range. An example is
</p>
<p>
</p>
<pre class="programlisting"><span class="identifier">std</span><span class="special">::</span><span class="identifier">for_each</span><span class="special">(</span> <span class="identifier">make_adaptive_iterator_begin</span><span class="special">(</span> <span class="identifier">controlled_stepper</span> <span class="special">,</span> <span class="identifier">harmonic_oscillator</span> <span class="special">,</span> <span class="identifier">x</span> <span class="special">,</span> <span class="number">0.0</span> <span class="special">,</span> <span class="number">0.01</span> <span class="special">)</span> <span class="special">,</span>
<span class="identifier">make_adaptive_iterator_end</span><span class="special">(</span> <span class="identifier">controlled_stepper</span> <span class="special">,</span> <span class="identifier">harmonic_oscillator</span> <span class="special">,</span> <span class="identifier">x</span> <span class="special">,</span> <span class="number">0.0</span> <span class="special">,</span> <span class="number">0.01</span> <span class="special">)</span> <span class="special">,</span>
<span class="identifier">write_state</span><span class="special">()</span> <span class="special">);</span>
</pre>
<p>
</p>
</div>
<p> <p>
The full cpp file for this example can be found here: <a href="https://github.com/headmyshoulder/odeint-v2/tree/master/libs/numeric/odeint/examples/harmonic_oscillator.cpp" target="_top">harmonic_oscillator.cpp</a> The full cpp file for this example can be found here: <a href="https://github.com/headmyshoulder/odeint-v2/tree/master/libs/numeric/odeint/examples/harmonic_oscillator.cpp" target="_top">harmonic_oscillator.cpp</a>
</p> </p>

View File

@ -10,8 +10,6 @@
<link rel="next" href="../odeint_in_detail.html" title="odeint in detail"> <link rel="next" href="../odeint_in_detail.html" title="odeint in detail">
</head> </head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table cellpadding="2" width="100%"><tr><td valign="top"></td></tr></table>
<hr>
<div class="spirit-nav"> <div class="spirit-nav">
<a accesskey="p" href="all_examples.html"><img src="../../images/prev.png" alt="Prev"></a><a accesskey="u" href="../tutorial.html"><img src="../../images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../images/home.png" alt="Home"></a><a accesskey="n" href="../odeint_in_detail.html"><img src="../../images/next.png" alt="Next"></a> <a accesskey="p" href="all_examples.html"><img src="../../images/prev.png" alt="Prev"></a><a accesskey="u" href="../tutorial.html"><img src="../../images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../images/home.png" alt="Home"></a><a accesskey="n" href="../odeint_in_detail.html"><img src="../../images/next.png" alt="Next"></a>
</div> </div>

View File

@ -10,8 +10,6 @@
<link rel="next" href="chaotic_systems_and_lyapunov_exponents.html" title="Chaotic systems and Lyapunov exponents"> <link rel="next" href="chaotic_systems_and_lyapunov_exponents.html" title="Chaotic systems and Lyapunov exponents">
</head> </head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table cellpadding="2" width="100%"><tr><td valign="top"></td></tr></table>
<hr>
<div class="spirit-nav"> <div class="spirit-nav">
<a accesskey="p" href="harmonic_oscillator.html"><img src="../../images/prev.png" alt="Prev"></a><a accesskey="u" href="../tutorial.html"><img src="../../images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../images/home.png" alt="Home"></a><a accesskey="n" href="chaotic_systems_and_lyapunov_exponents.html"><img src="../../images/next.png" alt="Next"></a> <a accesskey="p" href="harmonic_oscillator.html"><img src="../../images/prev.png" alt="Prev"></a><a accesskey="u" href="../tutorial.html"><img src="../../images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../images/home.png" alt="Home"></a><a accesskey="n" href="chaotic_systems_and_lyapunov_exponents.html"><img src="../../images/next.png" alt="Next"></a>
</div> </div>
@ -140,7 +138,7 @@ p<sub>&#8203;i</sub><sup>2</sup> / (2m<sub>&#8203;i</sub>) + H<sub>&#8203;q</sub
<span class="comment">//...</span> <span class="comment">//...</span>
<span class="comment">// more operators</span> <span class="comment">// more operators</span>
</pre> </pre>
<p> <p>
</p> </p>
<p> <p>

View File

@ -10,8 +10,6 @@
<link rel="next" href="using_cuda_and_thrust.html" title="Using Cuda and Thrust"> <link rel="next" href="using_cuda_and_thrust.html" title="Using Cuda and Thrust">
</head> </head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table cellpadding="2" width="100%"><tr><td valign="top"></td></tr></table>
<hr>
<div class="spirit-nav"> <div class="spirit-nav">
<a accesskey="p" href="stiff_systems.html"><img src="../../images/prev.png" alt="Prev"></a><a accesskey="u" href="../tutorial.html"><img src="../../images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../images/home.png" alt="Home"></a><a accesskey="n" href="using_cuda_and_thrust.html"><img src="../../images/next.png" alt="Next"></a> <a accesskey="p" href="stiff_systems.html"><img src="../../images/prev.png" alt="Prev"></a><a accesskey="u" href="../tutorial.html"><img src="../../images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../images/home.png" alt="Home"></a><a accesskey="n" href="using_cuda_and_thrust.html"><img src="../../images/next.png" alt="Next"></a>
</div> </div>
@ -435,8 +433,6 @@
<span class="identifier">integrate_const</span><span class="special">(</span> <span class="identifier">runge_kutta4</span><span class="special">&lt;</span> <span class="identifier">container_type</span> <span class="special">&gt;()</span> <span class="special">,</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">ref</span><span class="special">(</span> <span class="identifier">ensemble</span> <span class="special">)</span> <span class="special">,</span> <span class="identifier">x</span> <span class="special">,</span> <span class="number">0.0</span> <span class="special">,</span> <span class="number">100.0</span> <span class="special">,</span> <span class="identifier">dt</span> <span class="special">,</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">ref</span><span class="special">(</span> <span class="identifier">obs</span> <span class="special">)</span> <span class="special">);</span> <span class="identifier">integrate_const</span><span class="special">(</span> <span class="identifier">runge_kutta4</span><span class="special">&lt;</span> <span class="identifier">container_type</span> <span class="special">&gt;()</span> <span class="special">,</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">ref</span><span class="special">(</span> <span class="identifier">ensemble</span> <span class="special">)</span> <span class="special">,</span> <span class="identifier">x</span> <span class="special">,</span> <span class="number">0.0</span> <span class="special">,</span> <span class="number">100.0</span> <span class="special">,</span> <span class="identifier">dt</span> <span class="special">,</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">ref</span><span class="special">(</span> <span class="identifier">obs</span> <span class="special">)</span> <span class="special">);</span>
<span class="identifier">cout</span> <span class="special">&lt;&lt;</span> <span class="identifier">epsilon</span> <span class="special">&lt;&lt;</span> <span class="string">"\t"</span> <span class="special">&lt;&lt;</span> <span class="identifier">obs</span><span class="special">.</span><span class="identifier">get_K_mean</span><span class="special">()</span> <span class="special">&lt;&lt;</span> <span class="identifier">endl</span><span class="special">;</span> <span class="identifier">cout</span> <span class="special">&lt;&lt;</span> <span class="identifier">epsilon</span> <span class="special">&lt;&lt;</span> <span class="string">"\t"</span> <span class="special">&lt;&lt;</span> <span class="identifier">obs</span><span class="special">.</span><span class="identifier">get_K_mean</span><span class="special">()</span> <span class="special">&lt;&lt;</span> <span class="identifier">endl</span><span class="special">;</span>
<span class="special">}</span> <span class="special">}</span>
</pre> </pre>
<p> <p>
</p> </p>

View File

@ -10,8 +10,6 @@
<link rel="next" href="special_topics.html" title="Special topics"> <link rel="next" href="special_topics.html" title="Special topics">
</head> </head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table cellpadding="2" width="100%"><tr><td valign="top"></td></tr></table>
<hr>
<div class="spirit-nav"> <div class="spirit-nav">
<a accesskey="p" href="chaotic_systems_and_lyapunov_exponents.html"><img src="../../images/prev.png" alt="Prev"></a><a accesskey="u" href="../tutorial.html"><img src="../../images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../images/home.png" alt="Home"></a><a accesskey="n" href="special_topics.html"><img src="../../images/next.png" alt="Next"></a> <a accesskey="p" href="chaotic_systems_and_lyapunov_exponents.html"><img src="../../images/prev.png" alt="Prev"></a><a accesskey="u" href="../tutorial.html"><img src="../../images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../images/home.png" alt="Home"></a><a accesskey="n" href="special_topics.html"><img src="../../images/next.png" alt="Next"></a>
</div> </div>

View File

@ -10,8 +10,6 @@
<link rel="next" href="using_opencl_and_vexcl.html" title="Using OpenCL and VexCL"> <link rel="next" href="using_opencl_and_vexcl.html" title="Using OpenCL and VexCL">
</head> </head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table cellpadding="2" width="100%"><tr><td valign="top"></td></tr></table>
<hr>
<div class="spirit-nav"> <div class="spirit-nav">
<a accesskey="p" href="special_topics.html"><img src="../../images/prev.png" alt="Prev"></a><a accesskey="u" href="../tutorial.html"><img src="../../images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../images/home.png" alt="Home"></a><a accesskey="n" href="using_opencl_and_vexcl.html"><img src="../../images/next.png" alt="Next"></a> <a accesskey="p" href="special_topics.html"><img src="../../images/prev.png" alt="Prev"></a><a accesskey="u" href="../tutorial.html"><img src="../../images/up.png" alt="Up"></a><a accesskey="h" href="../../index.html"><img src="../../images/home.png" alt="Home"></a><a accesskey="n" href="using_opencl_and_vexcl.html"><img src="../../images/next.png" alt="Next"></a>
</div> </div>

View File

@ -8,8 +8,6 @@
<link rel="next" href="boost_numeric_odeint/getting_started.html" title="Getting started"> <link rel="next" href="boost_numeric_odeint/getting_started.html" title="Getting started">
</head> </head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table cellpadding="2" width="100%"><tr><td valign="top"></td></tr></table>
<hr>
<div class="spirit-nav"><a accesskey="n" href="boost_numeric_odeint/getting_started.html"><img src="images/next.png" alt="Next"></a></div> <div class="spirit-nav"><a accesskey="n" href="boost_numeric_odeint/getting_started.html"><img src="images/next.png" alt="Next"></a></div>
<div class="chapter"> <div class="chapter">
<div class="titlepage"><div> <div class="titlepage"><div>
@ -24,7 +22,7 @@
<div><p class="copyright">Copyright &#169; 2009-2011 Karsten Ahnert <div><p class="copyright">Copyright &#169; 2009-2011 Karsten Ahnert
and Mario Mulansky</p></div> and Mario Mulansky</p></div>
<div><div class="legalnotice"> <div><div class="legalnotice">
<a name="id533358"></a><p> <a name="odeint.legal"></a><p>
Distributed under the Boost Software License, Version 1.0. (See accompanying Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>) file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
</p> </p>
@ -65,6 +63,7 @@
functions</a></span></dt> functions</a></span></dt>
<dt><span class="section"><a href="boost_numeric_odeint/odeint_in_detail/integrate_functions.html">Integrate <dt><span class="section"><a href="boost_numeric_odeint/odeint_in_detail/integrate_functions.html">Integrate
functions</a></span></dt> functions</a></span></dt>
<dt><span class="section"><a href="boost_numeric_odeint/odeint_in_detail/iterators.html">Iterators</a></span></dt>
<dt><span class="section"><a href="boost_numeric_odeint/odeint_in_detail/state_types__algebras_and_operations.html">State <dt><span class="section"><a href="boost_numeric_odeint/odeint_in_detail/state_types__algebras_and_operations.html">State
types, algebras and operations</a></span></dt> types, algebras and operations</a></span></dt>
<dt><span class="section"><a href="boost_numeric_odeint/odeint_in_detail/using_boost__ref.html">Using <dt><span class="section"><a href="boost_numeric_odeint/odeint_in_detail/using_boost__ref.html">Using
@ -95,7 +94,7 @@
</div> </div>
</div> </div>
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr> <table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
<td align="left"><p><small>Last revised: June 26, 2012 at 05:15:24 GMT</small></p></td> <td align="left"><p><small>Last revised: August 14, 2012 at 07:33:18 GMT</small></p></td>
<td align="right"><div class="copyright-footer"></div></td> <td align="right"><div class="copyright-footer"></div></td>
</tr></table> </tr></table>
<hr> <hr>

View File

@ -1,20 +1,91 @@
[section ODE Iterators] [section Iterators]
odeint supports iterators for iterating throught an ordinary differential equation. They offer you an alternative to the integrate functions. Furthermore, many of the standard algorithms in the C++ standard library and Boost.Range can be used with the odeint't iterators.
odeint supports iterators for iterating through an ordinary differential equation. They offer you an alternative to the integrate functions. Furthermore, many of the standard algorithms in the C++ standard library and Boost.Range can be used with the odeint't iterators.
[warning odeint's iterators do not satisfy the iterator concepts defined in the standard completely. In detail the iterator transitivity is violated in some rare cases. But this is not relevant for all algorithms in the C++ standard library and in Boost.Range.] [warning odeint's iterators do not satisfy the iterator concepts defined in the standard completely. In detail the iterator transitivity is violated in some rare cases. But this is not relevant for all algorithms in the C++ standard library and in Boost.Range.]
odeint provides for four new iterators. [import ../examples/const_step_iterator.cpp]
Four iterators are provided. They are all single pass iterators. The first one is a iterator which solves the odeint with constant step size. An example is
[const_step_iterator_accumulate]
In this example all x-values of the solution are accumulated. The iterator itself does not occur directly in this example but it is generated by the factory functions `make_const_step_iterator_begin` and `make_const_step_iterator_end`. odeint also supports Boost.Range, that is you write the above example in a shortified form with the factory function `make_const_step_range`
[const_step_iterator_accumulate_range]
The second iterator type is also a iterator with const step size. But the value type of this iterator consists here of a pair of the time and the state of the solution of the ODE. An example is
[const_step_time_iterator_accumulate_range]
The factory functions are now `make_const_step_time_iterator_begin`, `make_const_step_time_iterator_end` and `make_const_step_time_range`.
[import ../examples/adaptive_iterator.cpp]
The other two iterator types adaptive iterators which are completely analogous to the const step iterators. Examples are
[adaptive_iterator_accumulate_range]
[adaptive_time_iterator_accumulate_range]
[section const_step_iterator]
* Definition: `const_step_iterator< Stepper , System >`
* `value_type` is `Stepper::state_type`
* Factory functions
* `make_const_step_iterator_begin( stepper , system , state , t_start , dt )`
* `make_const_step_iterator_end( stepper , system , state , t_end , dt )`
* `make_const_step_range( stepper , system , state , t_start , t_end , dt )`
* This stepper works with all steppers fullfilling the Stepper concept or the DenseOutputStepper concept.
[endsect]
[section const_step_time_iterator]
* Definition: `const_step_iterator< Stepper , System >`
* `value_type` is `std::pair< Stepper::state_type& , Stepper::time_type >`
* Factory functions
* `make_const_step_time_iterator_begin( stepper , system , state , t_start , dt )`
* `make_const_step_time_iterator_end( stepper , system , state , t_end , dt )`
* `make_const_step_time_range( stepper , system , state , t_start , t_end , dt )`
* This stepper works with all steppers fullfilling the Stepper concept or the DenseOutputStepper concept.
[endsect]
[section adaptive_step_iterator]
* Definition: `adaptive_iterator< Stepper , System >`
* `value_type` is `Stepper::state_type`
* Factory functions
* `make_adaptive_iterator_begin( stepper , system , state , t_start , dt )`
* `make_adaptive_iterator_end( stepper , system , state , t_end , dt )`
* `make_adaptive_range( stepper , system , state , t_start , t_end , dt )`
* This stepper works with all steppers fullfilling the ControlledStepper concept or the DenseOutputStepper concept.
[endsect]
[section adaptive_step_time_iterator]
* Definition: `adaptive_iterator< Stepper , System >`
* `value_type` is `std::pair< Stepper::state_type& , Stepper::time_type >`
* Factory functions
* `make_adaptive_time_iterator_begin( stepper , system , state , t_start , dt )`
* `make_adaptive_time_iterator_end( stepper , system , state , t_end , dt )`
* `make_adaptive_time_range( stepper , system , state , t_start , t_end , dt )`
* This stepper works with all steppers fullfilling the ControlledStepper concept or the DenseOutputStepper concept.
[endsect]
const step iterator, factory functions
const step time iterator, factory functions
adaptive iterator, factory functions
adaptive time iterator, factory functions
[endsect] [endsect]

View File

@ -91,6 +91,15 @@ When using `make_controlled` or `make_dense_output` one should be aware which ex
[endsect] [endsect]
The full cpp file for this example can be found here: [github_link libs/numeric/odeint/examples/harmonic_oscillator.cpp harmonic_oscillator.cpp] [section Using iterators]
odeint supports iterators for solving ODEs. That is you instantiate a pair of iterators and instead of using the integrate routines with an appropriate observer you put the iterators in one of the algorithm from the C++ standard library or from Boost.Range. An example is
[harm_iterator_const_step]
[endsect]
The full cpp file for this example can be found here: [github_link libs/numeric/odeint/examples/harmonic_oscillator.cpp harmonic_oscillator.cpp]
[endsect] [endsect]

View File

@ -146,12 +146,14 @@ int main( int argc , char **argv )
// boost::range::accumulate // boost::range::accumulate
{ {
//[adaptive_time_iterator_accumulate_range
auto stepper = make_controlled( 1.0e-6 , 1.0e-6 , runge_kutta_cash_karp54< state_type >() ); auto stepper = make_controlled( 1.0e-6 , 1.0e-6 , runge_kutta_cash_karp54< state_type >() );
state_type x = {{ 10.0 , 10.0 , 10.0 }}; state_type x = {{ 10.0 , 10.0 , 10.0 }};
double res = boost::accumulate( make_adaptive_time_range( stepper , lorenz() , x , 0.0 , 1.0 , 0.01 ) , 0.0 , double res = boost::accumulate( make_adaptive_time_range( stepper , lorenz() , x , 0.0 , 1.0 , 0.01 ) , 0.0 ,
[]( double sum , const pair< state_type& , double > &x ) { []( double sum , const pair< state_type& , double > &x ) {
return sum + x.first[0]; } ); return sum + x.first[0]; } );
cout << res << endl; cout << res << endl;
//]
} }
@ -310,12 +312,14 @@ int main( int argc , char **argv )
// boost::range::accumulate // boost::range::accumulate
{ {
//[adaptive_iterator_accumulate_range
auto stepper = make_controlled( 1.0e-6 , 1.0e-6 , runge_kutta_cash_karp54< state_type >() ); auto stepper = make_controlled( 1.0e-6 , 1.0e-6 , runge_kutta_cash_karp54< state_type >() );
state_type x = {{ 10.0 , 10.0 , 10.0 }}; state_type x = {{ 10.0 , 10.0 , 10.0 }};
double res = boost::accumulate( make_adaptive_range( stepper , lorenz() , x , 0.0 , 1.0 , 0.01 ) , 0.0 , double res = boost::accumulate( make_adaptive_range( stepper , lorenz() , x , 0.0 , 1.0 , 0.01 ) , 0.0 ,
[]( double sum , const state_type& x ) { []( double sum , const state_type& x ) {
return sum + x[0]; } ); return sum + x[0]; } );
cout << res << endl; cout << res << endl;
//]
} }

View File

@ -74,6 +74,7 @@ int main( int argc , char **argv )
// std::accumulate // std::accumulate
{ {
//[ const_step_iterator_accumulate
runge_kutta4< state_type > stepper; runge_kutta4< state_type > stepper;
state_type x = {{ 10.0 , 10.0 , 10.0 }}; state_type x = {{ 10.0 , 10.0 , 10.0 }};
double res = std::accumulate( make_const_step_iterator_begin( stepper , lorenz() , x , 0.0 , 0.01 ) , double res = std::accumulate( make_const_step_iterator_begin( stepper , lorenz() , x , 0.0 , 0.01 ) ,
@ -82,6 +83,7 @@ int main( int argc , char **argv )
[]( double sum , const state_type &x ) { []( double sum , const state_type &x ) {
return sum + x[0]; } ); return sum + x[0]; } );
cout << res << endl; cout << res << endl;
//]
} }
@ -162,22 +164,26 @@ int main( int argc , char **argv )
// boost::range::accumulate // boost::range::accumulate
{ {
//[const_step_iterator_accumulate_range
runge_kutta4< state_type > stepper; runge_kutta4< state_type > stepper;
state_type x = {{ 10.0 , 10.0 , 10.0 }}; state_type x = {{ 10.0 , 10.0 , 10.0 }};
double res = boost::accumulate( make_const_step_range( stepper , lorenz() , x , 0.0 , 1.0 , 0.01 ) , 0.0 , double res = boost::accumulate( make_const_step_range( stepper , lorenz() , x , 0.0 , 1.0 , 0.01 ) , 0.0 ,
[]( double sum , const state_type &x ) { []( double sum , const state_type &x ) {
return sum + x[0]; } ); return sum + x[0]; } );
cout << res << endl; cout << res << endl;
//]
} }
// boost::range::accumulate with time iterator // boost::range::accumulate with time iterator
{ {
//[const_step_time_iterator_accumulate_range
runge_kutta4< state_type > stepper; runge_kutta4< state_type > stepper;
state_type x = {{ 10.0 , 10.0 , 10.0 }}; state_type x = {{ 10.0 , 10.0 , 10.0 }};
double res = boost::accumulate( make_const_step_time_range( stepper , lorenz() , x , 0.0 , 1.0 , 0.01 ) , 0.0 , double res = boost::accumulate( make_const_step_time_range( stepper , lorenz() , x , 0.0 , 1.0 , 0.01 ) , 0.0 ,
[]( double sum , const std::pair< state_type &, double > &x ) { []( double sum , const std::pair< state_type &, double > &x ) {
return sum + x.first[0]; } ); return sum + x.first[0]; } );
cout << res << endl; cout << res << endl;
//]
} }

View File

@ -61,6 +61,14 @@ struct push_back_state_and_time
}; };
//] //]
struct write_state
{
void operator()( const state_type &x ) const
{
std::cout << x[0] << "\t" << x[1] << "\n";
}
};
int main(int /* argc */ , char** /* argv */ ) int main(int /* argc */ , char** /* argv */ )
{ {
@ -166,4 +174,11 @@ int main(int /* argc */ , char** /* argv */ )
harmonic_oscillator , x , 0.0 , 10.0 , 0.01 ); harmonic_oscillator , x , 0.0 , 10.0 , 0.01 );
//] //]
//[harm_iterator_const_step
std::for_each( make_adaptive_iterator_begin( controlled_stepper , harmonic_oscillator , x , 0.0 , 0.01 ) ,
make_adaptive_iterator_end( controlled_stepper , harmonic_oscillator , x , 0.0 , 0.01 ) ,
write_state() );
//]
} }