Struct tskit::PopulationTable [−][src]
pub struct PopulationTable<'a> { /* fields omitted */ }
Expand description
An immutable view of site table.
These are not created directly.
Instead, use TableCollection::populations
to get a reference to an existing population table;
Implementations
Return the number of rows.
pub fn metadata<T: MetadataRoundtrip>(
&'a self,
row: PopulationId
) -> Result<Option<T>, TskitError>
Return an iterator over rows of the table.
The value of the iterator is PopulationTableRow
.
pub fn row<P: Into<PopulationId> + Copy>(
&self,
r: P
) -> Result<PopulationTableRow, TskitError>
pub fn row<P: Into<PopulationId> + Copy>(
&self,
r: P
) -> Result<PopulationTableRow, TskitError>
Return row r
of the table.
Parameters
r
: the row id.
Errors
TskitError::IndexError
if r
is out of range.