Skip to content

ChangeDimension for counter matrizes wrong #5

@cha87de

Description

@cha87de

The change dimension (needed for non-fixed min/max boundaries) is not working correctly when multiple small extensions of the min/max area appear successively.

Example:

ChangeDimension(
    ChangeDimension(map[string][]int64{
        "3": []int64{0, 0, 0, 145},
    }, models.TSStats{
        Min: 50, Max: 55,
    }, models.TSStats{
        Min: 40, Max: 90,
    }, 4),

    models.TSStats{
        Min: 40, Max: 90,
    }, models.TSStats{
        Min: 0, Max: 100,
    }, 4
)

Result:

map[string][]int64{
    // "2": []int64{0, 0, 145, 0},  // THIS IS RIGHT
    "3": []int64{0, 0, 0, 145}, // THIS IS WRONG BUT RETURNED!
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions