Struct tskit::NodeTable [−][src]
pub struct NodeTable<'a> { /* fields omitted */ }
Expand description
An immtable view of a node table.
These are not created directly.
Instead, use TableCollection::nodes
to get a reference to an existing node table;
Implementations
Return the number of rows
Return the time
value from row row
of the table.
Errors
Will return IndexError
if row
is out of range.
Return the flags
value from row row
of the table.
Errors
Will return IndexError
if row
is out of range.
Mutable access to node flags.
Mutable access to node times.
pub fn population<N: Into<NodeId> + Copy>(
&'a self,
row: N
) -> Result<PopulationId, TskitError>
pub fn population<N: Into<NodeId> + Copy>(
&'a self,
row: N
) -> Result<PopulationId, TskitError>
Return the population
value from row row
of the table.
Errors
Will return IndexError
if row
is out of range.
Return the population
value from row row
of the table.
Errors
Will return IndexError
if row
is out of range.
pub fn individual<N: Into<NodeId> + Copy>(
&'a self,
row: N
) -> Result<IndividualId, TskitError>
pub fn individual<N: Into<NodeId> + Copy>(
&'a self,
row: N
) -> Result<IndividualId, TskitError>
Return the individual
value from row row
of the table.
Errors
Will return IndexError
if row
is out of range.
Return an iterator over rows of the table.
The value of the iterator is NodeTableRow
.
Return row r
of the table.
Parameters
r
: the row id.
Errors
TskitError::IndexError
if r
is out of range.
Obtain a vector containing the indexes (“ids”)
of all nodes for which crate::TSK_NODE_IS_SAMPLE
is true
.
Obtain a vector containing the indexes (“ids”) of all nodes satisfying a certain criterion.