Added Levenberg-Marquardt algorithm and svd Golub-Kahan #513

Merged
margarita0303 merged 35 commits from dev into dev 2023-06-19 16:11:59 +03:00
Showing only changes of commit e738fbc86d - Show all commits

View File

@ -63,9 +63,9 @@ fun generateNewParameters(p: MutableStructure2D<Double>, delta: Double): Mutable
suspend fun main(){ suspend fun main(){
val startData = getStartDataForFunc1() val startData = getStartDataForFunc1()
// Создание потока: // Создание потока:
val numberFlow = streamLm(::func1ForLm, startData, 1000) val lmFlow = streamLm(::func1ForLm, startData, 1000)
// Запуск потока // Запуск потока
numberFlow.collect { parameters -> lmFlow.collect { parameters ->
for (i in 0 until parameters.shape.component1()) { for (i in 0 until parameters.shape.component1()) {
val x = (parameters[i, 0] * 10000).roundToInt() / 10000.0 val x = (parameters[i, 0] * 10000).roundToInt() / 10000.0
print("$x ") print("$x ")