Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 09:42:54

0001 /*
0002  [auto_generated]
0003  boost/numeric/odeint/stepper/base/algebra_stepper_base.hpp
0004 
0005  [begin_description]
0006  Base class for all steppers with an algebra and operations.
0007  [end_description]
0008 
0009  Copyright 2012-2013 Karsten Ahnert
0010  Copyright 2012 Mario Mulansky
0011 
0012  Distributed under the Boost Software License, Version 1.0.
0013  (See accompanying file LICENSE_1_0.txt or
0014  copy at http://www.boost.org/LICENSE_1_0.txt)
0015  */
0016 
0017 
0018 #ifndef BOOST_NUMERIC_ODEINT_STEPPER_BASE_ALGEBRA_STEPPER_BASE_HPP_INCLUDED
0019 #define BOOST_NUMERIC_ODEINT_STEPPER_BASE_ALGEBRA_STEPPER_BASE_HPP_INCLUDED
0020 
0021 
0022 namespace boost {
0023 namespace numeric {
0024 namespace odeint {
0025 
0026 template< class Algebra , class Operations >
0027 class algebra_stepper_base
0028 {
0029 public:
0030 
0031     typedef Algebra algebra_type;
0032     typedef Operations operations_type;
0033 
0034     algebra_stepper_base( const algebra_type &algebra = algebra_type() )
0035     : m_algebra( algebra ) { }
0036 
0037     algebra_type& algebra()
0038     {
0039         return m_algebra;
0040     }
0041 
0042     const algebra_type& algebra() const
0043     {
0044         return m_algebra;
0045     }
0046 
0047 protected:
0048 
0049     algebra_type m_algebra;
0050 };
0051 
0052 
0053 /******* DOXYGEN *******/
0054 
0055 /**
0056  * \class algebra_stepper_base
0057  * \brief Base class for all steppers with algebra and operations.
0058  *
0059  * This class serves a base class for all steppers with algebra and operations. It holds the
0060  * algebra and provides access to the algebra.  The operations are not instantiated, since they are 
0061  * static classes inside the operations class.
0062  *
0063  * \tparam Algebra The type of the algebra. Must fulfill the Algebra Concept, at least partially to work
0064  * with the stepper.
0065  * \tparam Operations The type of the operations. Must fulfill the Operations Concept, at least partially 
0066  * to work with the stepper.
0067  */
0068 
0069     /**
0070      * \fn algebra_stepper_base::algebra_stepper_base( const algebra_type &algebra = algebra_type() )
0071      * \brief Constructs a algebra_stepper_base and creates the algebra. This constructor can be used as a default
0072      * constructor if the algebra has a default constructor.
0073      * \param algebra The algebra_stepper_base stores and uses a copy of algebra.
0074      */
0075 
0076     /**
0077      * \fn algebra_type& algebra_stepper_base::algebra()
0078      * \return A reference to the algebra which is held by this class.
0079      */
0080 
0081     /**
0082      * \fn const algebra_type& algebra_stepper_base::algebra() const
0083      * \return A const reference to the algebra which is held by this class.
0084      */
0085 
0086 } // odeint
0087 } // numeric
0088 } // boost
0089 
0090 
0091 #endif // BOOST_NUMERIC_ODEINT_STEPPER_BASE_ALGEBRA_STEPPER_BASE_HPP_INCLUDED