KMP library for tensors #300

Merged
grinisrit merged 215 commits from feature/tensor-algebra into dev 2021-05-08 09:48:04 +03:00
2 changed files with 16 additions and 0 deletions
Showing only changes of commit ed007589cf - Show all commits

View File

@ -1,5 +1,6 @@
package space.kscience.kmath.tensors package space.kscience.kmath.tensors
import space.kscience.kmath.linear.LupDecompositionFeature
import space.kscience.kmath.nd.MutableNDBuffer import space.kscience.kmath.nd.MutableNDBuffer
import space.kscience.kmath.structures.RealBuffer import space.kscience.kmath.structures.RealBuffer
import space.kscience.kmath.structures.array import space.kscience.kmath.structures.array
@ -164,7 +165,19 @@ public class RealTensorAlgebra : TensorPartialDivisionAlgebra<Double, RealTensor
TODO("Not yet implemented") 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> { override fun RealTensor.svd(): Triple<RealTensor, RealTensor, RealTensor> {
/**
* Main first task for @AlyaNovikova
*/
TODO("Not yet implemented") 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.log(): TensorType
public fun TensorType.logAssign(): Unit 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 //https://pytorch.org/docs/stable/generated/torch.svd.html
public fun TensorType.svd(): Triple<TensorType, TensorType, TensorType> public fun TensorType.svd(): Triple<TensorType, TensorType, TensorType>