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{
10 CVB_BEGIN_INLINE_NS
11
13 namespace Polimago
14 {
15
17
19 class ClassificationResult
20 {
21 public:
22 ClassificationResult(const String &name, double quality)
23 : name_(name)
24 , quality_(quality)
25 {
26 }
27
28 ClassificationResult() noexcept
29 : name_()
30 , quality_(0.0)
31 {
32 }
33
34 public:
36
40 String Name() const
41 {
42 return name_;
43 }
44
46
50 double Quality() const noexcept
51 {
52 return quality_;
53 }
54
56
61 bool operator==(const ClassificationResult &other) const noexcept
62 {
63 return (name_ == other.name_) && (quality_ == other.quality_);
64 }
65
67
72 bool operator!=(const ClassificationResult &other) const noexcept
73 {
74 return !(*this == other);
75 }
76
77 private:
78 String name_;
79 double quality_;
80 };
81
82 } /* namespace Polimago */
83 CVB_END_INLINE_NS
84} /* namespace Cvb */
String Name() const
Name of the pattern.
Definition classification_result.hpp:40
double Quality() const noexcept
Quality / Confidence of the classification result.
Definition classification_result.hpp:50
bool operator!=(const ClassificationResult &other) const noexcept
Compares to an other classification result.
Definition classification_result.hpp:72
bool operator==(const ClassificationResult &other) const noexcept
Compares to an other classification result.
Definition classification_result.hpp:61
Namespace for the Polimago package.
Definition classification_predictor.hpp:29
Root namespace for the Image Manager interface.
Definition c_bayer_to_rgb.h:17
std::string String
String for wide characters or unicode characters.
Definition string.hpp:49