Skip to content
This repository was archived by the owner on Oct 18, 2022. It is now read-only.
This repository was archived by the owner on Oct 18, 2022. It is now read-only.

WaveletTreeNoptrs incorrectly assumes max element gets mapped to max element #9

@fdlk

Description

@fdlk

Class WaveletTreeNoptrs allows me to specify a Mapper. I've implemented a custom mapper which maps most elements to 0 and a couple interesting ones to nonzero.

The constructor WaveletTreeNoptrs::WaveletTreeNoptrs(const Array & a, BitSequenceBuilder * bmb, Mapper * am) computes max_v = am->map(a.getMax()); and then sets height=bits(max_v);

When the maximum of the original values gets mapped to 0, the code sets the height of the tree to 0.

Perhaps I am missing the point but I suspect this is unintended?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions