Skip to content

Efficiently obtain subtree for interval-tree #14

Description

@FiV0

Hey, I was wondering if the current implementation would permit to get extended to efficiently obtain a subtree. Something along the lines of

(def x (dean/interval-map {[1 3] :x1
                           [4 7] :x2
                           [8 9] :x3
                           [0 5] :x4
                           [6 8] :x5
                           [9 9] :x6
                           [3 9] :x7
                           [4 5] :x8}))

(dean/subtree x [5 5]) ; => {[4 7] :x2 [0 5] :x4 [3 9] :x7 [4 5] :x8}

by efficient I mean at the order of log(n), where n is the number of intervals in the original tree.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions