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