Skip to content

Conversion between data structures and BitVec #31

@arnsholt

Description

@arnsholt

I'm using vers-vecs for a project, and it's great, but one part of the project is shaping up to really, really want to be implemented in terms of taking a constructed tree and replacing a node with another tree, or replacing the children of a node with some other trees (this is looking down the line, so I'm not sure of the exact needs. Some cases I can work around, but some are looking like they really need to do this kind of stuff). Is this something you'd be open to considering a PR for?

I'm happy to write up a PR with a suggested implementation and such, but before getting into the weeds of that I thought some discussion would be good, since I assume you'll have opinions on the API, or maybe even don't want the functionality at all in the library.

An alternative which would make it possible to for users of the library to implement this kind of stuff on their own would be to make it possible to convert the succinct datatypes "backwards". For example for BpTree if it had a method like:

fn into_rsvec(self) -> RsVec {
    self.vec
}

and probably similar for RsVec -> BitVec, it'd be possible to compute the needed operations on the succinct structures, decay them to simpler datatypes, do the surgery required, and rebuild the succinct structures.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions