algebra_stepper_base.hpp 2.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091
  1. /*
  2. [auto_generated]
  3. boost/numeric/odeint/stepper/base/algebra_stepper_base.hpp
  4. [begin_description]
  5. Base class for all steppers with an algebra and operations.
  6. [end_description]
  7. Copyright 2012-2013 Karsten Ahnert
  8. Copyright 2012 Mario Mulansky
  9. Distributed under the Boost Software License, Version 1.0.
  10. (See accompanying file LICENSE_1_0.txt or
  11. copy at http://www.boost.org/LICENSE_1_0.txt)
  12. */
  13. #ifndef BOOST_NUMERIC_ODEINT_STEPPER_BASE_ALGEBRA_STEPPER_BASE_HPP_INCLUDED
  14. #define BOOST_NUMERIC_ODEINT_STEPPER_BASE_ALGEBRA_STEPPER_BASE_HPP_INCLUDED
  15. namespace boost {
  16. namespace numeric {
  17. namespace odeint {
  18. template< class Algebra , class Operations >
  19. class algebra_stepper_base
  20. {
  21. public:
  22. typedef Algebra algebra_type;
  23. typedef Operations operations_type;
  24. algebra_stepper_base( const algebra_type &algebra = algebra_type() )
  25. : m_algebra( algebra ) { }
  26. algebra_type& algebra()
  27. {
  28. return m_algebra;
  29. }
  30. const algebra_type& algebra() const
  31. {
  32. return m_algebra;
  33. }
  34. protected:
  35. algebra_type m_algebra;
  36. };
  37. /******* DOXYGEN *******/
  38. /**
  39. * \class algebra_stepper_base
  40. * \brief Base class for all steppers with algebra and operations.
  41. *
  42. * This class serves a base class for all steppers with algebra and operations. It holds the
  43. * algebra and provides access to the algebra. The operations are not instantiated, since they are
  44. * static classes inside the operations class.
  45. *
  46. * \tparam Algebra The type of the algebra. Must fulfill the Algebra Concept, at least partially to work
  47. * with the stepper.
  48. * \tparam Operations The type of the operations. Must fulfill the Operations Concept, at least partially
  49. * to work with the stepper.
  50. */
  51. /**
  52. * \fn algebra_stepper_base::algebra_stepper_base( const algebra_type &algebra = algebra_type() )
  53. * \brief Constructs a algebra_stepper_base and creates the algebra. This constructor can be used as a default
  54. * constructor if the algebra has a default constructor.
  55. * \param algebra The algebra_stepper_base stores and uses a copy of algebra.
  56. */
  57. /**
  58. * \fn algebra_type& algebra_stepper_base::algebra()
  59. * \return A reference to the algebra which is held by this class.
  60. */
  61. /**
  62. * \fn const algebra_type& algebra_stepper_base::algebra() const
  63. * \return A const reference to the algebra which is held by this class.
  64. */
  65. } // odeint
  66. } // numeric
  67. } // boost
  68. #endif // BOOST_NUMERIC_ODEINT_STEPPER_BASE_ALGEBRA_STEPPER_BASE_HPP_INCLUDED