optimatika / okAlgo

Idiomatic Kotlin extensions for ojAlgo
MIT License
26 stars 3 forks source link

GTE and LTE are inverted #4

Closed jcornaz closed 6 years ago

jcornaz commented 6 years ago

"GTE" means "Greater Than or Equals" ('>=') and "LTE" means "Lesser Than or Equals" ('<=') right?

So in x >= C, C is a lower bound and in x <= C, C is an upper bound right?

But currently okAlgo does the inverse:

infix fun GTE(number: Int): ExpressionBuilder {
    items += { upper(number) }
    return this
}

infix fun LTE(number: Int): ExpressionBuilder {
    items += { lower(number) }
    return this
}
thomasnield commented 6 years ago

That might be an issue, I'll check it as soon as possible. Feel free to put in a PR if you want to beat me.