From 0fa73e1e9e4cca8cf4377d580bbfbcceb394d8c0 Mon Sep 17 00:00:00 2001 From: Roland Grinis Date: Wed, 14 Apr 2021 22:21:18 +0100 Subject: [PATCH] Drop unused code --- .../kotlin/space/kscience/kmath/tensors/core/checks.kt | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/kmath-tensors/src/commonMain/kotlin/space/kscience/kmath/tensors/core/checks.kt b/kmath-tensors/src/commonMain/kotlin/space/kscience/kmath/tensors/core/checks.kt index 45a71d1bc..730b6ed9a 100644 --- a/kmath-tensors/src/commonMain/kotlin/space/kscience/kmath/tensors/core/checks.kt +++ b/kmath-tensors/src/commonMain/kotlin/space/kscience/kmath/tensors/core/checks.kt @@ -2,7 +2,6 @@ package space.kscience.kmath.tensors.core import space.kscience.kmath.tensors.TensorAlgebra import space.kscience.kmath.tensors.TensorStructure -import kotlin.math.abs internal inline fun , @@ -71,13 +70,4 @@ internal inline fun DoubleLinearOpsTensorAlgebra.checkPositiveDefinite( check(mat.asTensor().detLU().value() > 0.0){ "Tensor contains matrices which are not positive definite ${mat.asTensor().detLU().value()}" } -} - -internal inline fun DoubleLinearOpsTensorAlgebra.checkNonSingularMatrix(tensor: DoubleTensor): Unit { - for( mat in tensor.matrixSequence()) { - val detTensor = mat.asTensor().detLU() - check(!(detTensor.eq(detTensor.zeroesLike()))){ - "Tensor contains matrices which are singular" - } - } } \ No newline at end of file