Hi I am tying to use the apache commons math lib to solve systems of linear equations. To this end I have this code
var t: Array<Array<Double>> = arrayOf(
arrayOf(1.0,2.0),
arrayOf(1.0,2.0),
arrayOf(1.0,2.0))
var n: RealMatrix = MatrixUtils.createRealMatrix(t)
but I get following error
e: file:///home/td/NLO3/src/main/kotlin/Function.kt:210:58 Type mismatch: inferred type is Array<Array<Double>> but Array<(out) DoubleArray!>! was expected
changing t's type to
Array<(out) DoubleArray!>!
did not help. Does anyone have an idea how to fix that. If there is an easier solution e.g. maybe an mathlib in Kotlin I am also interested in that
Thank you very much for your time