Function tskit::bindings::tsk_individual_table_add_row [−][src]
pub unsafe extern "C" fn tsk_individual_table_add_row(
self_: *mut tsk_individual_table_t,
flags: tsk_flags_t,
location: *const f64,
location_length: tsk_size_t,
parents: *const tsk_id_t,
parents_length: tsk_size_t,
metadata: *const c_char,
metadata_length: tsk_size_t
) -> tsk_id_t
Expand description
@brief Adds a row to this individual table.
@rst
Add a new individual with the specified flags
, location
, parents
and
metadata
to the table. Copies of the location
, parents
and metadata
parameters are taken immediately. See the :ref:table definition <sec_individual_table_definition>
for details of the columns in this table.
@endrst
@param self A pointer to a tsk_individual_table_t object.
@param flags The bitwise flags for the new individual.
@param location A pointer to a double array representing the spatial location
of the new individual. Can be NULL
if location_length
is 0.
@param location_length The number of dimensions in the locations position.
Note this the number of elements in the corresponding double array
not the number of bytes.
@param parents A pointer to a tsk_id
array representing the parents
of the new individual. Can be NULL
if parents_length
is 0.
@param parents_length The number of parents.
Note this the number of elements in the corresponding tsk_id
array
not the number of bytes.
@param metadata The metadata to be associated with the new individual. 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 individual on success,
or a negative value on failure.