Repository navigation
Expand file tree
/
Copy pathbag_vrnodedescriptor.h
More file actions
80 lines (62 loc) · 2.86 KB
/
Copy pathbag_vrnodedescriptor.h
File metadata and controls
80 lines (62 loc) · 2.86 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
#ifndef BAG_VRNODEDESCRIPTOR_H
#define BAG_VRNODEDESCRIPTOR_H
#include "bag_config.h"
#include "bag_fordec.h"
#include "bag_layerdescriptor.h"
namespace BAG {
//! Describe the variable resolution node.
class BAG_API VRNodeDescriptor final : public LayerDescriptor
{
public:
VRNodeDescriptor(const VRNodeDescriptor&) = delete;
VRNodeDescriptor(VRNodeDescriptor&&) = delete;
VRNodeDescriptor& operator=(const VRNodeDescriptor&) = delete;
VRNodeDescriptor& operator=(VRNodeDescriptor&&) = delete;
bool operator==(const VRNodeDescriptor &rhs) const noexcept {
return m_minHypStrength == rhs.m_minHypStrength &&
m_maxHypStrength == rhs.m_maxHypStrength &&
m_minNumHypotheses == rhs.m_minNumHypotheses &&
m_maxNumHypotheses == rhs.m_maxNumHypotheses &&
m_minNSamples == rhs.m_minNSamples &&
m_maxNSamples == rhs.m_maxNSamples;
}
bool operator!=(const VRNodeDescriptor &rhs) const noexcept {
return !(rhs == *this);
}
std::tuple<float, float> getMinMaxHypStrength() const noexcept;
std::tuple<uint32_t, uint32_t> getMinMaxNSamples() const noexcept;
std::tuple<uint32_t, uint32_t> getMinMaxNumHypotheses() const noexcept;
VRNodeDescriptor& setMinMaxHypStrength(float minHypStrength,
float maxHypStrength) & noexcept;
VRNodeDescriptor& setMinMaxNSamples(uint32_t minNSamples,
uint32_t maxNSamples) & noexcept;
VRNodeDescriptor& setMinMaxNumHypotheses(uint32_t minNumHypotheses,
uint32_t maxNumHypotheses) & noexcept;
protected:
VRNodeDescriptor(uint32_t id, uint32_t rows, uint32_t cols, uint64_t chunkSize,
int compressionLevel);
explicit VRNodeDescriptor(const Dataset& dataset, uint32_t rows, uint32_t cols);
static std::shared_ptr<VRNodeDescriptor> create(const Dataset& dataset,
uint64_t chunkSize, int compressionLevel);
static std::shared_ptr<VRNodeDescriptor> open(const Dataset& dataset,
uint32_t rows, uint32_t cols);
private:
DataType getDataTypeProxy() const noexcept override;
uint8_t getElementSizeProxy() const noexcept override;
//! The minimum hypotheses strength.
float m_minHypStrength = std::numeric_limits<float>::max();
//! The maximum hypotheses strength.
float m_maxHypStrength = std::numeric_limits<float>::lowest();
//! The minimum number of hypotheses.
uint32_t m_minNumHypotheses = std::numeric_limits<uint32_t>::max();
//! The maximum number of hypotheses.
uint32_t m_maxNumHypotheses = std::numeric_limits<uint32_t>::lowest();
//! The minimum number of samples..
uint32_t m_minNSamples = std::numeric_limits<uint32_t>::max();
//! The maximum number of samples.
uint32_t m_maxNSamples = std::numeric_limits<uint32_t>::lowest();
friend Dataset;
friend VRNode;
};
} // namespace BAG
#endif // BAG_VRNODEDESCRIPTOR_H