#[no_mangle]
pub extern "C" fn sg_partial_path_database_add_partial_paths(
graph: *const sg_stack_graph,
partials: *mut sg_partial_path_arena,
db: *mut sg_partial_path_database,
count: usize,
paths: *const sg_partial_path,
out: *mut sg_partial_path_handle
)
Expand description
Adds new partial paths to the partial path database. paths
is the array of partial paths
that you want to add; count
is the number of them.
We copy the partial path content into the partial path database. The array you pass in does not need to outlive the call to this function.
You should take care not to add a partial path to the database multiple times. This won’t cause an error, in that nothing will break, but it will probably cause you to get duplicate paths from the path-stitching algorithm.
You must also provide an out
array, which must also have room for count
elements. We will
fill this array in with the sg_partial_path_edge_list
instances for each partial path edge
list that is created.