Function tskit::bindings::tsk_population_table_add_row
source · pub unsafe extern "C" fn tsk_population_table_add_row(
self_: *mut tsk_population_table_t,
metadata: *const c_char,
metadata_length: tsk_size_t
) -> tsk_id_t
Expand description
@brief Adds a row to this population table.
@rst
Add a new population with the specified metadata
to the table. A copy of the
metadata
is immediately taken. See the :ref:table definition <sec_population_table_definition>
for details of the columns in this table.
@endrst
@param self A pointer to a tsk_population_table_t object.
@param metadata The metadata to be associated with the new population. 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 population on success,
or a negative value on failure.