CVB++ 15.0
classification_result.hpp
1#pragma once
2
3#include "../_cexports/c_polimago.h"
4
5#include "../global.hpp"
6#include "../string.hpp"
7
8namespace Cvb
9{
10CVB_BEGIN_INLINE_NS
11
13namespace Polimago
14{
15
17
20{
21public:
22 ClassificationResult (const String &name, double quality)
23 : name_ (name), quality_ (quality)
24 {}
25
26 ClassificationResult () noexcept
27 : name_ (), quality_ (0.0)
28 {}
29
30public:
32
36 String Name () const
37 {
38 return name_;
39 }
40
42
46 double Quality () const noexcept
47 {
48 return quality_;
49 }
50
51
53
58 bool operator== (const ClassificationResult &other) const noexcept
59 {
60 return (name_ == other.name_) && (quality_ == other.quality_);
61 }
62
64
69 bool operator!= (const ClassificationResult &other) const noexcept
70 {
71 return !(*this == other);
72 }
73
74private:
75 String name_;
76 double quality_;
77};
78
79
80
81} /* namespace Polimago */
82CVB_END_INLINE_NS
83} /* namespace Cvb */
Polimago classification result container.
Definition: classification_result.hpp:20
String Name() const
Name of the pattern.
Definition: classification_result.hpp:36
double Quality() const noexcept
Quality / Confidence of the classification result.
Definition: classification_result.hpp:46
bool operator!=(const ClassificationResult &other) const noexcept
Compares to an other classification result.
Definition: classification_result.hpp:69
bool operator==(const ClassificationResult &other) const noexcept
Compares to an other classification result.
Definition: classification_result.hpp:58
Root namespace for the Image Manager interface.
Definition: c_barcode.h:24