Function forrustts::validate_edge_table[][src]

pub fn validate_edge_table(
    len: Position,
    edges: &[Edge],
    nodes: &[Node]
) -> TablesResult<bool>

Perform a data integrity check on an EdgeTable.

This checks, amongst other things, the sorting order of the edges.

Parameters

Return

Returns Ok(true) if the tables pass all tests. This return value allows this function to be used in things like debug_assert.

Errors

Will return TablesError if the tables are not valid.

Example

let mut tables = forrustts::TableCollection::new(100).unwrap();
// (do some stuff now...)
let rv = forrustts::validate_edge_table(tables.genome_length(),
                                        &tables.edges(),
                                        &tables.nodes()).unwrap();
assert_eq!(rv, true);