Reduce public api of orx-gradient-descent

This commit is contained in:
edwin
2019-11-04 10:40:29 +01:00
parent 18e70b53e6
commit 7399f76eb5

View File

@@ -89,9 +89,9 @@ private fun norm2(x: DoubleArray): Double {
return sqrt(x.sumByDouble { it * it })
}
fun dot(x: DoubleArray, y: DoubleArray): Double = (x.mapIndexed { index, it -> it * y[index] }).sum()
private fun dot(x: DoubleArray, y: DoubleArray): Double = (x.mapIndexed { index, it -> it * y[index] }).sum()
fun dot(x: Array<DoubleArray>, y: DoubleArray): DoubleArray = DoubleArray(x.size) { dot(x[it], y) }
private fun dot(x: Array<DoubleArray>, y: DoubleArray): DoubleArray = DoubleArray(x.size) { dot(x[it], y) }
class MinimizationResult(val solution: DoubleArray, val value: Double, val gradient: DoubleArray,
val inverseHessian: Array<DoubleArray>, val iterations: Int)