Function demes::ffi::demes_graph_into_generations
source · #[no_mangle]
pub unsafe extern "C" fn demes_graph_into_generations(
graph: &Graph,
error: &mut FFIError,
output: *mut *mut Graph
) -> c_int
Expand description
Generate a copy of a Graph
with time units changed to generations.
§Returns
- 0 upon success
- non-zero upon error
§Safety
output
must point to a mutable pointer to aGraph
§Side effects
output
is overwritten to point to the modified graph upon success.output
is overwritten with a NULL pointer upon failure.
§Errors
If the time unit of an event differs sufficiently in
magnitude from the generation_time
, it is possible
that conversion results in epochs (or migration
durations) of length zero, which will return an error.
If any field is unresolved, an error will be returned.