From 2e0cd9bbb13c9a1a4765684832ed5b80314157f8 Mon Sep 17 00:00:00 2001 From: John Maddock Date: Tue, 9 Dec 2008 12:11:12 +0000 Subject: Added reference build. [SVN r50221] --- .../extract/weighted_tail_quantile.html | 50 ++ .../impl/weighted_tail_quantile__id226526.html | 91 +++ .../accumulators/tag/weighted_tail_quantile.html | 52 ++ doc/test/gold/boost/array.html | 641 +++++++++++++++++++++ .../document_to_test_formatting/accumulators.html | 69 +++ .../gold/document_to_test_formatting/array.html | 262 +++++++++ .../basic_formatting.html | 201 +++++++ .../gold/document_to_test_formatting/blurbs.html | 160 +++++ .../document_to_test_formatting/code_blocks.html | 428 ++++++++++++++ .../gold/document_to_test_formatting/images.html | 60 ++ .../lists_and_tables.html | 455 +++++++++++++++ .../gold/document_to_test_formatting/remez.html | 535 +++++++++++++++++ .../gold/document_to_test_formatting/test.html | 73 +++ doc/test/gold/images/accumulators/doxygen.png | Bin 0 -> 1281 bytes doc/test/gold/images/accumulators/form_0.png | Bin 0 -> 189 bytes doc/test/gold/images/accumulators/form_1.png | Bin 0 -> 179 bytes doc/test/gold/images/accumulators/form_2.png | Bin 0 -> 554 bytes doc/test/gold/images/accumulators/form_3.png | Bin 0 -> 243 bytes doc/test/gold/images/accumulators/form_4.png | Bin 0 -> 248 bytes doc/test/gold/images/accumulators/form_5.png | Bin 0 -> 864 bytes doc/test/gold/images/accumulators/form_6.png | Bin 0 -> 1013 bytes doc/test/gold/images/accumulators/form_7.png | Bin 0 -> 178 bytes doc/test/gold/images/accumulators/form_8.png | Bin 0 -> 209 bytes doc/test/gold/index.html | 149 +++++ 24 files changed, 3226 insertions(+) create mode 100644 doc/test/gold/boost/accumulators/extract/weighted_tail_quantile.html create mode 100644 doc/test/gold/boost/accumulators/impl/weighted_tail_quantile__id226526.html create mode 100644 doc/test/gold/boost/accumulators/tag/weighted_tail_quantile.html create mode 100644 doc/test/gold/boost/array.html create mode 100644 doc/test/gold/document_to_test_formatting/accumulators.html create mode 100644 doc/test/gold/document_to_test_formatting/array.html create mode 100644 doc/test/gold/document_to_test_formatting/basic_formatting.html create mode 100644 doc/test/gold/document_to_test_formatting/blurbs.html create mode 100644 doc/test/gold/document_to_test_formatting/code_blocks.html create mode 100644 doc/test/gold/document_to_test_formatting/images.html create mode 100644 doc/test/gold/document_to_test_formatting/lists_and_tables.html create mode 100644 doc/test/gold/document_to_test_formatting/remez.html create mode 100644 doc/test/gold/document_to_test_formatting/test.html create mode 100644 doc/test/gold/images/accumulators/doxygen.png create mode 100644 doc/test/gold/images/accumulators/form_0.png create mode 100644 doc/test/gold/images/accumulators/form_1.png create mode 100644 doc/test/gold/images/accumulators/form_2.png create mode 100644 doc/test/gold/images/accumulators/form_3.png create mode 100644 doc/test/gold/images/accumulators/form_4.png create mode 100644 doc/test/gold/images/accumulators/form_5.png create mode 100644 doc/test/gold/images/accumulators/form_6.png create mode 100644 doc/test/gold/images/accumulators/form_7.png create mode 100644 doc/test/gold/images/accumulators/form_8.png create mode 100644 doc/test/gold/index.html diff --git a/doc/test/gold/boost/accumulators/extract/weighted_tail_quantile.html b/doc/test/gold/boost/accumulators/extract/weighted_tail_quantile.html new file mode 100644 index 0000000000..4f0830a24a --- /dev/null +++ b/doc/test/gold/boost/accumulators/extract/weighted_tail_quantile.html @@ -0,0 +1,50 @@ + + + +Global weighted_tail_quantile + + + + + + + + + + + + + + + +
Boost C++ LibrariesHomeLibrariesPeopleFAQMore
+
+
+PrevUpHomeNext +
+
+
+
+

Global weighted_tail_quantile

+

boost::accumulators::extract::weighted_tail_quantile

+
+

Synopsis

+
// In header: <boost/trunk/doc/test/weighted_tail_quantile.hpp>
+
+extractor< tag::quantile > const weighted_tail_quantile;
+
+ + + +
+
+
+PrevUpHomeNext +
+ + diff --git a/doc/test/gold/boost/accumulators/impl/weighted_tail_quantile__id226526.html b/doc/test/gold/boost/accumulators/impl/weighted_tail_quantile__id226526.html new file mode 100644 index 0000000000..01c0dff986 --- /dev/null +++ b/doc/test/gold/boost/accumulators/impl/weighted_tail_quantile__id226526.html @@ -0,0 +1,91 @@ + + + +Struct template weighted_tail_quantile_impl + + + + + + + + + + + + + + + +
Boost C++ LibrariesHomeLibrariesPeopleFAQMore
+
+
+PrevUpHomeNext +
+
+
+
+

Struct template weighted_tail_quantile_impl

+

boost::accumulators::impl::weighted_tail_quantile_impl — Tail quantile estimation based on order statistics of weighted samples (for both left and right tails).

+
+

Synopsis

+
// In header: <boost/trunk/doc/test/weighted_tail_quantile.hpp>
+
+template<typename Sample, typename Weight, typename LeftRight> 
+struct weighted_tail_quantile_impl {
+  // types
+  typedef numeric::functional::average< Weight, std::size_t >::result_type float_type; 
+  typedef Sample                                                           result_type;
+
+  // construct/copy/destruct
+  weighted_tail_quantile_impl(dont_care);
+
+  // public member functions
+  template<typename Args> result_type result(Args const &) const;
+};
+
+

Description

+

An estimator of tail quantiles with level based on order statistics of weighted samples are given by (left tail) and (right tail), where

+
+

Equation 1. 

+
+
+


+

and

+
+

Equation 2. 

+
+
+


+

being the number of samples and the sum of all weights.

+

+

+
+

+weighted_tail_quantile_impl + public + construct/copy/destruct

+
  1. weighted_tail_quantile_impl(dont_care);
+
+
+

+weighted_tail_quantile_impl public member functions

+
  1. template<typename Args> result_type result(Args const & args) const;
+
+
+
+ + + +
+
+
+PrevUpHomeNext +
+ + diff --git a/doc/test/gold/boost/accumulators/tag/weighted_tail_quantile.html b/doc/test/gold/boost/accumulators/tag/weighted_tail_quantile.html new file mode 100644 index 0000000000..687d062f42 --- /dev/null +++ b/doc/test/gold/boost/accumulators/tag/weighted_tail_quantile.html @@ -0,0 +1,52 @@ + + + +Struct template weighted_tail_quantile + + + + + + + + + + + + + + +
Boost C++ LibrariesHomeLibrariesPeopleFAQMore
+
+
+PrevUpHome +
+
+
+
+

Struct template weighted_tail_quantile

+

boost::accumulators::tag::weighted_tail_quantile

+
+

Synopsis

+
// In header: <boost/trunk/doc/test/weighted_tail_quantile.hpp>
+
+template<typename LeftRight> 
+struct weighted_tail_quantile : public boost::accumulators::depends_on< sum_of_weights, tail_weights< LeftRight > >
+{
+};
+
+ + + +
+
+
+PrevUpHome +
+ + diff --git a/doc/test/gold/boost/array.html b/doc/test/gold/boost/array.html new file mode 100644 index 0000000000..6ed4b9a389 --- /dev/null +++ b/doc/test/gold/boost/array.html @@ -0,0 +1,641 @@ + + + +Class template array + + + + + + + + + + + + + + + +
Boost C++ LibrariesHomeLibrariesPeopleFAQMore
+
+
+PrevUpHomeNext +
+
+
+
+

Class template array

+

boost::array — STL compliant container wrapper for arrays of constant size

+
+

Synopsis

