Cluster¶
-
template<typename T, uint8_t ClusterSizeX, uint8_t ClusterSizeY, typename CoordType = uint16_t>
struct Cluster¶ Cluster struct.
Public Functions
Public Members
-
std::array<T, ClusterSizeX * ClusterSizeY> data¶
Cluster data stored in row-major order starting from top-left.
Public Static Attributes
-
static constexpr uint8_t cluster_size_x = ClusterSizeX¶
-
static constexpr uint8_t cluster_size_y = ClusterSizeY¶
-
std::array<T, ClusterSizeX * ClusterSizeY> data¶
Free Functions:
-
template<typename T, uint8_t ClusterSizeX, uint8_t ClusterSizeY, typename CoordType = int16_t>
Cluster<T, 3, 3, CoordType> aare::reduce_to_3x3(const Cluster<T, ClusterSizeX, ClusterSizeY, CoordType> &c)¶ Reduce a cluster to the 3x3 block around its center index.
- Parameters:
c – Cluster to reduce
- Pre:
ClusterSizeX and ClusterSizeY must both be at least 3, and at least one must be greater than 3.
- Returns:
Reduced cluster with the input coordinates are preserved.
-
template<typename T, uint8_t ClusterSizeX, uint8_t ClusterSizeY, typename CoordType = uint16_t>
Cluster<T, 2, 2, CoordType> aare::reduce_to_2x2(const Cluster<T, ClusterSizeX, ClusterSizeY, CoordType> &c)¶ Reduce a cluster to its highest-sum center-adjacent 2x2 block.
Note
The cluster is filled using row major ordering starting at the top-left
- Parameters:
c – Cluster to reduce
- Returns:
Reduced cluster with the input coordinates