Struct tskit::EdgeTable [−][src]
pub struct EdgeTable<'a> { /* fields omitted */ }
Expand description
An immutable view of an edge table.
These are not created directly.
Instead, use TableCollection::edges
to get a reference to an existing edge table;
Implementations
impl<'a> EdgeTable<'a>
[src]
impl<'a> EdgeTable<'a>
[src]pub fn num_rows(&'a self) -> tsk_size_t
[src]
pub fn num_rows(&'a self) -> tsk_size_t
[src]Return the number of rows
pub fn parent(&'a self, row: tsk_id_t) -> Result<tsk_id_t, TskitError>
[src]
pub fn parent(&'a self, row: tsk_id_t) -> Result<tsk_id_t, TskitError>
[src]Return the parent
value from row row
of the table.
Errors
Will return IndexError
if row
is out of range.
pub fn child(&'a self, row: tsk_id_t) -> Result<tsk_id_t, TskitError>
[src]
pub fn child(&'a self, row: tsk_id_t) -> Result<tsk_id_t, TskitError>
[src]Return the child
value from row row
of the table.
Errors
Will return IndexError
if row
is out of range.
pub fn left(&'a self, row: tsk_id_t) -> Result<f64, TskitError>
[src]
pub fn left(&'a self, row: tsk_id_t) -> Result<f64, TskitError>
[src]Return the left
value from row row
of the table.
Errors
Will return IndexError
if row
is out of range.
pub fn right(&'a self, row: tsk_id_t) -> Result<f64, TskitError>
[src]
pub fn right(&'a self, row: tsk_id_t) -> Result<f64, TskitError>
[src]Return the right
value from row row
of the table.
Errors
Will return IndexError
if row
is out of range.
pub fn metadata<T: MetadataRoundtrip>(
&'a self,
row: tsk_id_t
) -> Result<Option<T>, TskitError>
[src]
&'a self,
row: tsk_id_t
) -> Result<Option<T>, TskitError>
pub fn iter(&self) -> TableIterator<&'_ EdgeTable<'_>>
[src]
pub fn iter(&self) -> TableIterator<&'_ EdgeTable<'_>>
[src]Return an iterator over rows of the table.
The value of the iterator is EdgeTableRow
.
pub fn row(&self, r: tsk_id_t) -> Result<EdgeTableRow, TskitError>
[src]
pub fn row(&self, r: tsk_id_t) -> Result<EdgeTableRow, TskitError>
[src]Return row r
of the table.
Parameters
r
: the row id.
Errors
TskitError::IndexError
if r
is out of range.