+
// In header: <boost/array.hpp>
+
+template<typename T, std::size_t N> 
+class array {
+public:
+  // types
+  typedef T                                                                        value_type;            
+  typedef T*                                                                       iterator;              
+  typedef const T*                                                                 const_iterator;        
+  typedef 
+                  std::reverse_iterator<iterator>
+                      reverse_iterator;      
+  typedef 
+                  std::reverse_iterator<const_iterator>
+                const_reverse_iterator;
+  typedef T&                                                                       reference;             
+  typedef const T&                                                                 const_reference;       
+  typedef std::size_t                                                              size_type;             
+  typedef std::ptrdiff_t                                                           difference_type;       
+
+  // static constants
+  static const size_type static_size = N;
+
+  // construct/copy/destruct
+  template<typename U> 
+    array& operator=(
+                     const array<U, N>&
+                  );
+
+  // iterator support
+  iterator begin();
+  const_iterator begin() const;
+  iterator end();
+  const_iterator end() const;
+
+  // reverse iterator support
+  reverse_iterator rbegin();
+  const_reverse_iterator rbegin() const;
+  reverse_iterator rend();
+  const_reverse_iterator rend() const;
+
+  // capacity
+  size_type size();
+  bool empty();
+  size_type max_size();
+
+  // element access
+  reference operator[](size_type);
+  const_reference operator[](size_type) const;
+  reference at(size_type);
+  const_reference at(size_type) const;
+  reference front();
+  const_reference front() const;
+  reference back();
+  const_reference back() const;
+  const T* data() const;
+  T* c_array();
+
+  // modifiers
+  void swap(
+                        array<T, N>&
+                     );
+  void assign(const T&);
+  T elems[N];
+};
+
+// specialized algorithms
+template<typename T, std::size_t N> 
+  void swap(
+                        array<T, N>&
+                     , 
+            
+                        array<T, N>&
+                     );
+
+// comparisons
+template<typename T, std::size_t N> 
+  bool operator==(
+                        const array<T, N>&
+                     , 
+                  
+                        const array<T, N>&
+                     );
+template<typename T, std::size_t N> 
+  bool operator!=(
+                        const array<T, N>&
+                     , 
+                  
+                        const array<T, N>&
+                     );
+template<typename T, std::size_t N> 
+  bool operator<(
+                        const array<T, N>&
+                     , 
+                 
+                        const array<T, N>&
+                     );
+template<typename T, std::size_t N> 
+  bool operator>(
+                        const array<T, N>&
+                     , 
+                 
+                        const array<T, N>&
+                     );
+template<typename T, std::size_t N> 
+  bool operator<=(
+                        const array<T, N>&
+                     , 
+                  
+                        const array<T, N>&
+                     );
+template<typename T, std::size_t N> 
+  bool operator>=(
+                        const array<T, N>&
+                     , 
+                  
+                        const array<T, N>&
+                     );
+
+

Description

+
+

+array + public + construct/copy/destruct

+
  1. +
    template<typename U> 
    +  array& operator=(
    +                     const array<U, N>&
    +                   other);
    +
    ++ + + + +

    Effects:

    + + std::copy(rhs.begin(),rhs.end(), begin()) + +
    +
+
+
+

+array iterator support

+
    +
  1. +
    iterator begin();
    +const_iterator begin() const;
    +
    ++ + + + + + + + + + +

    Returns:

    iterator for the first element

    Throws:

    will not throw
    +
  2. +
  3. +
    iterator end();
    +const_iterator end() const;
    +
    ++ + + + + + + + + + +

    Returns:

    iterator for position after the last element

    Throws:

    will not throw
    +
  4. +
+
+
+

+array reverse iterator support

+
    +
  1. +
    reverse_iterator rbegin();
    +const_reverse_iterator rbegin() const;
    +
    ++ + + + +

    Returns:

    reverse iterator for the first element of reverse iteration
    +
  2. +
  3. +
    reverse_iterator rend();
    +const_reverse_iterator rend() const;
    +
    ++ + + + +

    Returns:

    reverse iterator for position after the last element in reverse iteration
    +
  4. +
+
+
+

+array capacity

+
    +
  1. +
    size_type size();
    +
    ++ + + + +

    Returns:

    + N +
    +
  2. +
  3. +
    bool empty();
    +
    ++ + + + + + + + + + +

    Returns:

    + N==0 +

    Throws:

    will not throw
    +
  4. +
  5. +
    size_type max_size();
    +
    ++ + + + + + + + + + +

    Returns:

    + N +

    Throws:

    will not throw
    +
  6. +
+
+
+

+array element access

+
    +
  1. +
    reference operator[](size_type i);
    +const_reference operator[](size_type i) const;
    +
    ++ + + + + + + + + + + + + + +

    Requires:

    + i < N +

    Returns:

    + element with index i +

    Throws:

    will not throw.
    +
  2. +
  3. +
    reference at(size_type i);
    +const_reference at(size_type i) const;
    +
    ++ + + + + + + + + + +

    Returns:

    + element with index i +

    Throws:

    + + std::range_error + if i >= N +
    +
  4. +
  5. +
    reference front();
    +const_reference front() const;
    +
    ++ + + + + + + + + + + + + + +

    Requires:

    + N > 0 +

    Returns:

    the first element

    Throws:

    will not throw
    +
  6. +
  7. +
    reference back();
    +const_reference back() const;
    +
    ++ + + + + + + + + + + + + + +

    Requires:

    + N > 0 +

    Returns:

    the last element

    Throws:

    will not throw
    +
  8. +
  9. +
    const T* data() const;
    +
    ++ + + + + + + + + + +

    Returns:

    + elems +

    Throws:

    will not throw
    +
  10. +
  11. +
    T* c_array();
    +
    ++ + + + + + + + + + +

    Returns:

    + elems +

    Throws:

    will not throw
    +
  12. +
+
+
+

+array modifiers

+
    +
  1. +
    void swap(
    +                        array<T, N>&
    +                      other);
    +
    ++ + + + + + + + + + +

    Effects:

    + + std::swap_ranges(begin(), end(), other.begin()) + +

    Complexity:

    + linear in N +
    +
  2. +
  3. +
    void assign(const T& value);
    +
    ++ + + + +

    Effects:

    + + std::fill_n(begin(), N, value) + +
    +
  4. +
+
+
+

+array specialized algorithms

+
  1. +
    template<typename T, std::size_t N> 
    +  void swap(
    +                        array<T, N>&
    +                      x, 
    +            
    +                        array<T, N>&
    +                      y);
    +
    ++ + + + + + + + + + +

    Effects:

    + + x.swap(y) + +

    Throws:

    will not throw.
    +
+
+
+

+array comparisons

+
    +
  1. +
    template<typename T, std::size_t N> 
    +  bool operator==(
    +                        const array<T, N>&
    +                      x, 
    +                  
    +                        const array<T, N>&
    +                      y);
    +
    ++ + + + +

    Returns:

    + + std::equal(x.begin(), x.end(), y.begin()) + +
    +
  2. +
  3. +
    template<typename T, std::size_t N> 
    +  bool operator!=(
    +                        const array<T, N>&
    +                      x, 
    +                  
    +                        const array<T, N>&
    +                      y);
    +
    ++ + + + +

    Returns:

    + !(x == y) +
    +
  4. +
  5. +
    template<typename T, std::size_t N> 
    +  bool operator<(
    +                        const array<T, N>&
    +                      x, 
    +                 
    +                        const array<T, N>&
    +                      y);
    +
    ++ + + + +

    Returns:

    + + std::lexicographical_compare(x.begin(), x.end(), y.begin(), y.end()) + +
    +
  6. +
  7. +
    template<typename T, std::size_t N> 
    +  bool operator>(
    +                        const array<T, N>&
    +                      x, 
    +                 
    +                        const array<T, N>&
    +                      y);
    +
    ++ + + + +

    Returns:

    + y < x +
    +
  8. +
  9. +
    template<typename T, std::size_t N> 
    +  bool operator<=(
    +                        const array<T, N>&
    +                      x, 
    +                  
    +                        const array<T, N>&
    +                      y);
    +
    ++ + + + +

    Returns:

    + !(y < x) +
    +
  10. +
  11. +
    template<typename T, std::size_t N> 
    +  bool operator>=(
    +                        const array<T, N>&
    +                      x, 
    +                  
    +                        const array<T, N>&
    +                      y);
    +
    ++ + + + +

    Returns:

    + !(x < y) +
    +
  12. +
+
+
+
+ + + +
+
+
+PrevUpHomeNext +
+ + diff --git a/doc/test/gold/document_to_test_formatting/accumulators.html b/doc/test/gold/document_to_test_formatting/accumulators.html new file mode 100644 index 0000000000..6febad2b78 --- /dev/null +++ b/doc/test/gold/document_to_test_formatting/accumulators.html @@ -0,0 +1,69 @@ + + + +Accumulators Example Doxygen Documentation + + + + + + + + + + + + + + + +
Boost C++ LibrariesHomeLibrariesPeopleFAQMore
+
+
+PrevUpHomeNext +
+
+ + +
+

