v0.3.0-dev-9 #324

Merged
altavir merged 265 commits from dev into master 2021-05-08 17:16:29 +03:00
Showing only changes of commit 0fa73e1e9e - Show all commits

View File

@ -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 <T, TensorType : TensorStructure<T>,
@ -72,12 +71,3 @@ internal inline fun DoubleLinearOpsTensorAlgebra.checkPositiveDefinite(
"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"
}
}
}