classification_result.hpp
1 #pragma once
2 
3 #include "../_cexports/c_polimago.h"
4 
5 #include "../global.hpp"
6 #include "../string.hpp"
7 
8 namespace Cvb
9 {
10 CVB_BEGIN_INLINE_NS
11 
13 namespace Polimago
14 {
15 
17 
20 {
21 public:
22  ClassificationResult (const String &name, double quality)
23  : name_ (name), quality_ (quality)
24  {}
25 
26  ClassificationResult () noexcept
27  : name_ (), quality_ (0.0)
28  {}
29 
30 public:
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 
74 private:
75  String name_;
76  double quality_;
77 };
78 
79 
80 
81 } /* namespace Polimago */
82 CVB_END_INLINE_NS
83 } /* namespace Cvb */
bool operator!=(const ClassificationResult &other) const noexcept
Compares to an other classification result.
Definition: classification_result.hpp:69
STL class.
Root namespace for the Image Manager interface.
Definition: version.hpp:11
Polimago classification result container.
Definition: classification_result.hpp:19
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:58
String Name() const
Name of the pattern.
Definition: classification_result.hpp:36