|
libcrn
3.9.5
A document image processing library
|
Collaboration diagram for Maths:Modules | |
| Geometry | |
| Statistics | |
Namespaces | |
| crn::Combinatorics | |
| Combinatorics toolbox. | |
| crn::LinearSystem | |
| Solvers for systems of linear equations. | |
| crn::QuadraticEquation | |
| Solvers for quadratic equations. | |
| crn::FuzzyLogic | |
| Fuzzy logic toolbox. | |
| crn::literals | |
| crn::UnivariateRandomTools | |
| Univariate random toolbox class. | |
Classes | |
| class | crn::DiscreteHMM |
| Discrete HMM class. More... | |
| class | crn::GaussianSCHMM |
| Semi-continuous gaussian HMM class. More... | |
| class | crn::Cartesian2DFunction |
| Base class for 2D functions. More... | |
| class | crn::CubicSpline |
| Cubic spline interpolation. More... | |
| class | crn::LinearInterpolation |
| Linear interpolation. More... | |
| class | crn::Matrix< T > |
| Base matrix class. More... | |
| class | crn::MatrixComplex |
| Complex matrix class. More... | |
| class | crn::MatrixDouble |
| double matrix class More... | |
| class | crn::MatrixInt |
| Integer matrix class. More... | |
| class | crn::MultivariateGaussianMixture |
| Multivariate gaussian mixture. More... | |
| class | crn::MultivariateGaussianPDF |
| Multivariate Gaussian distribution. More... | |
| class | crn::MultivariateRandomTools |
| Multivariate random toolbox class. More... | |
| class | crn::PolynomialRegression |
| Polynomial regression. More... | |
| class | crn::Prop3 |
| A ternary proposition. More... | |
| class | crn::RealToRealFunction |
| Numerical integration toolbox class. More... | |
| class | crn::SquareMatrixDouble |
| Square double matrix class. More... | |
| struct | crn::Radian |
| Radian angle unit. More... | |
| struct | crn::Degree |
| Degree angle unit. More... | |
| struct | crn::ByteAngle |
| BYTE angle unit. More... | |
| struct | crn::Angle< Unit > |
| A convenience class for angles units. More... | |
| class | crn::UnivariateGaussianMixture |
| Univariate Gaussian mixture. More... | |
| class | crn::UnivariateGaussianPDF |
| Univariate Gaussian distribution. More... | |
Typedefs | |
| template<class ANGLE > | |
| using | crn::Unit = typename ANGLE::unit |
Enumerations | |
| enum | crn::Direction { crn::Direction::INVALID = 0, crn::Direction::LEFT = 1, crn::Direction::RIGHT = 2, crn::Direction::TOP = 4, crn::Direction::BOTTOM = 8 } |
| An enumeration of directions. More... | |
| enum | crn::Orientation { crn::Orientation::INVALID = 0, crn::Orientation::HORIZONTAL, crn::Orientation::VERTICAL } |
| An enumeration of orientations. More... | |
| enum | crn::DistanceType { crn::DistanceType::INVALID = 0, crn::DistanceType::D4, crn::DistanceType::D8, crn::DistanceType::EUCLIDEAN } |
| An enumeration of distances. More... | |
Functions | |
| template<typename T > | |
| const T & | crn::Max (const T &a, const T &b) |
| Returns the max of two values. More... | |
| template<typename T > | |
| const T & | crn::Min (const T &a, const T &b) |
| Returns the min of two values. More... | |
| template<typename T > | |
| const T & | crn::Max (const T &a, const T &b, const T &c) |
| Returns the max of three values. More... | |
| template<typename T > | |
| const T & | crn::Min (const T &a, const T &b, const T &c) |
| Returns the min of three values. More... | |
| template<typename T > | |
| constexpr TypeInfo< T >::SumType | crn::Twice (const T &v) noexcept(noexcept(v+v)) |
| Returns the double of a value. More... | |
| template<typename T > | |
| constexpr TypeInfo< T >::SumType | crn::Thrice (const T &v) noexcept(noexcept(v+v)) |
| Returns three times a value. More... | |
| template<typename T > | |
| constexpr int | crn::SignOf (const T &x) noexcept(noexcept(x< 0)) |
| Returns the sign (-1 or 1) of a value. More... | |
| template<typename T > | |
| constexpr SumType< T > | crn::Sqr (const T &v) noexcept(noexcept(v *v)) |
| Returns the square of a value. More... | |
| template<typename T > | |
| constexpr T | crn::Abs (const T &v) noexcept(noexcept(v< 0)&&noexcept(-v)) |
| Returns the absolute value of a value. More... | |
| template<typename T > | |
| T | crn::Abs (const std::complex< T > &v) noexcept(noexcept(std::abs(std::complex< T >(0)))) |
| Returns the absolute value of a value. More... | |
| template<typename T > | |
| T | crn::AbsMax (const T &a, const T &b) noexcept(noexcept(Abs(a))) |
| Returns the value that has the maximal absolute value. More... | |
| template<typename T > | |
| T | crn::AbsMin (const T &a, const T &b) noexcept(noexcept(Abs(a))) |
| Returns the value that has the minimal absolute value. More... | |
| template<typename T > | |
| T | crn::AbsMaxSameSign (const T &a, const T &b) noexcept(noexcept(Abs(a))&&noexcept(SignOf(a))) |
| Returns the value that has the maximal absolute value if the values have the same sign. More... | |
| template<typename T > | |
| T | crn::AbsMinSameSign (const T &a, const T &b) noexcept(noexcept(Abs(a))&&noexcept(SignOf(a))) |
| Returns the value that has the minimal absolute value if the values have the same sign. More... | |
| template<typename T > | |
| const T & | crn::Cap (const T &v, const T &min, const T &max) |
| Bounds a value to an interval. More... | |
| double | crn::Gauss (double x, double sigma) |
| Computes Gauss function at x for a given standard deviation (centered in 0) More... | |
| double | crn::MeanGauss (double x, double sigma) |
| Computes Gauss function at x for a given standard deviation (centered in 0) – to use with matrices. More... | |
| double | crn::Pythagoras (double a, double b) noexcept |
| Computes sqrt(a²+b²) without destructive underflow or overflow. More... | |
| double | crn::Pythagoras (int a, int b) noexcept |
| Computes sqrt(a²+b²) without destructive underflow or overflow. More... | |
| double | crn::Pythagoras (double a, double b, double c) noexcept |
| Computes sqrt(a²+b²+c²) More... | |
| template<class ITER > | |
| double | crn::Pythagoras (ITER it_begin, ITER it_end) |
| Computes euclidean norm. More... | |
| template<class ITER > | |
| void | crn::Scale (ITER it_begin, ITER it_end, const double s) |
| Scale a collection of numbers. More... | |
| template<typename Unit > | |
| Direction | crn::ToDirection (const Angle< Unit > &ang) noexcept |
| Orientation | crn::ToOrientation (Direction d) noexcept |
| template<typename T , typename std::enable_if< std::is_arithmetic< T >::value, int >::type = 0> | |
| double | crn::Distance (T o1, T o2) |
| Distance between two numbers. More... | |
| template<typename Unit > | |
| double | crn::Cosine (typename Unit::type angle) noexcept |
| Cosine of an angle. More... | |
| template<typename Unit > | |
| double | crn::Sine (typename Unit::type angle) noexcept |
| Sine of an angle. More... | |
| template<typename Unit > | |
| double | crn::Tangent (typename Unit::type angle) noexcept |
| Tangent of an angle. More... | |
| template<> | |
| double | crn::Cosine< ByteAngle > (uint8_t angle) noexcept |
| Cosine of a byte angle using a lookup table. More... | |
| template<> | |
| double | crn::Sine< ByteAngle > (uint8_t angle) noexcept |
| Sine of a byte angle using a lookup table. More... | |
| template<> | |
| double | crn::Tangent< ByteAngle > (uint8_t angle) noexcept |
| Tangent of a byte angle using a lookup table. More... | |
| template<typename Unit > | |
| Angle< Unit > | crn::operator+ (const Angle< Unit > &a1, const Angle< Unit > &a2) noexcept(std::is_nothrow_constructible< typename Unit::type >::value &&std::is_nothrow_copy_assignable< typename Unit::type >::value) |
| Adds two angles. More... | |
| template<typename Unit > | |
| Angle< Unit > | crn::operator- (const Angle< Unit > &a1, const Angle< Unit > &a2) noexcept(std::is_nothrow_constructible< typename Unit::type >::value &&std::is_nothrow_copy_assignable< typename Unit::type >::value) |
| Subtracts two angles. More... | |
| template<typename Unit > | |
| Angle< Unit > | crn::operator* (double f, const Angle< Unit > &a) noexcept(std::is_nothrow_constructible< typename Unit::type >::value &&std::is_nothrow_copy_assignable< typename Unit::type >::value) |
| Multiplies an scalar with an angle. More... | |
| template<class A > | |
| double | crn::Cos (const A &a) noexcept |
| double | crn::Cos (double a) noexcept |
| double | crn::Cos (uint8_t a) noexcept |
| template<class A > | |
| double | crn::Sin (const A &a) noexcept |
| double | crn::Sin (double a) noexcept |
| double | crn::Sin (uint8_t a) noexcept |
| template<class A > | |
| double | crn::Tan (const A &a) noexcept |
| double | crn::Tan (double a) noexcept |
| double | crn::Tan (uint8_t a) noexcept |
| template<class A > | |
| A | crn::Atan (double s, double c) noexcept |
| template<> | |
| double | crn::Atan< double > (double s, double c) noexcept |
| template<typename Unit > | |
| Unit::type | crn::AngularDistance (const Angle< Unit > &a1, const Angle< Unit > &a2) noexcept(std::is_nothrow_constructible< typename TypeInfo< typename Unit::type >::DiffType >::value &&std::is_nothrow_copy_assignable< typename TypeInfo< typename Unit::type >::DiffType >::value &&std::is_nothrow_constructible< typename Unit::type >::value) |
| Distance between two angles. More... | |
| double | crn::AngularDistance (double a1, double a2) noexcept |
| Distance between two angles. More... | |
| template<typename ITER > | |
| std::iterator_traits< ITER > ::value_type | crn::AngularMean (ITER beg, ITER en) |
| Mean of a set of angles. More... | |
| template<typename ITER > | |
| ITER | crn::AngularMedian (ITER beg, ITER en) |
| Mean of a set of angles. More... | |
| template<typename ITER > | |
| double | crn::AngularVariance (ITER beg, ITER en) |
| Variance of a set of angles. More... | |
| template<typename ITER > | |
| double | crn::AngularVariance (ITER beg, ITER en, typename std::iterator_traits< ITER >::value_type mean) |
| Variance of a set of angles. More... | |
| template<typename ITER > | |
| double | crn::CircularVariance (ITER beg, ITER en) |
| Circular (pseudo) variance of a set of angles. More... | |
| template<typename ITER > | |
| double | crn::CircularStdDev (ITER beg, ITER en) |
| Circular (pseudo) standard deviation of a set of angles. More... | |
| template<typename ITER > | |
| std::complex< double > | crn::TrigonometricMoment (ITER beg, ITER en, typename std::iterator_traits< ITER >::value_type refer, size_t p) |
| Trigonometric moment. More... | |
| template<typename ITER > | |
| double | crn::AngularSkewness (ITER beg, ITER en) |
| Skewness of a set of angles. More... | |
| template<typename ITER > | |
| double | crn::AngularKurtosis (ITER beg, ITER en) |
| Kurtosis of a set of angles. More... | |
| void | crn::FFT (std::vector< std::complex< double > > &sig, bool direct) |
| Fast Fourier transform. More... | |
| using crn::Unit = typedef typename ANGLE::unit |
Definition at line 259 of file CRNTrigonometry.h.
|
strong |
|
strong |
|
strong |
|
noexcept |
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
Distance between two angles.
Distance between two angles
Usage example: AngularDistance<ByteAngle>(35, Angle<ByteAngle>::TOP())
| [in] | a1 | first angle |
| [in] | a2 | second angle |
Definition at line 341 of file CRNTrigonometry.h.
|
inlinenoexcept |
Distance between two angles.
Distance between two angles
| [in] | a1 | first angle |
| [in] | a2 | second angle |
Definition at line 359 of file CRNTrigonometry.h.
| double crn::AngularKurtosis | ( | ITER | beg, |
| ITER | en | ||
| ) |
Kurtosis of a set of angles.
| ExceptionDomain | empty set of angles |
| [in] | beg | iterator on the first angle |
| [in] | en | iterator after the last angle |
Definition at line 530 of file CRNTrigonometry.h.
| std::iterator_traits<ITER>::value_type crn::AngularMean | ( | ITER | beg, |
| ITER | en | ||
| ) |
Mean of a set of angles.
| ExceptionDomain | empty set of angles |
| [in] | beg | iterator on the first angle |
| [in] | en | iterator after the last angle |
Definition at line 371 of file CRNTrigonometry.h.
| ITER crn::AngularMedian | ( | ITER | beg, |
| ITER | en | ||
| ) |
Mean of a set of angles.
| ExceptionDomain | empty set of angles |
| [in] | beg | iterator on the first angle |
| [in] | en | iterator after the last angle |
Definition at line 391 of file CRNTrigonometry.h.
| double crn::AngularSkewness | ( | ITER | beg, |
| ITER | en | ||
| ) |
Skewness of a set of angles.
| ExceptionDomain | empty set of angles |
| [in] | beg | iterator on the first angle |
| [in] | en | iterator after the last angle |
Definition at line 514 of file CRNTrigonometry.h.
| double crn::AngularVariance | ( | ITER | beg, |
| ITER | en | ||
| ) |
Variance of a set of angles.
| ExceptionDomain | empty set of angles |
| [in] | beg | iterator on the first angle |
| [in] | en | iterator after the last angle |
Definition at line 416 of file CRNTrigonometry.h.
| double crn::AngularVariance | ( | ITER | beg, |
| ITER | en, | ||
| typename std::iterator_traits< ITER >::value_type | mean | ||
| ) |
Variance of a set of angles.
| ExceptionDomain | empty set of angles |
| [in] | beg | iterator on the first angle |
| [in] | en | iterator after the last angle |
| [in] | mean | the mean of the set of angles |
Definition at line 437 of file CRNTrigonometry.h.
|
inlinenoexcept |
Definition at line 328 of file CRNTrigonometry.h.
|
inlinenoexcept |
Definition at line 330 of file CRNTrigonometry.h.
|
inline |
| double crn::CircularStdDev | ( | ITER | beg, |
| ITER | en | ||
| ) |
Circular (pseudo) standard deviation of a set of angles.
| ExceptionDomain | empty set of angles |
| [in] | beg | iterator on the first angle |
| [in] | en | iterator after the last angle |
Definition at line 476 of file CRNTrigonometry.h.
| double crn::CircularVariance | ( | ITER | beg, |
| ITER | en | ||
| ) |
Circular (pseudo) variance of a set of angles.
| ExceptionDomain | empty set of angles |
| [in] | beg | iterator on the first angle |
| [in] | en | iterator after the last angle |
Definition at line 456 of file CRNTrigonometry.h.
|
inlinenoexcept |
Definition at line 310 of file CRNTrigonometry.h.
|
inlinenoexcept |
Definition at line 312 of file CRNTrigonometry.h.
|
inlinenoexcept |
Definition at line 314 of file CRNTrigonometry.h.
|
inlinenoexcept |
Cosine of an angle.
| [in] | angle | the angle in the unit given in template |
Definition at line 61 of file CRNTrigonometry.h.
|
inlinenoexcept |
Cosine of a byte angle using a lookup table.
| [in] | angle | the angle in [0..255] |
Definition at line 88 of file CRNTrigonometry.h.
| double crn::Distance | ( | T | o1, |
| T | o2 | ||
| ) |
| void crn::FFT | ( | std::vector< std::complex< double > > & | sig, |
| bool | direct | ||
| ) |
Fast Fourier transform.
Fast Fourier transform
| ExceptionDimension | signal does not have a power of 2 size |
| [in] | sig | the signal to process |
| [in] | direct | direct=true, inverse=false |
Definition at line 98 of file CRNMatrixComplex.cpp.
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inlinenoexcept |
Multiplies an scalar with an angle.
Definition at line 284 of file CRNTrigonometry.h.
|
inlinenoexcept |
Adds two angles.
Definition at line 262 of file CRNTrigonometry.h.
|
inlinenoexcept |
Subtracts two angles.
Definition at line 273 of file CRNTrigonometry.h.
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
|
inline |
|
inline |
|
noexcept |
|
inlinenoexcept |
Definition at line 316 of file CRNTrigonometry.h.
|
inlinenoexcept |
Definition at line 318 of file CRNTrigonometry.h.
|
inlinenoexcept |
Definition at line 320 of file CRNTrigonometry.h.
|
inlinenoexcept |
Sine of an angle.
| [in] | angle | the angle in the unit given in template |
Definition at line 70 of file CRNTrigonometry.h.
|
inlinenoexcept |
Sine of a byte angle using a lookup table.
| [in] | angle | the angle in [0..255] |
Definition at line 105 of file CRNTrigonometry.h.
|
noexcept |
|
inlinenoexcept |
Definition at line 322 of file CRNTrigonometry.h.
|
inlinenoexcept |
Definition at line 324 of file CRNTrigonometry.h.
|
inlinenoexcept |
Definition at line 326 of file CRNTrigonometry.h.
|
inlinenoexcept |
Tangent of an angle.
| [in] | angle | the angle in the unit given in template |
Definition at line 79 of file CRNTrigonometry.h.
|
inlinenoexcept |
Tangent of a byte angle using a lookup table.
| [in] | angle | the angle in [0..255] |
Definition at line 122 of file CRNTrigonometry.h.
|
noexcept |
|
noexcept |
|
noexcept |
Constructor from direction
| [in] | d | the direction to import. LEFT and RIGHT map to HORIZONTAL. TOP and BOTTOM map to VERTICAL. Others map to INVALID. |
Definition at line 31 of file CRNMath.cpp.
| std::complex<double> crn::TrigonometricMoment | ( | ITER | beg, |
| ITER | en, | ||
| typename std::iterator_traits< ITER >::value_type | refer, | ||
| size_t | p | ||
| ) |
Trigonometric moment.
| ExceptionDomain | empty set of angles |
| ExceptionInvalidArgument | null order |
| [in] | beg | iterator on the first angle |
| [in] | en | iterator after the last angle |
| [in] | refer | the reference angle (typically, the mean angle) |
| [in] | p | the order of the moment (>= 1) |
Definition at line 490 of file CRNTrigonometry.h.
1.8.6