Defines the gender column lookup table data type.
More...
#include <gender_table.h>
template<core::Numerical ROW, core::Numerical TYPE>
class hgps::GenderTable< ROW, TYPE >
Defines the gender column lookup table data type.
- Template Parameters
-
ROW | The rows value type |
TYPE | The cell value type |
◆ GenderTable() [1/2]
template<core::Numerical ROW, core::Numerical TYPE>
◆ GenderTable() [2/2]
template<core::Numerical ROW, core::Numerical TYPE>
Initialises a new instance of the GenderTable class.
- Parameters
-
rows | The monotonic rows lookup breakpoints |
cols | The gender columns lookup breakpoints |
values | The full lookup-table values |
- Exceptions
-
std::invalid_argument | for lookup breakpoints and values table size mismatch |
◆ at() [1/2]
template<core::Numerical ROW, core::Numerical TYPE>
Gets a value at a given row and column intersection.
- Parameters
-
row | The reference row |
gender | The reference column |
- Returns
- The lookup value
- Exceptions
-
std::out_of_range | for accessing unknown lookup breakpoints |
◆ at() [2/2]
template<core::Numerical ROW, core::Numerical TYPE>
Gets a read-only value at a given row and column intersection.
- Parameters
-
row | The reference row |
gender | The reference column |
- Returns
- The lookup value
- Exceptions
-
std::out_of_range | for accessing unknown lookup breakpoints |
◆ columns()
template<core::Numerical ROW, core::Numerical TYPE>
Get the number of columns lookup breakpoints.
- Returns
- Number of columns
◆ contains() [1/2]
template<core::Numerical ROW, core::Numerical TYPE>
Determines whether the lookup contains a row.
- Parameters
-
row | The row breakpoint value |
- Returns
- true, if the lookup contains the row; otherwise, false
◆ contains() [2/2]
template<core::Numerical ROW, core::Numerical TYPE>
Determines whether the lookup contains a value.
- Parameters
-
row | The row breakpoint value |
gender | The column breakpoint value |
- Returns
- true, if the lookup contains the value; otherwise, false
◆ empty()
template<core::Numerical ROW, core::Numerical TYPE>
Determine whether the lookup table is empty.
- Returns
- true, if the lookup data is empty; otherwise, false
◆ operator()() [1/2]
template<core::Numerical ROW, core::Numerical TYPE>
Gets a value at a given row and column intersection.
- Parameters
-
row | The reference row |
gender | The reference column |
- Returns
- The lookup value
- Exceptions
-
std::out_of_range | for accessing unknown lookup breakpoints |
◆ operator()() [2/2]
template<core::Numerical ROW, core::Numerical TYPE>
Gets a read-only value at a given row and column intersection.
- Parameters
-
row | The reference row |
gender | The reference column |
- Returns
- The lookup value
- Exceptions
-
std::out_of_range | for accessing unknown lookup breakpoints |
◆ rows()
template<core::Numerical ROW, core::Numerical TYPE>
Get the number of rows lookup breakpoints.
- Returns
- Number of rows
◆ size()
template<core::Numerical ROW, core::Numerical TYPE>
Gets the lookup table size.
- Returns
- Lookup table size
The documentation for this class was generated from the following file: