Function tskit::bindings::tsk_node_table_add_row
source · pub unsafe extern "C" fn tsk_node_table_add_row(
self_: *mut tsk_node_table_t,
flags: tsk_flags_t,
time: f64,
population: tsk_id_t,
individual: tsk_id_t,
metadata: *const c_char,
metadata_length: tsk_size_t
) -> tsk_id_t
Expand description
@brief Adds a row to this node table.
@rst
Add a new node with the specified flags
, time
, population
,
individual
and metadata
to the table. A copy of the metadata
parameter
is taken immediately. See the :ref:table definition <sec_node_table_definition>
for details of the columns in this table.
@endrst
@param self A pointer to a tsk_node_table_t object.
@param flags The bitwise flags for the new node.
@param time The time for the new node.
@param population The population for the new node. Set to TSK_NULL if not
known.
@param individual The individual for the new node. Set to TSK_NULL if not
known.
@param metadata The metadata to be associated with the new node. This
is a pointer to arbitrary memory. Can be NULL
if metadata_length
is 0.
@param metadata_length The size of the metadata array in bytes.
@return Return the ID of the newly added node on success,
or a negative value on failure.