Skip to content

[MISC] Layout object structure of user bins. #191

Description

@smehringer

Currently, we are indirectly requiring that the user bin ids are sequentially.
That means, if there are 5 user bins, we assume that the ids are ids = [0,1,2,3,4].

(Side question: is that fine? We think yes)

Current layout structure of layout::layout::user_bin is

    struct user_bin
    {
        std::vector<size_t> previous_TB_indices{}; // previous technical bin indices which refer to merged bin indices.
        size_t storage_TB_id{};                    // id of the technical bin that the user bin is actuallly stored in
        size_t number_of_technical_bins{};         // 1 == single bin, >1 == split_bin
        size_t idx{};                              // The index of the user bin corresponding to the order in data
    };

storing its own index.

But if we know that user bins ids are contiguous and sequential we could indirectly store the index of the user bin as its position.

E.g. user_bin.idx = position i of user bin in layout::user_bins[i]

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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