First commit of extensively revised documentation including examples for all items and using Quickbook code snippets in the text. TODO Compile failure in common_factor_ct example. Derived html files NOT saved.

This commit is contained in:
pabristow
2015-01-27 11:53:20 +00:00
parent c5370a9705
commit 2de3837ca6
13 changed files with 845 additions and 302 deletions

View File

@@ -5,7 +5,9 @@
// accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
// See http://www.boost.org for updates, documentation, and revision history.
// See http://www.boost.org for updates, documentation, and revision history.
//! \file
//! \brief Include both GCD and LCM.
#ifndef BOOST_INTEGER_COMMON_FACTOR_HPP
#define BOOST_INTEGER_COMMON_FACTOR_HPP

View File

@@ -5,7 +5,9 @@
// accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
// See http://www.boost.org for updates, documentation, and revision history.
// See http://www.boost.org for updates, documentation, and revision history.
//! \file
//! \brief Evaluate Greatest Common Divisor at compile-time.
#ifndef BOOST_INTEGER_COMMON_FACTOR_CT_HPP
#define BOOST_INTEGER_COMMON_FACTOR_CT_HPP
@@ -17,9 +19,10 @@ namespace boost
{
namespace integer
{
// Warning: this is from 1.58 in namespace boost::integer and no longer in namespace boost::math.
// Implementation details --------------------------------------------------//
//! \cond DETAIL
namespace detail
{
// Build GCD with Euclid's recursive algorithm
@@ -71,7 +74,7 @@ namespace detail
};
} // namespace detail
//! \endcond // DETAIL
// Compile-time greatest common divisor evaluator class declaration --------//

View File

@@ -4,13 +4,15 @@
// use, modify, sell and distribute this software is granted provided this
// copyright notice appears in all copies. This software is provided "as is"
// without express or implied warranty, and with no claim as to its suitability
// for any purpose.
// for any purpose.
// boostinspect:nolicense (don't complain about the lack of a Boost license)
// (Paul Moore hasn't been in contact for years, so there's no way to change the
// license.)
// See http://www.boost.org for updates, documentation, and revision history.
// See http://www.boost.org for updates, documentation, and revision history.
//! \file
//! \brief Evaluate Least Common Multiple at compile-time.
#ifndef BOOST_INTEGER_COMMON_FACTOR_RT_HPP
#define BOOST_INTEGER_COMMON_FACTOR_RT_HPP
@@ -31,7 +33,7 @@ namespace boost
{
namespace integer
{
// Warning: this is from 1.58 in namespace boost::interger and no longer in namespace boost::math.
// Forward declarations for function templates -----------------------------//
@@ -75,6 +77,7 @@ public:
// Implementation details --------------------------------------------------//
//! \cond DETAIL
namespace detail
{
@@ -387,9 +390,13 @@ namespace detail
}
} // namespace detail
//! \endcond // DETAIL
// Greatest common divisor evaluator member function definition ------------//
// Greatest common divisor operator() evaluator member function definition ------------//
//! Evaluation operator() for Greatest Common Divisor (GCD) of two arguments.
//! \tparam IntegerType must be an integral constant http://en.cppreference.com/w/cpp/types/integral_constant
//! \param a first_argument_type
//! \param b second_argument_type
template < typename IntegerType >
inline
@@ -405,7 +412,11 @@ gcd_evaluator<IntegerType>::operator ()
// Least common multiple evaluator member function definition --------------//
//! Evaluates Least Common Multiplier of two arguments.
//! \tparam IntegerType must be an integral constant http://en.cppreference.com/w/cpp/types/integral_constant
//! \tparam IntegerType must be an integral constant http://en.cppreference.com/w/cpp/types/integral_constant
//! \param a first_argument_type
//! \param b second_argument_type
template < typename IntegerType >
inline
typename lcm_evaluator<IntegerType>::result_type
@@ -420,6 +431,10 @@ lcm_evaluator<IntegerType>::operator ()
// Greatest common divisor and least common multiple function definitions --//
//! Function for Greatest Common Divisor (GCD) of two arguments.
//! \tparam IntegerType must be an integral constant http://en.cppreference.com/w/cpp/types/integral_constant
//! \param a first_argument_type
//! \param b second_argument_type
template < typename IntegerType >
inline
@@ -435,6 +450,11 @@ gcd
return solver( a, b );
}
//! Function for Least Common Multiplier (LCM) of two arguments.
//! \tparam IntegerType must be an integral constant http://en.cppreference.com/w/cpp/types/integral_constant
//! \param a first_argument_type
//! \param b second_argument_type
template < typename IntegerType >
inline
IntegerType

View File

@@ -1,15 +1,18 @@
// -----------------------------------------------------------
// integer_log2.hpp
//
// Gives the integer part of the logarithm, in base 2, of a
// given number. Behavior is undefined if the argument is <= 0.
//
// Copyright (c) 2003-2004, 2008 Gennaro Prota
//
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
//
//! \file
//! \brief Function integer_log2 gives the integer part of the logarithm, in base 2, of a
//! given number (at run-time). Behavior is undefined if the argument is <= 0.
//
//! \note For analogous compile-time computation of log2 see static_log2.
//! \sa http::www.boost.org/doc/integer
// -----------------------------------------------------------
#ifndef BOOST_INTEGER_INTEGER_LOG2_HPP
@@ -24,6 +27,8 @@
namespace boost {
//! \cond DETAIL
namespace detail {
template <typename T>
@@ -46,7 +51,6 @@ namespace boost {
}
// helper to find the maximum power of two
// less than p (more involved than necessary,
// to avoid PTS)
@@ -82,9 +86,8 @@ namespace boost {
#endif
};
} // detail
//! \endcond // DETAIL
// ---------
// integer_log2
@@ -104,9 +107,6 @@ namespace boost {
}
}
#endif // include guard
#endif // BOOST_INTEGER_INTEGER_LOG2_HPP include guard

View File

@@ -5,7 +5,10 @@
// accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
// See http://www.boost.org for updates, documentation, and revision history.
// See http://www.boost.org for updates, documentation, and revision history.
//! \file
//! \brief Compile-time integer mask evaluation.
#ifndef BOOST_INTEGER_INTEGER_MASK_HPP
#define BOOST_INTEGER_INTEGER_MASK_HPP
@@ -35,7 +38,6 @@
namespace boost
{
// Specified single-bit mask class declaration -----------------------------//
// (Lowest bit starts counting at 0.)

View File

@@ -10,6 +10,11 @@
//
// ---------------------------------------------------
// See http://www.boost.org/libs/integer for documentation.
//! \file
//! \brief Compile-time calculation of integer part of the logarithm, in base 2, of a given number.
//! \note For a run-time calculation of log2, see function integer_log2 at integer_log2.hpp.
// ------------------------------------------------------------------------- //
@@ -20,6 +25,8 @@
namespace boost {
//! \cond DETAIL
namespace detail {
namespace static_log2_impl {
@@ -99,8 +106,7 @@ namespace boost {
}
} // detail
//! \endcond // DETAIL
// --------------------------------------
// static_log2<x>
@@ -120,7 +126,7 @@ namespace boost {
template <>
struct static_log2<0> { };
}
} // namespace boost

View File

@@ -5,7 +5,9 @@
// accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
// See http://www.boost.org for updates, documentation, and revision history.
// See http://www.boost.org for updates, documentation, and revision history.
//! \file
//! \brief Compile-time evaluation of extrema: minimum or maximum of two values, signed or unsigned.
#ifndef BOOST_INTEGER_STATIC_MIN_MAX_HPP
#define BOOST_INTEGER_STATIC_MIN_MAX_HPP