A Position with a row and column.
More...
#include <Location.h>
|
constexpr Idx | row () const noexcept |
| Row.
|
|
constexpr Idx | column () const noexcept |
| Column.
|
|
constexpr HashSize | hash () const noexcept |
| Hash derived from row and column.
|
|
constexpr bool | operator== (const Position &rhs) const noexcept |
| Equality operator.
|
|
constexpr bool | operator!= (const Position &rhs) const noexcept |
| Inequality operator.
|
|
|
constexpr | Position (const Topo &topo) noexcept |
| Construct with given hash that may contain data from subclasses.
|
|
|
static constexpr HashSize | doHash (const Idx row, const Idx column) noexcept |
| Create a hash from given values.
|
|
static constexpr Idx | unhashRow (const Topo hash) noexcept |
| Row from hash.
|
|
static constexpr Idx | unhashColumn (const Topo hash) noexcept |
| Column.
|
|
|
V | topo_data_ |
| Stored hash that contains row and column data.
|
|
|
static constexpr uint32_t | XYBits = std::bit_width<uint32_t>(MAX_ROWS - 1) |
| Number of bits to use for storing one coordinate of Position data.
|
|
static constexpr uint32_t | PositionBits = XYBits * 2 |
| Number of bits to use for storing Position data.
|
|
static constexpr Topo | ColumnMask = util::bit_mask<XYBits, Topo>() |
| Hash mask for bits being used for Position data.
|
|
static constexpr Topo | HashMask = util::bit_mask<PositionBits, Topo>() |
| Hash mask for bits being used for Position data.
|
|
template<class V>
class fs::topo::Position< V >
A Position with a row and column.
◆ Position()
template<class V >
|
inlineexplicitconstexprprotectednoexcept |
Construct with given hash that may contain data from subclasses.
- Parameters
-
◆ column()
template<class V >
|
inlinenodiscardconstexprnoexcept |
◆ doHash()
template<class V >
static constexpr HashSize fs::topo::Position< V >::doHash |
( |
const Idx | row, |
|
|
const Idx | column ) |
|
inlinestaticnodiscardconstexprprotectednoexcept |
Create a hash from given values.
- Parameters
-
- Returns
- Hash
◆ hash()
template<class V >
|
inlinenodiscardconstexprnoexcept |
Hash derived from row and column.
- Returns
- Hash derived from row and column
◆ operator!=()
template<class V >
|
inlinenodiscardconstexprnoexcept |
Inequality operator.
- Parameters
-
- Returns
- Whether or not these are not equivalent
◆ operator==()
template<class V >
|
inlinenodiscardconstexprnoexcept |
Equality operator.
- Parameters
-
- Returns
- Whether or not these are equivalent
◆ row()
template<class V >
|
inlinenodiscardconstexprnoexcept |
◆ unhashColumn()
template<class V >
|
inlinestaticnodiscardconstexprprotectednoexcept |
Column.
- Parameters
-
hash | hash to extract column from |
- Returns
- Column
◆ unhashRow()
template<class V >
|
inlinestaticnodiscardconstexprprotectednoexcept |
Row from hash.
- Parameters
-
hash | hash to extract row from |
- Returns
- Row from hash
The documentation for this class was generated from the following file: