Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 15 additions & 1 deletion doc/Jamfile.v2
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,7 @@ boostbook standalone
<dependency>statsdoc
<dependency>opdoc
<format>pdf:<xsl:param>img.src.path=$(images_location)/
<format>pdf:<xsl:param>boost.url.prefix=http://www.boost.org/doc/libs/release/doc/html
<format>pdf:<xsl:param>"boost.url.prefix=http://www.boost.org/doc/libs/release/doc/html"
;

###############################################################################
Expand All @@ -255,3 +255,17 @@ alias boostdoc
explicit boostdoc ;
alias boostrelease ;
explicit boostrelease ;

###############################################################################
# Antora-based documentation (AsciiDoc). From Boost root:
# ./b2 libs/accumulators/doc//antora-html
# Or: cd libs/accumulators/doc && bash build_antora.sh
# Requires Node.js and bash. Doxygen HTML is copied into the site by build_antora.sh.

actions run-accumulators-antora
{
bash $(>)
}

make antora-html : build_antora.sh : @run-accumulators-antora ;
explicit antora-html ;
Comment thread
coderabbitai[bot] marked this conversation as resolved.
15 changes: 15 additions & 0 deletions doc/antora.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
#
# Generated for Boost.Accumulators documentation (Antora).
# Distributed under the Boost Software License, Version 1.0.
#

name: accumulators
version: ~
title: Boost.Accumulators
start_page: index.adoc
asciidoc:
attributes:
source-language: asciidoc@
table-caption: false
nav:
- modules/ROOT/nav.adoc
50 changes: 50 additions & 0 deletions doc/build_antora.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
#!/usr/bin/env bash
#
# Copyright 2005, 2006 Eric Niebler
# Copyright 2026 boost-doc-modernize contributors
#
# Distributed under the Boost Software License, Version 1.0.
#
# Build Antora site under doc/build/site.
# Installs Node dependencies and runs Antora using the selected playbook.
#

set -xe

SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
cd "$SCRIPT_DIR"

if [ -z "${BOOST_SRC_DIR:-}" ]; then
CANDIDATE=$( cd "$SCRIPT_DIR/../../.." 2>/dev/null && pwd )
if [ -n "$CANDIDATE" ]; then
BOOST_SRC_DIR_IS_VALID=ON
for F in "CMakeLists.txt" "Jamroot" "boost-build.jam" "bootstrap.sh" "libs"; do
if [ ! -e "$CANDIDATE/$F" ]; then
BOOST_SRC_DIR_IS_VALID=OFF
break
fi
done
if [ "$BOOST_SRC_DIR_IS_VALID" = "ON" ]; then
export BOOST_SRC_DIR="$CANDIDATE"
echo "Using BOOST_SRC_DIR=$BOOST_SRC_DIR"
fi
fi
fi

