Skip to content

Remove tsk_diff_iter_t #2797

Open
Open
@jeromekelleher

Description

@jeromekelleher

After #2786 we don't actually use tsk_diff_iter_t at all in the library. As it's not part of the public API (and it causes some annoying problems internally, e.g. here) I would vote for removing it.

The only reason not to as far as I can see is that the Rust API currently uses it. The best outcome I think would be for the Rust API to start using the tsk_tree_position_t class as a replacement, which is probably ok?

The main problem with this I think is that the tsk_tree_position_t class only supports working from a tsk_treeseq_t, not a tsk_table_collection_t. The main reason for this is that it's useful to have the breakpoints array around. While we can do without the breakpoints for the simple prev and next operations, it would be much more awkward to do the general seek operations without it. So, I'd be inclined to keep things simple, and just have the tsk_tree_position_t depend on the tree sequence rather than table collection, but I guess we can imagine a way of just supported in next and prev if we don't have the breakpoints array.

Of course we can also just keep the tsk_diff_iter_t class.

What do you think @molpopgen?

Metadata

Metadata

Assignees

No one assigned

    Labels

    C APIIssue is about the C API

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions