Skip to content

Commit d2276fb

Browse files
committed
some fn for the nodetable
1 parent 04b1ba3 commit d2276fb

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

src/node_table.rs

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -807,6 +807,22 @@ impl NodeTable {
807807
/// Get the population column as a slice
808808
=> population, population_slice_raw, crate::sys::bindings::tsk_id_t);
809809

810+
pub fn individual_column(&self) -> crate::TableColumn<IndividualId> {
811+
crate::table_column::new_table_column(self.individual_slice())
812+
}
813+
814+
pub fn population_column(&self) -> crate::TableColumn<PopulationId> {
815+
crate::table_column::new_table_column(self.population_slice())
816+
}
817+
818+
pub fn time_column(&self) -> crate::TableColumn<Time> {
819+
crate::table_column::new_table_column(self.time_slice())
820+
}
821+
822+
pub fn flags_column(&self) -> crate::TableColumn<NodeFlags> {
823+
crate::table_column::new_table_column(self.flags_slice())
824+
}
825+
810826
/// Clear all data from the table
811827
pub fn clear(&mut self) -> Result<i32, TskitError> {
812828
handle_tsk_return_value!(self.table_.clear())

0 commit comments

Comments
 (0)