Function tskit::bindings::tsk_site_table_add_row[][src]

pub unsafe extern "C" fn tsk_site_table_add_row(
    self_: *mut tsk_site_table_t,
    position: f64,
    ancestral_state: *const c_char,
    ancestral_state_length: tsk_size_t,
    metadata: *const c_char,
    metadata_length: tsk_size_t
) -> tsk_id_t

@brief Adds a row to this site table.

@rst Add a new site with the specified position, ancestral_state and metadata to the table. Copies of ancestral_state and metadata are immediately taken. See the :ref:table definition <sec_site_table_definition> for details of the columns in this table. @endrst

@param self A pointer to a tsk_site_table_t object. @param position The position coordinate for the new site. @param ancestral_state The ancestral_state for the new site. @param ancestral_state_length The length of the ancestral_state in bytes. @param metadata The metadata to be associated with the new site. 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 site on success, or a negative value on failure.