A Position with a Slope, Aspect, and Fuel.
More...
#include <Cell.h>
|
| constexpr SpreadKey | fullHash () const |
| | Full stored hash that may contain data from subclasses.
|
| |
| constexpr | Cell (const SpreadKey hash) noexcept |
| | Construct from hash value.
|
| |
| constexpr | Cell (const SlopeSize slope, const AspectSize aspect, const FuelCodeSize &fuel) noexcept |
| | Construct based on given attributes.
|
| |
| constexpr SpreadKey | key () const noexcept |
| | A key defining Slope, Aspect, and Fuel, used for determining Cells that spread the same.
|
| |
| constexpr AspectSize | aspect () const noexcept |
| | Aspect (degrees)
|
| |
| constexpr FuelCodeSize | fuelCode () const noexcept |
| | Fuel.
|
| |
| constexpr SlopeSize | slope () const noexcept |
| | Slope (degrees)
|
| |
|
| static constexpr SpreadKey | hashCell (const SlopeSize slope, const AspectSize aspect, const FuelCodeSize &fuel) noexcept |
| | Hash attributes into a SpreadKey value.
|
| |
| static constexpr SpreadKey | key (const SpreadKey value) noexcept |
| | A key defining Slope, Aspect, and Fuel, used for determining Cells that spread the same.
|
| |
| static constexpr AspectSize | aspect (const SpreadKey value) noexcept |
| | Aspect (degrees)
|
| |
| static constexpr FuelCodeSize | fuelCode (const SpreadKey value) noexcept |
| | Fuel.
|
| |
| static constexpr SlopeSize | slope (const SpreadKey value) noexcept |
| | Slope (degrees)
|
| |
|
|
SpreadKey | data_ |
| | Stored hash that contains x and y data.
|
| |
|
|
static constexpr uint32_t | FuelShift = 0 |
| | Shift for fuel bitmask.
|
| |
|
static constexpr uint32_t | FuelBits = std::bit_width<uint32_t>(NUMBER_OF_FUELS) |
| | Number of bits in fuel bitmask.
|
| |
|
static constexpr SpreadKey | FuelBitMask = bit_mask<FuelBits, SpreadKey>() |
| | Bitmask for fuel information in SpreadKey before shift.
|
| |
|
static constexpr SpreadKey | FuelMask = FuelBitMask << FuelShift |
| | Bitmask for fuel information in SpreadKey.
|
| |
|
static constexpr uint32_t | AspectShift = FuelBits + FuelShift |
| | Shift for aspect bitmask.
|
| |
|
static constexpr uint32_t | AspectBits = std::bit_width<uint32_t>(MAX_ASPECT) |
| | Number of bits in aspect bitmask.
|
| |
|
static constexpr SpreadKey | AspectBitMask = bit_mask<AspectBits, SpreadKey>() |
| | Bitmask for aspect in SpreadKey before shift.
|
| |
|
static constexpr SpreadKey | AspectMask = AspectBitMask << AspectShift |
| | Bitmask for aspect in SpreadKey.
|
| |
|
static constexpr uint32_t | SlopeShift = AspectBits + AspectShift |
| | Shift for slope bitmask.
|
| |
|
static constexpr uint32_t | SlopeBits = std::bit_width<uint32_t>(MAX_SLOPE_FOR_DISTANCE) |
| | Number of bits in slope bitmask.
|
| |
|
static constexpr SpreadKey | SlopeBitMask = bit_mask<SlopeBits, SpreadKey>() |
| | Bitmask for slope in SpreadKey before shift.
|
| |
|
static constexpr SpreadKey | SlopeMask = SlopeBitMask << SlopeShift |
| | Bitmask for slope in SpreadKey.
|
| |
A Position with a Slope, Aspect, and Fuel.
◆ Cell() [1/2]
| fs::Cell::Cell |
( |
const SpreadKey | hash | ) |
|
|
inlineexplicitconstexprnoexcept |
Construct from hash value.
- Parameters
-
| hash | Hash defining all attributes |
◆ Cell() [2/2]
| fs::Cell::Cell |
( |
const SlopeSize | slope, |
|
|
const AspectSize | aspect, |
|
|
const FuelCodeSize & | fuel ) |
|
inlineconstexprnoexcept |
Construct based on given attributes.
- Parameters
-
| hash | Hash of x and y |
| slope | Slope |
| aspect | Aspect |
| fuel | Fuel |
◆ aspect() [1/2]
| AspectSize fs::Cell::aspect |
( |
| ) |
const |
|
inlinenodiscardconstexprnoexcept |
Aspect (degrees)
- Returns
- Aspect (degrees)
◆ aspect() [2/2]
| static constexpr AspectSize fs::Cell::aspect |
( |
const SpreadKey | value | ) |
|
|
inlinestaticnodiscardconstexprnoexcept |
Aspect (degrees)
- Parameters
-
| value | SpreadKey to extract from |
- Returns
- Aspect (degrees)
◆ fuelCode() [1/2]
| FuelCodeSize fs::Cell::fuelCode |
( |
| ) |
const |
|
inlinenodiscardconstexprnoexcept |
◆ fuelCode() [2/2]
| static constexpr FuelCodeSize fs::Cell::fuelCode |
( |
const SpreadKey | value | ) |
|
|
inlinestaticnodiscardconstexprnoexcept |
Fuel.
- Parameters
-
| value | SpreadKey to extract from |
- Returns
- Fuel
◆ fullHash()
| SpreadKey fs::Cell::fullHash |
( |
| ) |
const |
|
inlinenodiscardconstexpr |
Full stored hash that may contain data from subclasses.
- Returns
- Full stored hash that may contain data from subclasses
◆ hashCell()
| static constexpr SpreadKey fs::Cell::hashCell |
( |
const SlopeSize | slope, |
|
|
const AspectSize | aspect, |
|
|
const FuelCodeSize & | fuel ) |
|
inlinestaticnodiscardconstexprnoexcept |
Hash attributes into a SpreadKey value.
- Parameters
-
| slope | Slope |
| aspect | Aspect |
| fuel | Fuel |
- Returns
- Hash
◆ key() [1/2]
| SpreadKey fs::Cell::key |
( |
| ) |
const |
|
inlinenodiscardconstexprnoexcept |
A key defining Slope, Aspect, and Fuel, used for determining Cells that spread the same.
- Returns
- A key defining Slope, Aspect, and Fuel
◆ key() [2/2]
| static constexpr SpreadKey fs::Cell::key |
( |
const SpreadKey | value | ) |
|
|
inlinestaticnodiscardconstexprnoexcept |
A key defining Slope, Aspect, and Fuel, used for determining Cells that spread the same.
- Parameters
-
| value | SpreadKey to extract from |
- Returns
- A key defining Slope, Aspect, and Fuel
◆ slope() [1/2]
| SlopeSize fs::Cell::slope |
( |
| ) |
const |
|
inlinenodiscardconstexprnoexcept |
Slope (degrees)
- Returns
- Slope (degrees)
◆ slope() [2/2]
| static constexpr SlopeSize fs::Cell::slope |
( |
const SpreadKey | value | ) |
|
|
inlinestaticnodiscardconstexprnoexcept |
Slope (degrees)
- Parameters
-
| value | SpreadKey to extract from |
- Returns
- Slope (degrees)
The documentation for this class was generated from the following file: