73 Commits

Author SHA1 Message Date
René Ferdinand Rivera Morell
b5cce2833b Add support for modular build structure. (#401)
* Make the library modular usable
* Move inter-lib dependencies to a project variable and into the build targets
* Bump B2 require to 5.2
* Update dependencies used in CI: compiler versions, tools, etc.

---------

Co-authored-by: Hans Dembinski <hans.dembinski@gmail.com>
2025-06-05 15:23:06 +02:00
Ruggero Turra
90867e24a4 Add collector accumulator (#390)
Co-authored-by: Hans Dembinski <hans.dembinski@gmail.com>
2024-04-25 09:05:40 +02:00
Hans Dembinski
cd3e1110cb Updates from #370 (#397)
This PR keeps the useful changes from PR #370, which was never finished.
2024-04-24 17:39:24 +02:00
Hans Dembinski
25608fe86a fix sub_array and span in C++20 (#368) 2022-10-03 13:57:08 +02:00
Jay Gohil
10c19df918 Add fraction accumulator (for calculating efficiencies, etc) (#361)
* Added fraction accumulator
* Added binomial proportion interval computers: Wald, Wilson Score, Clopper Pearson, Jeffreys
* Width of intervals for all classes can be set via deviation or confidence_level
* Support valarray in histogram::fill
* Add fraction and count to user guide

Co-authored-by: Hans Dembinski <hans.dembinski@gmail.com>
Co-authored-by: Hans Dembinski <HDembinski@users.noreply.github.com>
2022-09-28 11:18:46 +02:00
Hans Dembinski
8b1657553d Enable ascii ostream tests on windows (#360) 2022-07-20 10:32:56 +02:00
Hans Dembinski
843cacffbf fix indexed crash for histograms with axes of zero size (physical or logical) (#356) 2022-07-20 09:51:16 +02:00
Hans Dembinski
9caf633366 remove deprecated API, as previously announced (#359) 2022-07-19 23:08:38 +02:00
Hans Dembinski
f6577ec473 deprecate accumulators::sum::small and ::large as workaround for bug in windows.h (#343) 2021-11-15 08:18:05 +01:00
Hans Dembinski
6cc4601b87 Fix bug in 1D histogram::fill when axis is growing and argument is single value (#334) 2021-09-26 18:31:35 +02:00
Hans Dembinski
6cde30a366 deprecate accumulators::thread_safe, replace with optionally thread-safe accumulators::count (#326) 2021-05-17 22:20:47 +02:00
Hans Dembinski
d60f96ded6 ostream improvements: support more accumulators, unicode plots (#317) 2021-04-23 20:15:12 +02:00
Hans Dembinski
14fdb6fb56 Support floating point numbers in thread_safe accumulator, don't inherit from std::atomic (#315)
* don't inherit from std::atomic anymore
* support float and double
* added .value() method for consistency
2021-04-23 15:04:23 +02:00
Hans Dembinski
0840102bfe Workaround for gcc bug, fix for static global variable and function in header, fix of c++20 warning 2020-11-01 17:10:11 +01:00
Hans Dembinski
5e60e86d3c rename binary to boolean (#126) 2020-06-24 23:50:25 +02:00
Hans Dembinski
5253358988 add binary axis 2020-06-06 23:45:12 +02:00
Hans Dembinski
9aef54cf70 Extended custom accumulator section in user guide and added count accumulator 2020-01-03 19:40:41 +01:00
Hans Dembinski
9e5a4c4f24 adding CI test of superproject cmake 2019-12-29 20:44:44 +01:00
Hans Dembinski
1305445ce4 stop compiler optimizations with -ffast-math from break sum accumulator 2019-12-20 20:13:39 +01:00
Hans Dembinski
b7fc900e3b Better error messages when fill arguments do not match accumulator requirements 2019-11-06 00:19:41 +01:00
Hans Dembinski
f56337177d Fix sample argument bug
fixes: a weight could pass as sample and vice versa
2019-10-31 01:45:02 +01:00
Hans Dembinski
3b18d9075b Better deduction guides for axis types and histogram 2019-10-27 17:27:26 +01:00
Henry Schreiner
bf7a97ae8b Adding empty(hist, cov) (#245) 2019-10-27 09:42:24 +01:00
Hans Dembinski
c8b8c4d502 Fix accumulator issues (#72)
* add weighted_mean::sum_of_weights_squared
* sum of default constructed mean and weighted_mean is now equal to default constructed object
* thread-safe returns a reference to self in operators just like the other accumulators
2019-10-26 11:12:29 +02:00
Hans Dembinski
ebabd550a0 Replace detail::compressed_pair with boost::core::empty_value 2019-10-24 21:47:17 +02:00
Hans Dembinski
5e24146062 re-introduce optimizing array_wrapper for serialization 2019-10-22 23:35:36 +01:00
Hans Dembinski
c22e69c4f1 Build system fixes
- CMake: make compile-fail tests fail for the right reasons not because of missing headers
- CMake: run check_odr_test.py
- B2: actually run check_odr_test.py and check_build_system.py
2019-10-22 23:32:27 +01:00
Hans Dembinski
30899cb45d Merged upgraded display.hpp code into histogram/ostream.hpp
supports all axis bin types and gracefully handles histograms with accumulators
2019-10-17 00:58:37 +02:00
Hans Dembinski
05c1bbfac1 Improve odr test (#59)
* rename link test to odr test and check odr test completeness
* added convenience header for algorithm
* added minimal docs for axis.hpp, accumulators.hpp, algorithm.hpp
* temporarily remove display.hpp (will return in another patch)
2019-10-12 15:12:53 +02:00
Henry Schreiner
493a195a54 Fixing missing inline, adding link test (#231) 2019-10-08 10:10:23 +02:00
Hans Dembinski
92a873c746 Faster linearize (#230)
* introduce offset for faster linearization of non-growing axes
* added traits::is_inclusive and constexpr bool inclusive() methods for builtin axes
* bug fixes for fill method when weight array is used with non-inclusive axis and when growing axes are used
* bug fix of axis::options::test(...)
* coverage tested with gcc-8, updated CONTRIBUTING.md with coverage info
2019-10-06 23:03:45 +02:00
Hans Dembinski
ffe3e4d68c assert on and test invalid combinations of axis options (#227) 2019-09-29 12:56:11 +02:00
pb
892cc9c4d7 ASCII output for 1D histograms (#201) 2019-09-28 16:41:00 +02:00
Hans Dembinski
0d893d4eff adding weight support for mean accumulator (#212)
changed type of sum to RealType for mean and added serialization tests for builtin accumulators
2019-09-12 08:08:39 +02:00
Hans Dembinski
016532f011 Histogram fill method (#54)
huge refactor, various speed improvements, potential for further improvements and parallelization
2019-08-19 23:55:43 +02:00
Hans Dembinski
7e40aaf689 internal operators library replaces duplicated code 2019-06-10 16:05:51 +02:00
Hans Dembinski
e7a2051c2c simpler xml path setting and persistent serialization tests for unlimited_storage 2019-06-07 14:25:49 +02:00
Hans Dembinski
1de7cf8bad define restricted environment and make tests compile in it 2019-06-07 13:41:31 +02:00
Hans Dembinski
2239314eed variant2 instead of detail::variant 2019-06-03 22:14:50 +02:00
Hans Dembinski
96926f367f splitting meta.hpp into parts 2019-05-31 16:46:49 +02:00
Hans Dembinski
e434804508 explicitly guarantee nothrow moves for all builtin axis types
* use preinstalled gcc5 on travis and don't stop on first error anymore
* update axis concept regarding nothrow moves
2019-05-28 22:29:26 +02:00
Hans Dembinski
af188b6476 clean up warnings 2019-05-14 23:02:30 +02:00
Hans Dembinski
a8226955c2 Improve serialization of variant using only public interface and added serialiation for thread_safe<T> 2019-05-12 17:56:45 +02:00
Hans Dembinski
af77b6af07 Decouple tests and benchmarks, turn off warnings for tests with some external boost libs
- Tests and benchmarks now only include the headers they really need.
- Warnings turned off for tests that compile with external boost libs that are not warning free
2019-05-12 13:33:54 +02:00
Hans Dembinski
170199bb9f replacing boost::variant with detail::variant
- removes large number of outdated indirect boost dependencies
- less limited in number of stored types
2019-04-30 16:27:14 +02:00
Hans Dembinski
073dffdf09 More doc improvements 2019-04-28 12:22:49 +02:00
Hans Dembinski
6b386c9b51 increase coverage
* provide unsafe access to buffer
* factored mp_int out into separate header and renamed to large_int
* refined adding behavior
* more warnings and comeback of coverage variant
* better coverage reporting
2019-04-22 03:33:05 +02:00
Hans Dembinski
ed4935cd93 better build files 2019-04-20 00:00:29 +02:00
Hans Dembinski
02348a74e1 Replace boost::iterator_adaptor with private iterator_adaptor to reduce dependencies 2019-04-19 23:07:23 +02:00
Hans Dembinski
1bf9dd9dfd thread-safe storage
- new thread-safe accumulators for arithmetic types
- storages have a new flag `has_threading_support` to indicate support for parallel cell access
- histogram automatically synchronises growing axes and storage if necessary
2019-04-14 22:24:34 +02:00