+Statistics Library Reference

+ +
+ +
namespace boost {
+  namespace accumulators {
+    namespace extract {
+      extractor< tag::quantile > const weighted_tail_quantile;
+    }
+    namespace impl {
+      template<typename Sample, typename Weight, typename LeftRight> 
+        struct weighted_tail_quantile_impl;
+    }
+    namespace tag {
+      template<typename LeftRight> struct weighted_tail_quantile;
+    }
+  }
+}
+
+
+
+ + + +
+
+
+PrevUpHomeNext +
+ + diff --git a/doc/test/gold/document_to_test_formatting/array.html b/doc/test/gold/document_to_test_formatting/array.html new file mode 100644 index 0000000000..176f09cd8e --- /dev/null +++ b/doc/test/gold/document_to_test_formatting/array.html @@ -0,0 +1,262 @@ + + + +Array Example Boostbook XML Documentation + + + + + + + + + + + + + + + +
Boost C++ LibrariesHomeLibrariesPeopleFAQMore
+
+
+PrevUpHomeNext +
+
+ + +
+

+Introduction

+

The C++ Standard Template Library STL as part of the C++ + Standard Library provides a framework for processing algorithms on + different kind of containers. However, ordinary arrays don't + provide the interface of STL containers (although, they provide + the iterator interface of STL containers).

+

As replacement for ordinary arrays, the STL provides class + std::vector. However, + std::vector<> provides + the semantics of dynamic arrays. Thus, it manages data to be able + to change the number of elements. This results in some overhead in + case only arrays with static size are needed.

+

In his book, Generic Programming and the + STL, Matthew H. Austern introduces a useful wrapper + class for ordinary arrays with static size, called + block. It is safer and has no worse performance than + ordinary arrays. In The C++ Programming + Language, 3rd edition, Bjarne Stroustrup introduces a + similar class, called c_array, which I (Nicolai Josuttis) present + slightly modified in my book The C++ Standard Library - + A Tutorial and Reference, called + carray. This is the essence of these approaches + spiced with many feedback from boost.

+

After considering different names, we decided to name this + class simply array.

+

