12 #include <unordered_map> 29 bool IsEmpty()
const {
return m_GuidToRangesMap.empty(); }
32 bool HasRanges(
LayerGuid guid)
const {
return m_GuidToRangesMap.find(guid) != m_GuidToRangesMap.end(); }
50 using MinMaxRanges = std::vector<MinMaxRange>;
53 MinMaxRange DefaultRange()
const {
return std::make_pair(-15.0f, 15.0f); }
56 std::unordered_map<LayerGuid, MinMaxRanges> m_GuidToRangesMap;
58 bool m_DynamicMode =
false;
Interface for a layer that is connectable to other layers via InputSlots and OutputSlots.
bool IsInDynamicMode() const
void ResetMinMax(LayerGuid guid, unsigned int idx, float newMin, float newMax)
Overwrite min and max in RangeTracker with newMin and newMax.
void RefineMax(LayerGuid guid, unsigned int slotIndex, float newMax)
Update max in RangeTracker with new_max if it is greater than current value.
Copyright (c) 2020 ARM Limited.
std::pair< float, float > MinMaxRange
MinMaxRange GetRange(LayerGuid guid, unsigned int idx) const
Retrieve the Range for a particular output slot on a particular layer.
void SetRange(const IConnectableLayer *layer, unsigned int outputIdx, float min, float max)
Set the range for an output slot on a layer.
bool HasRanges(LayerGuid guid) const
Query that there is an entry for a layer.
bool IsEmpty() const
Query function to check that the RangeTracker is empty.
void SetDynamicMode(bool flag)
void RefineMin(LayerGuid guid, unsigned int slotIndex, float newMin)
Update min in RangeTracker with new_min if it is lower than current value.