Function tskit::bindings::tsk_treeseq_init
source · pub unsafe extern "C" fn tsk_treeseq_init(
self_: *mut tsk_treeseq_t,
tables: *mut tsk_table_collection_t,
options: tsk_flags_t
) -> c_int
Expand description
@brief Initialises the tree sequence based on the specified table collection.
@rst
This method will copy the supplied table collection unless :c:macro:TSK_TAKE_OWNERSHIP
is specified. The table collection will be checked for integrity and index maps built.
This must be called before any operations are performed on the tree sequence.
See the :ref:sec_c_api_overview_structure
for details on how objects
are initialised and freed.
If specified, TSK_TAKE_OWNERSHIP takes immediate ownership of the tables, regardless of error conditions.
Options**
- :c:macro:
TSK_TS_INIT_BUILD_INDEXES
- :c:macro:
TSK_TAKE_OWNERSHIP
(applies to the table collection). @endrst
@param self A pointer to an uninitialised tsk_table_collection_t object. @param tables A pointer to a tsk_table_collection_t object. @param options Allocation time options. See above for details. @return Return 0 on success or a negative value on failure.