#include <algorithm>
#include <cmath>
#include "utils/Types.hpp"
Go to the source code of this file.
|
| namespace | ppforest2 |
| | Binarization strategies for multiclass-to-binary reduction.
|
| |
| namespace | ppforest2::math |
| | Numeric comparison utilities.
|
| |
|
| template<typename T> |
| bool | ppforest2::math::collinear (types::Vector< T > const &a, types::Vector< T > const &b) |
| | Check whether two vectors are collinear (parallel or anti-parallel).
|
| |
| template<typename A, typename B> |
| bool | ppforest2::math::is_approx (A a, B b) |
| | Overload using the default APPROX_THRESHOLD.
|
| |
| template<typename A, typename B, typename T> |
| bool | ppforest2::math::is_approx (A a, B b, T threshold) |
| | Check whether two scalars are approximately equal.
|
| |
| template<typename A, typename B> |
| bool | ppforest2::math::is_module_approx (A a, B b) |
| | Check whether the absolute values of two scalars are approximately equal.
|
| |
| int | ppforest2::math::proportion_to_count (float p, unsigned int total) |
| | Convert a proportion of a total into a count.
|
| |
◆ APPROX_THRESHOLD
| #define APPROX_THRESHOLD 0.01 |