Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ChangeDimension for counter matrizes wrong #5

Open
cha87de opened this issue May 1, 2019 · 1 comment
Open

ChangeDimension for counter matrizes wrong #5

cha87de opened this issue May 1, 2019 · 1 comment
Labels
bug Something isn't working

Comments

@cha87de
Copy link
Owner

cha87de commented May 1, 2019

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!
}
@cha87de
Copy link
Owner Author

cha87de commented May 1, 2019

@cha87de cha87de added the bug Something isn't working label May 1, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant