LU decomposition set up

This commit is contained in:
Roland Grinis 2021-03-02 14:54:07 +00:00
parent 4aa1df0628
commit ed007589cf
2 changed files with 16 additions and 0 deletions

View File

@ -1,5 +1,6 @@
package space.kscience.kmath.tensors
import space.kscience.kmath.linear.LupDecompositionFeature
import space.kscience.kmath.nd.MutableNDBuffer
import space.kscience.kmath.structures.RealBuffer
import space.kscience.kmath.structures.array
@ -164,7 +165,19 @@ public class RealTensorAlgebra : TensorPartialDivisionAlgebra<Double, RealTensor
TODO("Not yet implemented")
}
override fun RealTensor.lu(): Pair<RealTensor, RealTensor> {
/**
* Main first task for @AndreiKingsley
* Compare with the implementation of [LupDecomposition]
* and provide a common API
*/
TODO("Not yet implemented")
}
override fun RealTensor.svd(): Triple<RealTensor, RealTensor, RealTensor> {
/**
* Main first task for @AlyaNovikova
*/
TODO("Not yet implemented")
}

View File

@ -66,6 +66,9 @@ public interface TensorPartialDivisionAlgebra<T, TensorType : TensorStructure<T>
public fun TensorType.log(): TensorType
public fun TensorType.logAssign(): Unit
//https://pytorch.org/docs/stable/generated/torch.lu.html
public fun TensorType.lu(): Pair<TensorType, TensorType>
//https://pytorch.org/docs/stable/generated/torch.svd.html
public fun TensorType.svd(): Triple<TensorType, TensorType, TensorType>