Note that this class is suggested to be part of the next + Technical Report, which will extend the C++ Standard (see + http://std.dkuug.dk/jtc1/sc22/wg21/docs/papers/2003/n1548.htm).

+

Class array fulfills most + but not all of the requirements of "reversible containers" (see + Section 23.1, [lib.container.requirements] of the C++ + Standard). The reasons array is not an reversible STL container is + because: +

+
    +
  • No constructors are provided.
  • +
  • Elements may have an undetermined initial value (see the section called “Design Rationale”).
  • +
  • +swap() has no constant complexity.
  • +
  • +size() is always constant, based on the second template argument of the type.
  • +
  • The container provides no allocator support.
  • +
+

+

+

It doesn't fulfill the requirements of a "sequence" (see Section 23.1.1, [lib.sequence.reqmts] of the C++ Standard), except that: +

+
+

+

+
+
+

+Reference

+ +
+

+Header <boost/array.hpp>

+
namespace boost {
+  template<typename T, std::size_t N> class array;
+  template<typename T, std::size_t N> 
+    void swap(
+                        array<T, N>&
+                     , 
+              
+                        array<T, N>&
+                     );
+  template<typename T, std::size_t N> 
+    bool operator==(
+                        const array<T, N>&
+                     , 
+                    
+                        const array<T, N>&
+                     );
+  template<typename T, std::size_t N> 
+    bool operator!=(
+                        const array<T, N>&
+                     , 
+                    
+                        const array<T, N>&
+                     );
+  template<typename T, std::size_t N> 
+    bool operator<(
+                        const array<T, N>&
+                     , 
+                   
+                        const array<T, N>&
+                     );
+  template<typename T, std::size_t N> 
+    bool operator>(
+                        const array<T, N>&
+                     , 
+                   
+                        const array<T, N>&
+                     );
+  template<typename T, std::size_t N> 
+    bool operator<=(
+                        const array<T, N>&
+                     , 
+                    
+                        const array<T, N>&
+                     );
+  template<typename T, std::size_t N> 
+    bool operator>=(
+                        const array<T, N>&
+                     , 
+                    
+                        const array<T, N>&
+                     );
+}
+
+
+
+

+Design Rationale

+

+ There was an important design tradeoff regarding the + constructors: We could implement array as an "aggregate" (see + Section 8.5.1, [dcl.init.aggr], of the C++ Standard). This would + mean: +

+
  • +

    + An array can be initialized with a + brace-enclosing, comma-separated list of initializers for the + elements of the container, written in increasing subscript + order: +

    +
    +               boost::array<int,4> a = { { 1, 2, 3 } };
    +            
    +

    + Note that if there are fewer elements in the + initializer list, then each remaining element gets + default-initialized (thus, it has a defined value). +

    +
+

+

+

+ However, this approach has its drawbacks: + passing no initializer list means that the elements + have an indetermined initial value + , because the rule says + that aggregates may have: +

+
    +
  • No user-declared constructors.
  • +
  • No private or protected non-static data members.
  • +
  • No base classes.
  • +
  • No virtual functions.
  • +
+

+

+

Nevertheless, The current implementation uses this approach.

+

+ Note that for standard conforming compilers it is possible to + use fewer braces (according to 8.5.1 (11) of the Standard). That is, + you can initialize an array as follows: +

+
+      boost::array<int,4> a = { 1, 2, 3 };
+   
+

+ I'd appreciate any constructive feedback. + Please note: I don't have time to read all boost + mails. Thus, to make sure that feedback arrives to me, please send + me a copy of each mail regarding this class. + +

+

+ The code is provided "as is" without expressed or implied + warranty. +

+
+
+

+For more information...

+

+ To find more details about using ordinary arrays in C++ and + the framework of the STL, see e.g. + +

+


+         The C++ Standard Library - A Tutorial and Reference
+         by Nicolai M. Josuttis
+         Addison Wesley Longman, 1999
+         ISBN 0-201-37926-0
+      

+

+

+

+ + Home Page of Nicolai + Josuttis + +

+
+
+

+Acknowledgements

+

Doug Gregor ported the documentation to the BoostBook format.

+
+
+ + + +
+
+
+PrevUpHomeNext +
+ + diff --git a/doc/test/gold/document_to_test_formatting/basic_formatting.html b/doc/test/gold/document_to_test_formatting/basic_formatting.html new file mode 100644 index 0000000000..396546acdd --- /dev/null +++ b/doc/test/gold/document_to_test_formatting/basic_formatting.html @@ -0,0 +1,201 @@ + + + +Basic Formatting + + + + + + + + + + + + + + + +
Boost C++ LibrariesHomeLibrariesPeopleFAQMore
+
+
+PrevUpHomeNext +
+
+ + +
+ +

+ Here we go with some inline formatting: italic, bold, underline, + teletype, strikethrough, + we can combine styles as well: bold italic, + teletype with underline. +

+
+
+ +

+ Text that is intended to be user-replaceable is + + rendered like this + + . +

+
+
+ +

+ Here we go: “A question that sometimes drives me hazy: am I or are + the others crazy?”--Einstein +

+

+ Note the proper left and right quote marks. Also, while you can simply use + ordinary quote marks like "quoted", our quotation, above, will + generate correct DocBook quotations (e.g. <quote>quoted</quote>). +

+

+ Like all phrase elements, quotations may be nested. Example: +

+

+ “Here's the rule for bargains: ‘Do other men, for they would + do you.’ That's the true business precept.” +

+
+
+ +

+ This text has inlined code int main() { return 0; } + in it. The code should be syntax highlighted. +

+
+
+

+Links +

+

+ Try this: this is boost's + website.... it should be visible as a link. +

+
+
+ +

+ Here's one + [1] + . +

+

+ And here's another + [2] + . +

+
+
+ +

+ Lets indent the next paragraph: +

+
+

+

+

+ Here we go!!! +

+

+

+
+
+
+ +

+ Now try rendering some heading styles: +

+

+ + Heading + 1 +

+

+ + Heading + 2 +

+

+ + Heading + 3 +

+
+ + Heading + 4 +
+
+ + Heading + 5 +
+

+ + Heading + 6 +

+
+
+

+

[1] + A sample footnote +

+

[2] + Another sample footnote +

+
+
+ + + +
+
+
+PrevUpHomeNext +
+ + diff --git a/doc/test/gold/document_to_test_formatting/blurbs.html b/doc/test/gold/document_to_test_formatting/blurbs.html new file mode 100644 index 0000000000..ec8ee51a62 --- /dev/null +++ b/doc/test/gold/document_to_test_formatting/blurbs.html @@ -0,0 +1,160 @@ + + + +Blurbs + + + + + + + + + + + + + + + +
Boost C++ LibrariesHomeLibrariesPeopleFAQMore
+
+
+PrevUpHomeNext +
+
+

+Blurbs +

+ +
+ +

+ Here's some sample program output: +

+
F test for equal standard deviations
+____________________________________
+
+Sample 1:
+Number of Observations                                 =  240
+Sample Standard Deviation                              =  65.549
+
+Sample 2:
+Number of Observations                                 =  240
+Sample Standard Deviation                              =  61.854
+
+Test Statistic                                         =  1.123
+
+CDF of test statistic:                                 =  8.148e-001
+Upper Critical Value at alpha:                         =  1.238e+000
+Upper Critical Value at alpha/2:                       =  1.289e+000
+Lower Critical Value at alpha:                         =  8.080e-001
+Lower Critical Value at alpha/2:                       =  7.756e-001
+
+Results for Alternative Hypothesis and alpha           =  0.0500
+
+Alternative Hypothesis                                    Conclusion
+Standard deviations are unequal (two sided test)          REJECTED
+Standard deviation 1 is less than standard deviation 2    REJECTED
+Standard deviation 1 is greater than standard deviation 2 REJECTED
+
+
+
+ +

+ There are four admonishments supported by Docbook XML: +

+
+ + + + + +
[Note]Note

+ This is a note +

+
+ + + + + +
[Tip]Tip

+ This is a tip +

+
+ + + + + +
[Important]Important

+ This is important +

+
+ + + + + +
[Caution]Caution

+ This is a caution +

+
+ + + + + +
[Warning]Warning
+

+ This is a warning +

+

+ They can contain more than one paragraph. +

+
+
+
+

+Blurbs +

+ +
+
+ + + +
+
+
+PrevUpHomeNext +
+ + diff --git a/doc/test/gold/document_to_test_formatting/code_blocks.html b/doc/test/gold/document_to_test_formatting/code_blocks.html new file mode 100644 index 0000000000..2f22e82330 --- /dev/null +++ b/doc/test/gold/document_to_test_formatting/code_blocks.html @@ -0,0 +1,428 @@ + + + +Code Blocks + + + + + + + + + + + + + + + +
Boost C++ LibrariesHomeLibrariesPeopleFAQMore
+
+
+PrevUpHomeNext +
+
+ + +
+ +

+ These should be syntax highlighted: +

+
#include <iostream>
+
+int main()
+{
+    // Sample code
+    std::cout << "Hello, World\n";
+    return 0;
+}
+
+
+
+ +

+ Here's some code with left-placed callouts: +

+

+

+

+ +

+
class x
+{
+public:
+
+    1x() : n(0)
+    {
+    }
+
+    2~x()
+    {
+    }
+
+    3int get() const
+    {
+        return n; 
+    }
+
+    4void set(int n_)
+    {
+        n = n_;
+    }
+};
+
+

+

+

+

+

+

+
+ + + + + + + + + + + + + + + + +

1

Constructor

2

Destructor

3

Get the n + member variable

4

Set the n + member variable

+

+

+

+

+

+ And again with callouts placed exactly where we put them: +

+

+

+

+ +

+
std::string foo_bar() 1
+{
+    return "foo-bar"; 2
+}
+
+

+

+

+

+

+

+
+ + + + + + + + +

1

The Mythical FooBar. See Foobar + for details

2

return 'em, foo-bar man!

+

+

+

+

+
+
+ +

+ Now let's include a larger example, this may span several pages and should + not be chopped off half way through... some FO processors get this wrong! +

+
namespace boost{
+
+template <class BidirectionalIterator>
+class sub_match;
+
+typedef sub_match<const char*>                    csub_match;
+typedef sub_match<const wchar_t*>                 wcsub_match;
+typedef sub_match<std::string::const_iterator>    ssub_match;
+typedef sub_match<std::wstring::const_iterator>   wssub_match;
+
+template <class BidirectionalIterator>
+class sub_match : public std::pair<BidirectionalIterator, BidirectionalIterator>
+{
+public:
+   typedef typename iterator_traits<BidirectionalIterator>::value_type value_type;
+   typedef typename iterator_traits<BidirectionalIterator>::difference_type   difference_type;
+   typedef          BidirectionalIterator                                    iterator;
+
+   bool  matched;
+
+   difference_type length()const;
+   operator basic_string<value_type>()const;
+   basic_string<value_type> str()const;
+
+   int compare(const sub_match& s)const;
+   int compare(const basic_string<value_type>& s)const;
+   int compare(const value_type* s)const;
+#ifdef BOOST_REGEX_MATCH_EXTRA
+   typedef implementation-private capture_sequence_type;
+   const capture_sequence_type& captures()const;
+#endif
+};
+//
+// comparisons to another sub_match:
+//
+template <class BidirectionalIterator>
+bool operator == (const sub_match<BidirectionalIterator>& lhs,
+                  const sub_match<BidirectionalIterator>& rhs);
+template <class BidirectionalIterator>
+bool operator != (const sub_match<BidirectionalIterator>& lhs,
+                  const sub_match<BidirectionalIterator>& rhs);
+template <class BidirectionalIterator>
+bool operator < (const sub_match<BidirectionalIterator>& lhs,
+               const sub_match<BidirectionalIterator>& rhs);
+template <class BidirectionalIterator>
+bool operator <= (const sub_match<BidirectionalIterator>& lhs,
+                  const sub_match<BidirectionalIterator>& rhs);
+template <class BidirectionalIterator>
+bool operator >= (const sub_match<BidirectionalIterator>& lhs,
+                  const sub_match<BidirectionalIterator>& rhs);
+template <class BidirectionalIterator>
+bool operator > (const sub_match<BidirectionalIterator>& lhs,
+               const sub_match<BidirectionalIterator>& rhs);
+
+
+//
+// comparisons to a basic_string:
+//
+template <class BidirectionalIterator, class traits, class Allocator> 
+bool operator == (const std::basic_string<iterator_traits<BidirectionalIterator>::value_type,
+                                          traits, 
+                                          Allocator>& lhs,
+                  const sub_match<BidirectionalIterator>& rhs);
+template <class BidirectionalIterator, class traits, class Allocator> 
+bool operator != (const std::basic_string<iterator_traits<BidirectionalIterator>::value_type,
+                                          traits, 
+                                          Allocator>& lhs,
+                  const sub_match<BidirectionalIterator>& rhs);
+template <class BidirectionalIterator, class traits, class Allocator> 
+bool operator < (const std::basic_string<iterator_traits<BidirectionalIterator>::value_type,
+                                          traits, 
+                                          Allocator>& lhs,
+                  const sub_match<BidirectionalIterator>& rhs);
+template <class BidirectionalIterator, class traits, class Allocator> 
+bool operator > (const std::basic_string<iterator_traits<BidirectionalIterator>::value_type,
+                                          traits, 
+                                          Allocator>& lhs,
+                  const sub_match<BidirectionalIterator>& rhs);
+template <class BidirectionalIterator, class traits, class Allocator> 
+bool operator >= (const std::basic_string<iterator_traits<BidirectionalIterator>::value_type,
+                                          traits, 
+                                          Allocator>& lhs,
+                  const sub_match<BidirectionalIterator>& rhs);
+template <class BidirectionalIterator, class traits, class Allocator> 
+bool operator <= (const std::basic_string<iterator_traits<BidirectionalIterator>::value_type,
+                                          traits, 
+                                          Allocator>& lhs,
+                  const sub_match<BidirectionalIterator>& rhs);
+
+template <class BidirectionalIterator, class traits, class Allocator> 
+bool operator == (const sub_match<BidirectionalIterator>& lhs,
+                  const std::basic_string<iterator_traits<BidirectionalIterator>::value_type, 
+                                          traits, 
+                                          Allocator>& rhs);
+template <class BidirectionalIterator, class traits, class Allocator> 
+bool operator != (const sub_match<BidirectionalIterator>& lhs,
+                  const std::basic_string<iterator_traits<BidirectionalIterator>::value_type, 
+                                          traits, 
+                                          Allocator>& rhs);
+template <class BidirectionalIterator, class traits, class Allocator> 
+bool operator < (const sub_match<BidirectionalIterator>& lhs,
+               const std::basic_string<iterator_traits<BidirectionalIterator>::value_type, 
+                                       traits, 
+                                       Allocator>& rhs);
+template <class BidirectionalIterator, class traits, class Allocator> 
+bool operator > (const sub_match<BidirectionalIterator>& lhs,
+               const std::basic_string<iterator_traits<BidirectionalIterator>::value_type, 
+                                       traits, 
+                                       Allocator>& rhs);
+template <class BidirectionalIterator, class traits, class Allocator> 
+bool operator >= (const sub_match<BidirectionalIterator>& lhs,
+                  const std::basic_string<iterator_traits<BidirectionalIterator>::value_type, 
+                                       traits, 
+                                       Allocator>& rhs);
+template <class BidirectionalIterator, class traits, class Allocator> 
+bool operator <= (const sub_match<BidirectionalIterator>& lhs,
+                  const std::basic_string<iterator_traits<BidirectionalIterator>::value_type, 
+                                          traits, 
+                                          Allocator>& rhs);
+
+//
+// comparisons to a pointer to a character array:
+//
+template <class BidirectionalIterator> 
+bool operator == (typename iterator_traits<BidirectionalIterator>::value_type const* lhs,
+                  const sub_match<BidirectionalIterator>& rhs); 
+template <class BidirectionalIterator> 
+bool operator != (typename iterator_traits<BidirectionalIterator>::value_type const* lhs,
+                  const sub_match<BidirectionalIterator>& rhs); 
+template <class BidirectionalIterator> 
+bool operator < (typename iterator_traits<BidirectionalIterator>::value_type const* lhs,
+               const sub_match<BidirectionalIterator>& rhs); 
+template <class BidirectionalIterator> 
+bool operator > (typename iterator_traits<BidirectionalIterator>::value_type const* lhs,
+               const sub_match<BidirectionalIterator>& rhs); 
+template <class BidirectionalIterator> 
+bool operator >= (typename iterator_traits<BidirectionalIterator>::value_type const* lhs,
+                  const sub_match<BidirectionalIterator>& rhs); 
+template <class BidirectionalIterator> 
+bool operator <= (typename iterator_traits<BidirectionalIterator>::value_type const* lhs,
+                  const sub_match<BidirectionalIterator>& rhs); 
+
+template <class BidirectionalIterator> 
+bool operator == (const sub_match<BidirectionalIterator>& lhs,
+                  typename iterator_traits<BidirectionalIterator>::value_type const* rhs); 
+template <class BidirectionalIterator> 
+bool operator != (const sub_match<BidirectionalIterator>& lhs,
+                  typename iterator_traits<BidirectionalIterator>::value_type const* rhs); 
+template <class BidirectionalIterator> 
+bool operator < (const sub_match<BidirectionalIterator>& lhs,
+               typename iterator_traits<BidirectionalIterator>::value_type const* rhs); 
+template <class BidirectionalIterator> 
+bool operator > (const sub_match<BidirectionalIterator>& lhs,
+               typename iterator_traits<BidirectionalIterator>::value_type const* rhs); 
+template <class BidirectionalIterator> 
+bool operator >= (const sub_match<BidirectionalIterator>& lhs,
+                  typename iterator_traits<BidirectionalIterator>::value_type const* rhs); 
+template <class BidirectionalIterator> 
+bool operator <= (const sub_match<BidirectionalIterator>& lhs,
+                  typename iterator_traits<BidirectionalIterator>::value_type const* rhs); 
+
+//
+// comparisons to a single character:
+//
+template <class BidirectionalIterator> 
+bool operator == (typename iterator_traits<BidirectionalIterator>::value_type const& lhs,
+                  const sub_match<BidirectionalIterator>& rhs); 
+template <class BidirectionalIterator> 
+bool operator != (typename iterator_traits<BidirectionalIterator>::value_type const& lhs,
+                  const sub_match<BidirectionalIterator>& rhs); 
+template <class BidirectionalIterator> 
+bool operator < (typename iterator_traits<BidirectionalIterator>::value_type const& lhs,
+               const sub_match<BidirectionalIterator>& rhs); 
+template <class BidirectionalIterator> 
+bool operator > (typename iterator_traits<BidirectionalIterator>::value_type const& lhs,
+               const sub_match<BidirectionalIterator>& rhs); 
+template <class BidirectionalIterator> 
+bool operator >= (typename iterator_traits<BidirectionalIterator>::value_type const& lhs,
+                  const sub_match<BidirectionalIterator>& rhs); 
+template <class BidirectionalIterator> 
+bool operator <= (typename iterator_traits<BidirectionalIterator>::value_type const& lhs,
+                  const sub_match<BidirectionalIterator>& rhs); 
+
+template <class BidirectionalIterator> 
+bool operator == (const sub_match<BidirectionalIterator>& lhs,
+                  typename iterator_traits<BidirectionalIterator>::value_type const& rhs); 
+template <class BidirectionalIterator> 
+bool operator != (const sub_match<BidirectionalIterator>& lhs,
+                  typename iterator_traits<BidirectionalIterator>::value_type const& rhs); 
+template <class BidirectionalIterator> 
+bool operator < (const sub_match<BidirectionalIterator>& lhs,
+               typename iterator_traits<BidirectionalIterator>::value_type const& rhs); 
+template <class BidirectionalIterator> 
+bool operator > (const sub_match<BidirectionalIterator>& lhs,
+               typename iterator_traits<BidirectionalIterator>::value_type const& rhs); 
+template <class BidirectionalIterator> 
+bool operator >= (const sub_match<BidirectionalIterator>& lhs,
+                  typename iterator_traits<BidirectionalIterator>::value_type const& rhs); 
+template <class BidirectionalIterator> 
+bool operator <= (const sub_match<BidirectionalIterator>& lhs,
+                  typename iterator_traits<BidirectionalIterator>::value_type const& rhs); 
+// 
+// addition operators: 
+//
+template <class BidirectionalIterator, class traits, class Allocator> 
+std::basic_string<typename iterator_traits<BidirectionalIterator>::value_type, traits, Allocator> 
+   operator + (const std::basic_string<typename iterator_traits<BidirectionalIterator>::value_type,
+                                       traits, 
+                                       Allocator>& s, 
+               const sub_match<BidirectionalIterator>& m); 
+template <class BidirectionalIterator, class traits, class Allocator> 
+std::basic_string<typename iterator_traits<BidirectionalIterator>::value_type, traits, Allocator>
+   operator + (const sub_match<BidirectionalIterator>& m,
+               const std::basic_string<typename iterator_traits<BidirectionalIterator>::value_type, 
+                                       traits, 
+                                       Allocator>& s); 
+template <class BidirectionalIterator> 
+std::basic_string<typename iterator_traits<BidirectionalIterator>::value_type> 
+   operator + (typename iterator_traits<BidirectionalIterator>::value_type const* s,
+               const sub_match<BidirectionalIterator>& m); 
+template <class BidirectionalIterator> 
+std::basic_string<typename iterator_traits<BidirectionalIterator>::value_type> 
+   operator + (const sub_match<BidirectionalIterator>& m,
+               typename iterator_traits<BidirectionalIterator>::value_type const * s);
+template <class BidirectionalIterator> 
+std::basic_string<typename iterator_traits<BidirectionalIterator>::value_type> 
+   operator + (typename iterator_traits<BidirectionalIterator>::value_type const& s,
+               const sub_match<BidirectionalIterator>& m); 
+template <class BidirectionalIterator> 
+std::basic_string<typename iterator_traits<BidirectionalIterator>::value_type> 
+   operator + (const sub_match<BidirectionalIterator>& m,
+               typename iterator_traits<BidirectionalIterator>::value_type const& s); 
+template <class BidirectionalIterator> 
+std::basic_string<typename iterator_traits<BidirectionalIterator>::value_type> 
+   operator + (const sub_match<BidirectionalIterator>& m1,
+               const sub_match<BidirectionalIterator>& m2);
+
+//
+// stream inserter:
+//
+template <class charT, class traits, class BidirectionalIterator>
+basic_ostream<charT, traits>&
+   operator << (basic_ostream<charT, traits>& os,
+               const sub_match<BidirectionalIterator>& m);
+
+} // namespace boost
+
+
+
+ + + +
+
+
+PrevUpHomeNext +
+ + diff --git a/doc/test/gold/document_to_test_formatting/images.html b/doc/test/gold/document_to_test_formatting/images.html new file mode 100644 index 0000000000..a5e4fc625a --- /dev/null +++ b/doc/test/gold/document_to_test_formatting/images.html @@ -0,0 +1,60 @@ + + + +Images + + + + + + + + + + + + + + + +
Boost C++ LibrariesHomeLibrariesPeopleFAQMore
+
+
+PrevUpHomeNext +
+
+

+Images +

+

+ These are tricky enough that they warrent their own section. +

+

+ Let's start with a PNG file that's set to 120dpi, it should render at a sensible + size in both html and PDF forms. It should print OK too! +

+

+ digamma3 +

+

+ Now try again with a sample SVG image: +

+

+ +

+
+ + + +
+
+
+PrevUpHomeNext +
+ + diff --git a/doc/test/gold/document_to_test_formatting/lists_and_tables.html b/doc/test/gold/document_to_test_formatting/lists_and_tables.html new file mode 100644 index 0000000000..ee2dee5f22 --- /dev/null +++ b/doc/test/gold/document_to_test_formatting/lists_and_tables.html @@ -0,0 +1,455 @@ + + + +Lists and Tables + + + + + + + + + + + + + + + +
Boost C++ LibrariesHomeLibrariesPeopleFAQMore
+
+
+PrevUpHomeNext +
+
+ + +
+

+Lists +

+

+ A numbered list: +

+
    +
  1. + One +
  2. +
  3. + Two +
  4. +
  5. + Three +
      +
    1. + Three.a +
    2. +
    3. + Three.b +
    4. +
    5. + Three.c +
    6. +
    +
  6. +
  7. + Four +
    1. + Four.a +
        +
      1. + Four.a.i +
      2. +
      3. + Four.a.ii +
      4. +
      +
    +
  8. +
  9. + Five +
  10. +
+

+ An unordered list: +

+
    +
  • + First +
  • +
  • + Second +
  • +
  • + Third +
  • +
+

+ A mixture of the two: +

+
    +
  1. + 1 +
      +
    • + 1.a +
        +
      1. + 1.a.1 +
      2. +
      3. + 1.a.2 +
      4. +
      +
    • +
    • + 1.b +
    • +
    +
  2. +
  3. + 2 +
      +
    • + 2.a +
    • +
    • + 2.b +
        +
      1. + 2.b.1 +
      2. +
      3. + 2.b.2 +
          +
        • + 2.b.2.a +
        • +
        • + 2.b.2.b +
        • +
        +
      4. +
      +
    • +
    +
  4. +
+
+
+ +
+

A Variable List

+
+
term 1
+

+ The definition of term 1 +

+
term 2
+

+ The definition of term 2 +

+
term 3
+

+ The definition of term 3 +

+
+
+
+
+

+Tables +

+

+ Here's a big table with code and other tricky things: +

+
+

Table 1. Notes on the Implementation of the Beta Distribution

+
++++ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+

+ Function +

+
+

+ Implementation Notes +

+
+

+ pdf +

+
+

+ f(x;α,β) = xα - 1 (1 - x)β -1 / B(α, β) +

+

+ Implemented using ibeta_derivative(a, b, x). +

+
+

+ cdf +

+
+

+ Using the incomplete beta function ibeta(a, b, x) +

+
+

+ cdf complement +

+
+

+ ibetac(a, b, x) +

+
+

+ quantile +

+
+

+ Using the inverse incomplete beta function ibeta_inv(a, b, p) +

+
+

+ quantile from the complement +

+
+

+ ibetac_inv(a, b, q) +

+
+

+ mean +

+
+

+ a/(a+b) +

+
+

+ variance +

+
+

+ a * + b / + (a+b)^2 * (a + b + 1) +

+
+

+ mode +

+
+

+ (a-1) + / (a + b + 2) +

+
+

+ skewness +

+
+

+ 2 (b-a) sqrt(a+b+1)/(a+b+2) * + sqrt(a * b) +

+
+

+ kurtosis excess +

+
+

+ beta_dist_kurtosis +

+
+

+ kurtosis +

+
+

+ kurtosis + + 3 +

+
+

+ parameter estimation +

+
+

+

+
+

+ alpha +

+

+ from mean and variance +

+
+

+ mean * + (( (mean * + (1 + - mean)) / variance)- + 1) +

+
+

+ beta +

+

+ from mean and variance +

+
+

+ (1 + - mean) * (((mean + * (1 - mean)) + /variance)-1) +

+
+

+ The member functions estimate_alpha + and estimate_beta +

+

+ from cdf and probability x +

+

+ and either alpha + or beta +

+
+

+ Implemented in terms of the inverse incomplete beta functions +

+

+ ibeta_inva, and ibeta_invb respectively. +

+
+

+ estimate_alpha +

+
+

+ ibeta_inva(beta, x, probability) +

+
+

+ estimate_beta +

+
+

+ ibeta_invb(alpha, + x, + probability) +

+
+
+
+
+
+ + + +
+
+
+PrevUpHomeNext +
+ + diff --git a/doc/test/gold/document_to_test_formatting/remez.html b/doc/test/gold/document_to_test_formatting/remez.html new file mode 100644 index 0000000000..4752abc202 --- /dev/null +++ b/doc/test/gold/document_to_test_formatting/remez.html @@ -0,0 +1,535 @@ + + + +Sample Article (The Remez Method) + + + + + + + + + + + + + + + +
Boost C++ LibrariesHomeLibrariesPeopleFAQMore
+
+
+PrevUpHomeNext +
+
+ +

+ The Remez algorithm + is a methodology for locating the minimax rational approximation to a function. + This short article gives a brief overview of the method, but it should not + be regarded as a thorough theoretical treatment, for that you should consult + your favorite textbook. +

+

+ Imagine that you want to approximate some function f(x) by way of a rational + function R(x), where R(x) may be either a polynomial P(x) or a ratio of two + polynomials P(x)/Q(x) (a rational function). Initially we'll concentrate on + the polynomial case, as it's by far the easier to deal with, later we'll extend + to the full rational function case. +

+

+ We want to find the "best" rational approximation, where "best" + is defined to be the approximation that has the least deviation from f(x). + We can measure the deviation by way of an error function: +

+

+ Eabs(x) = f(x) - R(x) +

+

+ which is expressed in terms of absolute error, but we can equally use relative + error: +

+

+ Erel(x) = (f(x) - R(x)) / |f(x)| +

+

+ And indeed in general we can scale the error function in any way we want, it + makes no difference to the maths, although the two forms above cover almost + every practical case that you're likely to encounter. +

+

+ The minimax rational function R(x) is then defined to be the function that + yields the smallest maximal value of the error function. Chebyshev showed that + there is a unique minimax solution for R(x) that has the following properties: +

+
    +
  • + If R(x) is a polynomial of degree N, then there are N+2 unknowns: the N+1 + coefficients of the polynomial, and maximal value of the error function. +
  • +
  • + The error function has N+1 roots, and N+2 extrema (minima and maxima). +
  • +
  • + The extrema alternate in sign, and all have the same magnitude. +
  • +
+

+ That means that if we know the location of the extrema of the error function + then we can write N+2 simultaneous equations: +

+

+ R(xi) + (-1)iE = f(xi) +

+

+ where E is the maximal error term, and xi are the abscissa values of the N+2 + extrema of the error function. It is then trivial to solve the simultaneous + equations to obtain the polynomial coefficients and the error term. +

+

+ Unfortunately we don't know where the extrema of the error function + are located! +

+
+ + The Remez + Method +
+

+ The Remez method is an iterative technique which, given a broad range of assumptions, + will converge on the extrema of the error function, and therefore the minimax + solution. +

+

+ In the following discussion we'll use a concrete example to illustrate the + Remez method: an approximation to the function ex over the range [-1, 1]. +

+

+ Before we can begin the Remez method, we must obtain an initial value for the + location of the extrema of the error function. We could "guess" these, + but a much closer first approximation can be obtained by first constructing + an interpolated polynomial approximation to f(x). +

+

+ In order to obtain the N+1 coefficients of the interpolated polynomial we need + N+1 points (x0...xN): with our interpolated form passing through each of those + points that yields N+1 simultaneous equations: +

+

+ f(xi) = P(xi) = c0 + c1xi ... + cNxiN +

+

+ Which can be solved for the coefficients c0...cN in P(x). +

+

+ Obviously this is not a minimax solution, indeed our only guarantee is that + f(x) and P(x) touch at N+1 locations, away from those points the error may + be arbitrarily large. However, we would clearly like this initial approximation + to be as close to f(x) as possible, and it turns out that using the zeros of + an orthogonal polynomial as the initial interpolation points is a good choice. + In our example we'll use the zeros of a Chebyshev polynomial as these are particularly + easy to calculate, interpolating for a polynomial of degree 4, and measuring + relative error we get the following error function: +

+

+ remez-2 +

+

+ Which has a peak relative error of 1.2x10-3. +

+

+ While this is a pretty good approximation already, judging by the shape of + the error function we can clearly do better. Before starting on the Remez method + propper, we have one more step to perform: locate all the extrema of the error + function, and store these locations as our initial Chebyshev control + points. +

+
+ + + + + +
[Note]Note
+

+ In the simple case of a polynomial approximation, by interpolating through + the roots of a Chebyshev polynomial we have in fact created a Chebyshev + approximation to the function: in terms of absolute + error this is the best a priori choice for the interpolated form + we can achieve, and typically is very close to the minimax solution. +

+

+ However, if we want to optimise for relative error, + or if the approximation is a rational function, then the initial Chebyshev + solution can be quite far from the ideal minimax solution. +

+

+ A more technical discussion of the theory involved can be found in this + online + course. +

+
+
+ + Remez Step 1 +
+

+ The first step in the Remez method, given our current set of N+2 Chebyshev + control points xi, is to solve the N+2 simultaneous equations: +

+

+ P(xi) + (-1)iE = f(xi) +

+

+ To obtain the error term E, and the coefficients of the polynomial P(x). +

+

+ This gives us a new approximation to f(x) that has the same error E + at each of the control points, and whose error function alternates + in sign at the control points. This is still not necessarily the + minimax solution though: since the control points may not be at the extrema + of the error function. After this first step here's what our approximation's + error function looks like: +

+

+ remez-3 +

+

+ Clearly this is still not the minimax solution since the control points are + not located at the extrema, but the maximum relative error has now dropped + to 5.6x10-4. +

+
+ + Remez Step 2 +
+

+ The second step is to locate the extrema of the new approximation, which we + do in two stages: first, since the error function changes sign at each control + point, we must have N+1 roots of the error function located between each pair + of N+2 control points. Once these roots are found by standard root finding + techniques, we know that N extrema are bracketed between each pair of roots, + plus two more between the endpoints of the range and the first and last roots. + The N+2 extrema can then be found using standard function minimisation techniques. +

+

+ We now have a choice: multi-point exchange, or single point exchange. +

+

+ In single point exchange, we move the control point nearest to the largest + extrema to the absissa value of the extrema. +

+

+ In multi-point exchange we swap all the current control points, for the locations + of the extrema. +

+

+ In our example we perform multi-point exchange. +

+
+ + Iteration +
+

+ The Remez method then performs steps 1 and 2 above iteratively until the control + points are located at the extrema of the error function: this is then the minimax + solution. +

+

+ For our current example, two more iterations converges on a minimax solution + with a peak relative error of 5x10-4 and an error function that looks like: +

+

+ remez-4 +

+
+ + Rational + Approximations +
+

+ If we wish to extend the Remez method to a rational approximation of the form +

+

+ f(x) = R(x) = P(x) / Q(x) +

+

+ where P(x) and Q(x) are polynomials, then we proceed as before, except that + now we have N+M+2 unknowns if P(x) is of order N and Q(x) is of order M. This + assumes that Q(x) is normalised so that it's leading coefficient is 1, giving + N+M+1 polynomial coefficients in total, plus the error term E. +

+

+ The simultaneous equations to be solved are now: +

+

+ P(xi) / Q(xi) + (-1)iE = f(xi) +

+

+ Evaluated at the N+M+2 control points xi. +

+

+ Unfortunately these equations are non-linear in the error term E: we can only + solve them if we know E, and yet E is one of the unknowns! +

+

+ The method usually adopted to solve these equations is an iterative one: we + guess the value of E, solve the equations to obtain a new value for E (as well + as the polynomial coefficients), then use the new value of E as the next guess. + The method is repeated until E converges on a stable value. +

+

+ These complications extend the running time required for the development of + rational approximations quite considerably. It is often desirable to obtain + a rational rather than polynomial approximation none the less: rational approximations + will often match more difficult to approximate functions, to greater accuracy, + and with greater efficiency, than their polynomial alternatives. For example, + if we takes our previous example of an approximation to ex, we obtained 5x10-4 accuracy + with an order 4 polynomial. If we move two of the unknowns into the denominator + to give a pair of order 2 polynomials, and re-minimise, then the peak relative + error drops to 8.7x10-5. That's a 5 fold increase in accuracy, for the same + number of terms overall. +

+
+ + Practical + Considerations +
+

+ Most treatises on approximation theory stop at this point. However, from a + practical point of view, most of the work involves finding the right approximating + form, and then persuading the Remez method to converge on a solution. +

+

+ So far we have used a direct approximation: +

+

+ f(x) = R(x) +

+

+ But this will converge to a useful approximation only if f(x) is smooth. In + addition round-off errors when evaluating the rational form mean that this + will never get closer than within a few epsilon of machine precision. Therefore + this form of direct approximation is often reserved for situations where we + want efficiency, rather than accuracy. +

+

+ The first step in improving the situation is generally to split f(x) into a + dominant part that we can compute accurately by another method, and a slowly + changing remainder which can be approximated by a rational approximation. We + might be tempted to write: +

+

+ f(x) = g(x) + R(x) +

+

+ where g(x) is the dominant part of f(x), but if f(x)/g(x) is approximately + constant over the interval of interest then: +

+

+ f(x) = g(x)(c + R(x)) +

+

+ Will yield a much better solution: here c is a constant + that is the approximate value of f(x)/g(x) and R(x) is typically tiny compared + to c. In this situation if R(x) is optimised for absolute + error, then as long as its error is small compared to the constant c, + that error will effectively get wiped out when R(x) is added to c. +

+

+ The difficult part is obviously finding the right g(x) to extract from your + function: often the asymptotic behaviour of the function will give a clue, + so for example the function __erfc becomes proportional to e-x2/x as x becomes + large. Therefore using: +

+

+ erfc(z) = (C + R(x)) e-x2/x +

+

+ as the approximating form seems like an obvious thing to try, and does indeed + yield a useful approximation. +

+

+ However, the difficulty then becomes one of converging the minimax solution. + Unfortunately, it is known that for some functions the Remez method can lead + to divergent behaviour, even when the initial starting approximation is quite + good. Furthermore, it is not uncommon for the solution obtained in the first + Remez step above to be a bad one: the equations to be solved are generally + "stiff", often very close to being singular, and assuming a solution + is found at all, round-off errors and a rapidly changing error function, can + lead to a situation where the error function does not in fact change sign at + each control point as required. If this occurs, it is fatal to the Remez method. + It is also possible to obtain solutions that are perfectly valid mathematically, + but which are quite useless computationally: either because there is an unavoidable + amount of roundoff error in the computation of the rational function, or because + the denominator has one or more roots over the interval of the approximation. + In the latter case while the approximation may have the correct limiting value + at the roots, the approximation is nonetheless useless. +

+

+ Assuming that the approximation does not have any fatal errors, and that the + only issue is converging adequately on the minimax solution, the aim is to + get as close as possible to the minimax solution before beginning the Remez + method. Using the zeros of a Chebyshev polynomial for the initial interpolation + is a good start, but may not be ideal when dealing with relative errors and/or + rational (rather than polynomial) approximations. One approach is to skew the + initial interpolation points to one end: for example if we raise the roots + of the Chebyshev polynomial to a positive power greater than 1 then the roots + will be skewed towards the middle of the [-1,1] interval, while a positive + power less than one will skew them towards either end. More usefully, if we + initially rescale the points over [0,1] and then raise to a positive power, + we can skew them to the left or right. Returning to our example of ex over [-1,1], + the initial interpolated form was some way from the minimax solution: +

+

+ remez-2 +

+

+ However, if we first skew the interpolation points to the left (rescale them + to [0, 1], raise to the power 1.3, and then rescale back to [-1,1]) we reduce + the error from 1.3x10-3to 6x10-4: +

+

+ remez-5 +

+

+ It's clearly still not ideal, but it is only a few percent away from our desired + minimax solution (5x10-4). +

+
+ + Remez + Method Checklist +
+

+ The following lists some of the things to check if the Remez method goes wrong, + it is by no means an exhaustive list, but is provided in the hopes that it + will prove useful. +

+
    +
  • + Is the function smooth enough? Can it be better separated into a rapidly + changing part, and an asymptotic part? +
  • +
  • + Does the function being approximated have any "blips" in it? Check + for problems as the function changes computation method, or if a root, or + an infinity has been divided out. The telltale sign is if there is a narrow + region where the Remez method will not converge. +
  • +
  • + Check you have enough accuracy in your calculations: remember that the Remez + method works on the difference between the approximation and the function + being approximated: so you must have more digits of precision available than + the precision of the approximation being constructed. So for example at double + precision, you shouldn't expect to be able to get better than a float precision + approximation. +
  • +
  • + Try skewing the initial interpolated approximation to minimise the error + before you begin the Remez steps. +
  • +
  • + If the approximation won't converge or is ill-conditioned from one starting + location, try starting from a different location. +
  • +
  • + If a rational function won't converge, one can minimise a polynomial (which + presents no problems), then rotate one term from the numerator to the denominator + and minimise again. In theory one can continue moving terms one at a time + from numerator to denominator, and then re-minimising, retaining the last + set of control points at each stage. +
  • +
  • + Try using a smaller interval. It may also be possible to optimise over one + (small) interval, rescale the control points over a larger interval, and + then re-minimise. +
  • +
  • + Keep absissa values small: use a change of variable to keep the abscissa + over, say [0, b], for some smallish value b. +
  • +
+
+ + References +
+

+ The original references for the Remez Method and it's extension to rational + functions are unfortunately in Russian: +

+

+ Remez, E.Ya., Fundamentals of numerical methods for Chebyshev approximations, + "Naukova Dumka", Kiev, 1969. +

+

+ Remez, E.Ya., Gavrilyuk, V.T., Computer development of certain approaches + to the approximate construction of solutions of Chebyshev problems nonlinearly + depending on parameters, Ukr. Mat. Zh. 12 (1960), 324-338. +

+

+ Gavrilyuk, V.T., Generalization of the first polynomial algorithm + of E.Ya.Remez for the problem of constructing rational-fractional Chebyshev + approximations, Ukr. Mat. Zh. 16 (1961), 575-585. +

+

+ Some English language sources include: +

+

+ Fraser, W., Hart, J.F., On the computation of rational approximations + to continuous functions, Comm. of the ACM 5 (1962), 401-403, 414. +

+

+ Ralston, A., Rational Chebyshev approximation by Remes' algorithms, + Numer.Math. 7 (1965), no. 4, 322-330. +

+

+ A. Ralston, Rational Chebyshev approximation, Mathematical Methods + for Digital Computers v. 2 (Ralston A., Wilf H., eds.), Wiley, New + York, 1967, pp. 264-284. +

+

+ Hart, J.F. e.a., Computer approximations, Wiley, New York + a.o., 1968. +

+

+ Cody, W.J., Fraser, W., Hart, J.F., Rational Chebyshev approximation + using linear equations, Numer.Math. 12 (1968), 242-251. +

+

+ Cody, W.J., A survey of practical rational and polynomial approximation + of functions, SIAM Review 12 (1970), no. 3, 400-423. +

+

+ Barrar, R.B., Loeb, H.J., On the Remez algorithm for non-linear families, + Numer.Math. 15 (1970), 382-391. +

+

+ Dunham, Ch.B., Convergence of the Fraser-Hart algorithm for rational + Chebyshev approximation, Math. Comp. 29 (1975), no. 132, 1078-1082. +

+

+ G. L. Litvinov, Approximate construction of rational approximations + and the effect of error autocorrection, Russian Journal of Mathematical + Physics, vol.1, No. 3, 1994. +

+
+ + + +
+
+
+PrevUpHomeNext +
+ + diff --git a/doc/test/gold/document_to_test_formatting/test.html b/doc/test/gold/document_to_test_formatting/test.html new file mode 100644 index 0000000000..3e7abb4a22 --- /dev/null +++ b/doc/test/gold/document_to_test_formatting/test.html @@ -0,0 +1,73 @@ + + + +test HTML4 symbols + + + + + + + + + + + + + + + +
Boost C++ LibrariesHomeLibrariesPeopleFAQMore
+
+
+PrevUpHomeNext +
+
+ + +
+ +

+ ƒ, Α, Β, Γ, Δ, Ε, Ζ, Η, Θ, Ι, Κ, Λ, Μ, Ν, Ξ, Ο, Π, Ρ, Σ, Τ, Υ, Φ, Χ, Ψ, Ω, α, β, γ, δ, ε, ζ, η, θ, ι, κ, λ, μ, + ν, ξ, ο, π, ρ, ς, σ, τ, υ, φ, χ, ψ, ω, ϑ, ϒ, ϖ, •, …, ′, ″, ‾, ⁄, ℘, ℑ, ℜ, ™, ℵ, ←, ↑, →, ↓, ↔, ↵, ⇐, ⇑, ⇒, ⇓, + ⇔, ∀, ∂, ∃, ∅, ∇, ∈, ∉, ∋, ∏, ∑, −, ∗, √, ∝, ∞, ∠, ∧, ∨, ∩, ∪, ∫, ∴, ∼, ≅, ≈, ≠, ≡, ≤, ≥, ⊂, ⊃, ⊄, ⊆, ⊇, ⊕, ⊗, + ⊥, ⋅, ⌈, ⌉, ⌊, ⌋, 〈, 〉, ◊, ♠, ♣, ♥, ♦ +

+
+
+ +

+  , ¡, ¢, £, ¤, ¥, ¦, §, ¨, ©, ª, «, ¬, ­, ®, ¯, °, ±, ², ³, ´, µ, ¶, ·, ¸, ¹, º, », ¼, ½, ¾, ¿, À, Á, Â, Ã, Ä, + Å, Æ, Ç, È, É, Ê, Ë, Ì, Í, Î, Ï, Ð, Ñ, Ò, Ó, Ô, Õ, Ö, ×, Ø, Ù, Ú, Û, Ü, Ý, Þ, ß, à, á, â, ã, ä, å, æ, ç, è, é, + ê, ë, ì, í, î, ï, ð, ñ, ò, ó, ô, õ, ö, ÷, ø, ù, ú, û, ü, ý, þ, ÿ, +

+
+
+ + + +
+
+
+PrevUpHomeNext +
+ + diff --git a/doc/test/gold/images/accumulators/doxygen.png b/doc/test/gold/images/accumulators/doxygen.png new file mode 100644 index 0000000000..f0a274bbaf Binary files /dev/null and b/doc/test/gold/images/accumulators/doxygen.png differ diff --git a/doc/test/gold/images/accumulators/form_0.png b/doc/test/gold/images/accumulators/form_0.png new file mode 100644 index 0000000000..9fb5ce8b77 Binary files /dev/null and b/doc/test/gold/images/accumulators/form_0.png differ diff --git a/doc/test/gold/images/accumulators/form_1.png b/doc/test/gold/images/accumulators/form_1.png new file mode 100644 index 0000000000..e3a10bb862 Binary files /dev/null and b/doc/test/gold/images/accumulators/form_1.png differ diff --git a/doc/test/gold/images/accumulators/form_2.png b/doc/test/gold/images/accumulators/form_2.png new file mode 100644 index 0000000000..49a572f11b Binary files /dev/null and b/doc/test/gold/images/accumulators/form_2.png differ diff --git a/doc/test/gold/images/accumulators/form_3.png b/doc/test/gold/images/accumulators/form_3.png new file mode 100644 index 0000000000..fa15c98119 Binary files /dev/null and b/doc/test/gold/images/accumulators/form_3.png differ diff --git a/doc/test/gold/images/accumulators/form_4.png b/doc/test/gold/images/accumulators/form_4.png new file mode 100644 index 0000000000..a2ee808368 Binary files /dev/null and b/doc/test/gold/images/accumulators/form_4.png differ diff --git a/doc/test/gold/images/accumulators/form_5.png b/doc/test/gold/images/accumulators/form_5.png new file mode 100644 index 0000000000..304603baa3 Binary files /dev/null and b/doc/test/gold/images/accumulators/form_5.png differ diff --git a/doc/test/gold/images/accumulators/form_6.png b/doc/test/gold/images/accumulators/form_6.png new file mode 100644 index 0000000000..4783b96345 Binary files /dev/null and b/doc/test/gold/images/accumulators/form_6.png differ diff --git a/doc/test/gold/images/accumulators/form_7.png b/doc/test/gold/images/accumulators/form_7.png new file mode 100644 index 0000000000..66d2cf8779 Binary files /dev/null and b/doc/test/gold/images/accumulators/form_7.png differ diff --git a/doc/test/gold/images/accumulators/form_8.png b/doc/test/gold/images/accumulators/form_8.png new file mode 100644 index 0000000000..2564f5224d Binary files /dev/null and b/doc/test/gold/images/accumulators/form_8.png differ diff --git a/doc/test/gold/index.html b/doc/test/gold/index.html new file mode 100644 index 0000000000..e9afa5f1d3 --- /dev/null +++ b/doc/test/gold/index.html @@ -0,0 +1,149 @@ + + + +Document To Test Formatting + + + + + + + + + + + + + +
Boost C++ LibrariesHomeLibrariesPeopleFAQMore
+
+
Next
+
+
+
+

+Document To Test Formatting

+
+

+John Maddock +

+

+Joel de Guzman +

+

+Eric Niebler +

+

+Matias Capeletto +

+
+
+
+

+ 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) +

+
+
+
+
+ +
+ +

+ This document is purely a test case to test out HTML and PDF generation and + style. +

+

+ This is some body text. +

+
int main()
+{
+    double d = 2.345;
+    return d;
+}
+
+

+ We can count in Greek too: α, β, γ. +

+

+ Try some superscrips and subscripts: x2, xi3, α2, βα, ⌊x⌋, ⌊α⌋, ⌈a⌉. +

+
+
+ + + +

Last revised: December 09, 2008 at 12:07:46 GMT

+
+
Next
+ + -- cgit v1.2.1