Reduce public api of orx-gradient-descent
This commit is contained in:
@@ -89,9 +89,9 @@ private fun norm2(x: DoubleArray): Double {
|
|||||||
return sqrt(x.sumByDouble { it * it })
|
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,
|
class MinimizationResult(val solution: DoubleArray, val value: Double, val gradient: DoubleArray,
|
||||||
val inverseHessian: Array<DoubleArray>, val iterations: Int)
|
val inverseHessian: Array<DoubleArray>, val iterations: Int)
|
||||||
|
|||||||
Reference in New Issue
Block a user