if [ $# -eq 0 ]
then
echo "No playbook supplied, using default playbook"
PLAYBOOK="local-playbook.yml"
else
PLAYBOOK=$1
fi

echo "Building documentation with Antora..."
echo "Installing npm dependencies..."
npm install

echo "Building docs in custom dir..."
PATH="$(pwd)/node_modules/.bin:${PATH}"
export PATH
npx antora --clean --fetch "$PLAYBOOK" --stacktrace --log-level all
echo "Done"
48 changes: 48 additions & 0 deletions doc/local-playbook.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
#
Comment thread
myzhang-1127 marked this conversation as resolved.
# Local Antora playbook for Boost.Accumulators
#

site:
title: Boost.Accumulators
url: https://antora.cppalliance.org/develop/lib/doc
start_page: accumulators::index.adoc
robots: allow
keys:
repo_url: 'https://github.com/boostorg/accumulators'

content:
sources:
- url: ..
start_path: doc
edit_url: 'https://github.com/boostorg/accumulators/edit/{refname}/{path}'

ui:
bundle:
url: https://github.com/boostorg/website-v2-docs/releases/download/ui-master/ui-bundle.zip
snapshot: true


antora:
extensions:
- require: '@antora/lunr-extension' # https://gitlab.com/antora/antora-lunr-extension
index_latest_only: true
- require: '@cppalliance/antora-cpp-tagfiles-extension'
cpp-tagfiles:
using-namespaces:
- 'boost::'
- require: '@cppalliance/antora-cpp-reference-extension'
dependencies:
- name: 'boost'
repo: 'https://github.com/boostorg/boost.git'
tag: 'develop'
variable: 'BOOST_SRC_DIR'
system-env: 'BOOST_SRC_DIR'
- require: '@cppalliance/antora-downloads-extension'

asciidoc:
attributes:
# Enable pagination
page-pagination: ''
extensions:
- '@cppalliance/asciidoctor-boost-links'
- '@asciidoctor/tabs'
5 changes: 5 additions & 0 deletions doc/modules/ROOT/nav.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
* xref:index.adoc[]
* xref:preface.adoc[Preface]
* xref:user_s_guide.adoc[User's Guide]
* xref:acknowledgements.adoc[Acknowledgements]
* xref:reference.adoc[Reference]
8 changes: 8 additions & 0 deletions doc/modules/ROOT/pages/acknowledgements.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
= Acknowledgements
:id: accumulators.acknowledgements

Boost.Accumulators represents the efforts of many individuals. I would like to thank Daniel Egloff of link:https://www.zkb.com[Zürcher Kantonalbank] for helping to conceive the library and realize its implementation. I would also like to thank David Abrahams and Matthias Troyer for their key contributions to the design of the library. Many thanks are due to Michael Gauckler and Olivier Gygi, who, along with Daniel Egloff, implemented many of the statistical accumulators.

I would also like to thank Simon West for all his assistance maintaining Boost.Accumulators.

Finally, I would like to thank link:https://www.zkb.com[Zürcher Kantonalbank] for sponsoring the work on Boost.Accumulators and graciously donating it to the community.
37 changes: 37 additions & 0 deletions doc/modules/ROOT/pages/index.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
= Chapter 1. Boost.Accumulators

*Eric Niebler*

Incremental accumulation framework and statistical accumulator library.

Copyright (C) 2005, 2006 Eric Niebler +
Distributed under the Boost Software License, Version 1.0. +
(See accompanying file LICENSE_1_0.txt or copy at https://www.boost.org/LICENSE_1_0.txt)

[.accumulators-mini-toc]
****
**Table of Contents**

* xref:preface.adoc[Preface]
* xref:user_s_guide.adoc[User's Guide]
** xref:user_s_guide.adoc#accumulators.user_s_guide.the_accumulators_framework[The Accumulators Framework]
** xref:user_s_guide.adoc#accumulators.user_s_guide.the_statistical_accumulators_library[The Statistical Accumulators Library]
* xref:acknowledgements.adoc[Acknowledgements]
* xref:reference.adoc[Reference]
** xref:reference.adoc#accumulators_framework_reference[Accumulators Framework Reference]
** xref:reference.adoc#statistics_library_reference[Statistics Library Reference]
** xref:reference.adoc#numeric_operators_library_reference[Numeric Operators Library Reference]
****

== Preface

[quote]
____
It is better to be approximately right than exactly wrong.

-- Old adage
____

== Description

Boost.Accumulators is both a library for incremental statistical computation as well as an extensible framework for incremental calculation in general. The library deals primarily with the concept of an _accumulator_, which is a primitive computational entity that accepts data one sample at a time and maintains some internal state. These accumulators may offload some of their computations on other accumulators, on which they depend. Accumulators are grouped within an _accumulator set_. Boost.Accumulators resolves the inter-dependencies between accumulators in a set and ensures that accumulators are processed in the proper order.
16 changes: 16 additions & 0 deletions doc/modules/ROOT/pages/preface.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
= Preface
:id: accumulators.preface

[quote]
____
It is better to be approximately right than exactly wrong. -- Old adage
____


[[accumulators.preface.h0]]

[[accumulators.preface.description]]

== Description

Boost.Accumulators is both a library for incremental statistical computation as well as an extensible framework for incremental calculation in general. The library deals primarily with the concept of an _accumulator_, which is a primitive computational entity that accepts data one sample at a time and maintains some internal state. These accumulators may offload some of their computations on other accumulators, on which they depend. Accumulators are grouped within an _accumulator set_. Boost.Accumulators resolves the inter-dependencies between accumulators in a set and ensures that accumulators are processed in the proper order.
Loading