QR + test #263

Merged
AndreiKingsley merged 9 commits from andrew into feature/tensor-algebra 2021-03-30 18:58:24 +03:00
11 changed files with 8 additions and 520 deletions
Showing only changes of commit 5d830206a2 - Show all commits

View File

@ -2619,7 +2619,7 @@ public final class space/kscience/kmath/structures/VirtualMutableBuffer : space/
public fun set (ILjava/lang/Object;)V
}
public abstract interface class space/kscience/kmath/tensors/AnalyticTensorAlgebra : space/kscience/kmath/tensors/OrderedTensorAlgebra, space/kscience/kmath/tensors/TensorPartialDivisionAlgebra {
public abstract interface class space/kscience/kmath/tensors/AnalyticTensorAlgebra : space/kscience/kmath/tensors/TensorPartialDivisionAlgebra {
public abstract fun acos (Lspace/kscience/kmath/nd/MutableStructureND;)Lspace/kscience/kmath/nd/MutableStructureND;
public abstract fun acosh (Lspace/kscience/kmath/nd/MutableStructureND;)Lspace/kscience/kmath/nd/MutableStructureND;
public abstract fun asin (Lspace/kscience/kmath/nd/MutableStructureND;)Lspace/kscience/kmath/nd/MutableStructureND;
@ -2627,59 +2627,16 @@ public abstract interface class space/kscience/kmath/tensors/AnalyticTensorAlgeb
public abstract fun atan (Lspace/kscience/kmath/nd/MutableStructureND;)Lspace/kscience/kmath/nd/MutableStructureND;
public abstract fun atanh (Lspace/kscience/kmath/nd/MutableStructureND;)Lspace/kscience/kmath/nd/MutableStructureND;
public abstract fun ceil (Lspace/kscience/kmath/nd/MutableStructureND;)Lspace/kscience/kmath/nd/MutableStructureND;
public abstract fun clamp (Lspace/kscience/kmath/nd/MutableStructureND;Ljava/lang/Object;Ljava/lang/Object;)Lspace/kscience/kmath/nd/MutableStructureND;
public abstract fun cos (Lspace/kscience/kmath/nd/MutableStructureND;)Lspace/kscience/kmath/nd/MutableStructureND;
public abstract fun cosh (Lspace/kscience/kmath/nd/MutableStructureND;)Lspace/kscience/kmath/nd/MutableStructureND;
public abstract fun erf (Lspace/kscience/kmath/nd/MutableStructureND;)Lspace/kscience/kmath/nd/MutableStructureND;
public abstract fun erfc (Lspace/kscience/kmath/nd/MutableStructureND;)Lspace/kscience/kmath/nd/MutableStructureND;
public abstract fun erfinv (Lspace/kscience/kmath/nd/MutableStructureND;)Lspace/kscience/kmath/nd/MutableStructureND;
public abstract fun exp (Lspace/kscience/kmath/nd/MutableStructureND;)Lspace/kscience/kmath/nd/MutableStructureND;
public abstract fun floor (Lspace/kscience/kmath/nd/MutableStructureND;)Lspace/kscience/kmath/nd/MutableStructureND;
public abstract fun heaviside (Lspace/kscience/kmath/nd/MutableStructureND;Lspace/kscience/kmath/nd/MutableStructureND;)Lspace/kscience/kmath/nd/MutableStructureND;
public abstract fun histc (Lspace/kscience/kmath/nd/MutableStructureND;ILjava/lang/Object;Ljava/lang/Object;)Lspace/kscience/kmath/nd/MutableStructureND;
public abstract fun igamma (Lspace/kscience/kmath/nd/MutableStructureND;Lspace/kscience/kmath/nd/MutableStructureND;)Lspace/kscience/kmath/nd/MutableStructureND;
public abstract fun igammac (Lspace/kscience/kmath/nd/MutableStructureND;Lspace/kscience/kmath/nd/MutableStructureND;)Lspace/kscience/kmath/nd/MutableStructureND;
public abstract fun lerp (Lspace/kscience/kmath/nd/MutableStructureND;Lspace/kscience/kmath/nd/MutableStructureND;Lspace/kscience/kmath/nd/MutableStructureND;)Lspace/kscience/kmath/nd/MutableStructureND;
public abstract fun lgamma (Lspace/kscience/kmath/nd/MutableStructureND;)Lspace/kscience/kmath/nd/MutableStructureND;
public abstract fun log (Lspace/kscience/kmath/nd/MutableStructureND;)Lspace/kscience/kmath/nd/MutableStructureND;
public abstract fun logit (Lspace/kscience/kmath/nd/MutableStructureND;Ljava/lang/Object;)Lspace/kscience/kmath/nd/MutableStructureND;
public abstract fun mvlgamma (Lspace/kscience/kmath/nd/MutableStructureND;I)Lspace/kscience/kmath/nd/MutableStructureND;
public abstract fun polygamma (Lspace/kscience/kmath/nd/MutableStructureND;I)Lspace/kscience/kmath/nd/MutableStructureND;
public abstract fun pow (Lspace/kscience/kmath/nd/MutableStructureND;Ljava/lang/Object;)Lspace/kscience/kmath/nd/MutableStructureND;
public abstract fun quantile (Lspace/kscience/kmath/nd/MutableStructureND;Ljava/lang/Object;IZ)Lspace/kscience/kmath/nd/MutableStructureND;
public abstract fun round (Lspace/kscience/kmath/nd/MutableStructureND;)Lspace/kscience/kmath/nd/MutableStructureND;
public abstract fun sigmoid (Lspace/kscience/kmath/nd/MutableStructureND;)Lspace/kscience/kmath/nd/MutableStructureND;
public abstract fun sin (Lspace/kscience/kmath/nd/MutableStructureND;)Lspace/kscience/kmath/nd/MutableStructureND;
public abstract fun sinc (Lspace/kscience/kmath/nd/MutableStructureND;)Lspace/kscience/kmath/nd/MutableStructureND;
public abstract fun sinh (Lspace/kscience/kmath/nd/MutableStructureND;)Lspace/kscience/kmath/nd/MutableStructureND;
public abstract fun sqrt (Lspace/kscience/kmath/nd/MutableStructureND;)Lspace/kscience/kmath/nd/MutableStructureND;
public abstract fun std (Lspace/kscience/kmath/nd/MutableStructureND;IZZ)Lspace/kscience/kmath/nd/MutableStructureND;
public abstract fun tan (Lspace/kscience/kmath/nd/MutableStructureND;)Lspace/kscience/kmath/nd/MutableStructureND;
public abstract fun tanh (Lspace/kscience/kmath/nd/MutableStructureND;)Lspace/kscience/kmath/nd/MutableStructureND;
public abstract fun trapz (Lspace/kscience/kmath/nd/MutableStructureND;Lspace/kscience/kmath/nd/MutableStructureND;I)Lspace/kscience/kmath/nd/MutableStructureND;
}
public abstract interface class space/kscience/kmath/tensors/ComplexTensorAlgebra : space/kscience/kmath/tensors/TensorPartialDivisionAlgebra {
public abstract fun angle (Lspace/kscience/kmath/tensors/ComplexTensorStructure;)Lspace/kscience/kmath/nd/MutableStructureND;
public abstract fun bartlettWindow (IZ)Lspace/kscience/kmath/nd/MutableStructureND;
public abstract fun blackmanWindow (IZ)Lspace/kscience/kmath/nd/MutableStructureND;
public abstract fun cartesianEmbedding (Lspace/kscience/kmath/nd/MutableStructureND;Lspace/kscience/kmath/nd/MutableStructureND;)Lspace/kscience/kmath/tensors/ComplexTensorStructure;
public abstract fun hammingWindow (IZLjava/lang/Object;Ljava/lang/Object;)Lspace/kscience/kmath/nd/MutableStructureND;
public abstract fun inverseShortTimeFourierTransform (Lspace/kscience/kmath/tensors/ComplexTensorStructure;IIILspace/kscience/kmath/nd/MutableStructureND;ZZZI)V
public abstract fun kaiserWindow (IZLjava/lang/Object;)Lspace/kscience/kmath/nd/MutableStructureND;
public abstract fun polarEmbedding (Lspace/kscience/kmath/nd/MutableStructureND;Lspace/kscience/kmath/nd/MutableStructureND;)Lspace/kscience/kmath/tensors/ComplexTensorStructure;
public abstract fun shortTimeFourierTransform (Lspace/kscience/kmath/tensors/ComplexTensorStructure;IIILspace/kscience/kmath/nd/MutableStructureND;ZZ)V
public abstract fun viewAsComplex (Lspace/kscience/kmath/nd/MutableStructureND;)Lspace/kscience/kmath/tensors/ComplexTensorStructure;
}
public abstract interface class space/kscience/kmath/tensors/ComplexTensorStructure : space/kscience/kmath/nd/MutableStructureND {
public abstract fun imaginaryPart ()Lspace/kscience/kmath/nd/MutableStructureND;
public abstract fun realPart ()Lspace/kscience/kmath/nd/MutableStructureND;
public abstract fun viewAsReal ()Lspace/kscience/kmath/nd/MutableStructureND;
}
public final class space/kscience/kmath/tensors/ComplexTensorStructure$DefaultImpls {
public static fun getDimension (Lspace/kscience/kmath/tensors/ComplexTensorStructure;)I
}
public abstract interface class space/kscience/kmath/tensors/LinearOpsTensorAlgebra : space/kscience/kmath/tensors/TensorPartialDivisionAlgebra {
@ -2697,32 +2654,16 @@ public final class space/kscience/kmath/tensors/LinearOpsTensorAlgebra$DefaultIm
public static synthetic fun symEig$default (Lspace/kscience/kmath/tensors/LinearOpsTensorAlgebra;Lspace/kscience/kmath/nd/MutableStructureND;ZILjava/lang/Object;)Lkotlin/Pair;
}
public abstract interface class space/kscience/kmath/tensors/OrderedTensorAlgebra : space/kscience/kmath/tensors/TensorAlgebra {
public abstract fun cummax (Lspace/kscience/kmath/nd/MutableStructureND;I)Lspace/kscience/kmath/nd/MutableStructureND;
public abstract fun cummin (Lspace/kscience/kmath/nd/MutableStructureND;I)Lspace/kscience/kmath/nd/MutableStructureND;
public abstract fun max (Lspace/kscience/kmath/nd/MutableStructureND;IZ)Lspace/kscience/kmath/nd/MutableStructureND;
public abstract fun maximum (Lspace/kscience/kmath/nd/MutableStructureND;Lspace/kscience/kmath/nd/MutableStructureND;)V
public abstract fun median (Lspace/kscience/kmath/nd/MutableStructureND;IZ)Lspace/kscience/kmath/nd/MutableStructureND;
public abstract fun min (Lspace/kscience/kmath/nd/MutableStructureND;IZ)Lspace/kscience/kmath/nd/MutableStructureND;
public abstract fun minimum (Lspace/kscience/kmath/nd/MutableStructureND;Lspace/kscience/kmath/nd/MutableStructureND;)V
public abstract fun sort (Lspace/kscience/kmath/nd/MutableStructureND;IZZ)Lspace/kscience/kmath/nd/MutableStructureND;
}
public abstract interface class space/kscience/kmath/tensors/ReduceOpsTensorAlgebra : space/kscience/kmath/tensors/TensorAlgebra {
public abstract fun value (Lspace/kscience/kmath/nd/MutableStructureND;)Ljava/lang/Object;
}
public abstract interface class space/kscience/kmath/tensors/TensorAlgebra {
public abstract fun abs (Lspace/kscience/kmath/nd/MutableStructureND;)Lspace/kscience/kmath/nd/MutableStructureND;
public abstract fun cat (Ljava/util/List;I)Lspace/kscience/kmath/nd/MutableStructureND;
public abstract fun copy (Lspace/kscience/kmath/nd/MutableStructureND;)Lspace/kscience/kmath/nd/MutableStructureND;
public abstract fun cumprod (Lspace/kscience/kmath/nd/MutableStructureND;I)Lspace/kscience/kmath/nd/MutableStructureND;
public abstract fun cumsum (Lspace/kscience/kmath/nd/MutableStructureND;I)Lspace/kscience/kmath/nd/MutableStructureND;
public abstract fun diagonalEmbedding (Lspace/kscience/kmath/nd/MutableStructureND;III)Lspace/kscience/kmath/nd/MutableStructureND;
public abstract fun dot (Lspace/kscience/kmath/nd/MutableStructureND;Lspace/kscience/kmath/nd/MutableStructureND;)Lspace/kscience/kmath/nd/MutableStructureND;
public abstract fun eq (Lspace/kscience/kmath/nd/MutableStructureND;Lspace/kscience/kmath/nd/MutableStructureND;Ljava/lang/Object;)Z
public abstract fun eye (I)Lspace/kscience/kmath/nd/MutableStructureND;
public abstract fun flatten (Lspace/kscience/kmath/nd/MutableStructureND;II)Lspace/kscience/kmath/nd/MutableStructureND;
public abstract fun full (Ljava/lang/Object;[I)Lspace/kscience/kmath/nd/MutableStructureND;
public abstract fun fullLike (Lspace/kscience/kmath/nd/MutableStructureND;Ljava/lang/Object;)Lspace/kscience/kmath/nd/MutableStructureND;
public abstract fun get (Lspace/kscience/kmath/nd/MutableStructureND;I)Lspace/kscience/kmath/nd/MutableStructureND;
@ -2738,10 +2679,6 @@ public abstract interface class space/kscience/kmath/tensors/TensorAlgebra {
public abstract fun plus (Lspace/kscience/kmath/nd/MutableStructureND;Lspace/kscience/kmath/nd/MutableStructureND;)Lspace/kscience/kmath/nd/MutableStructureND;
public abstract fun plusAssign (Lspace/kscience/kmath/nd/MutableStructureND;Ljava/lang/Object;)V
public abstract fun plusAssign (Lspace/kscience/kmath/nd/MutableStructureND;Lspace/kscience/kmath/nd/MutableStructureND;)V
public abstract fun prod (Lspace/kscience/kmath/nd/MutableStructureND;IZ)Lspace/kscience/kmath/nd/MutableStructureND;
public abstract fun square (Lspace/kscience/kmath/nd/MutableStructureND;)Lspace/kscience/kmath/nd/MutableStructureND;
public abstract fun squeeze (Lspace/kscience/kmath/nd/MutableStructureND;I)Lspace/kscience/kmath/nd/MutableStructureND;
public abstract fun sum (Lspace/kscience/kmath/nd/MutableStructureND;IZ)Lspace/kscience/kmath/nd/MutableStructureND;
public abstract fun times (Ljava/lang/Object;Lspace/kscience/kmath/nd/MutableStructureND;)Lspace/kscience/kmath/nd/MutableStructureND;
public abstract fun times (Lspace/kscience/kmath/nd/MutableStructureND;Ljava/lang/Object;)Lspace/kscience/kmath/nd/MutableStructureND;
public abstract fun times (Lspace/kscience/kmath/nd/MutableStructureND;Lspace/kscience/kmath/nd/MutableStructureND;)Lspace/kscience/kmath/nd/MutableStructureND;
@ -2764,13 +2701,6 @@ public abstract interface class space/kscience/kmath/tensors/TensorPartialDivisi
public abstract fun div (Lspace/kscience/kmath/nd/MutableStructureND;Lspace/kscience/kmath/nd/MutableStructureND;)Lspace/kscience/kmath/nd/MutableStructureND;
public abstract fun divAssign (Lspace/kscience/kmath/nd/MutableStructureND;Ljava/lang/Object;)V
public abstract fun divAssign (Lspace/kscience/kmath/nd/MutableStructureND;Lspace/kscience/kmath/nd/MutableStructureND;)V
public abstract fun mean (Lspace/kscience/kmath/nd/MutableStructureND;IZ)Lspace/kscience/kmath/nd/MutableStructureND;
public abstract fun variance (Lspace/kscience/kmath/nd/MutableStructureND;IZZ)Lspace/kscience/kmath/nd/MutableStructureND;
}
public final class space/kscience/kmath/tensors/TensorPartialDivisionAlgebra$DefaultImpls {
public static synthetic fun mean$default (Lspace/kscience/kmath/tensors/TensorPartialDivisionAlgebra;Lspace/kscience/kmath/nd/MutableStructureND;IZILjava/lang/Object;)Lspace/kscience/kmath/nd/MutableStructureND;
public static synthetic fun variance$default (Lspace/kscience/kmath/tensors/TensorPartialDivisionAlgebra;Lspace/kscience/kmath/nd/MutableStructureND;IZZILjava/lang/Object;)Lspace/kscience/kmath/nd/MutableStructureND;
}
public final class space/kscience/kmath/tensors/core/BroadcastDoubleTensorAlgebra : space/kscience/kmath/tensors/core/DoubleTensorAlgebra {
@ -2815,7 +2745,7 @@ public class space/kscience/kmath/tensors/core/BufferedTensor : space/kscience/k
public final fun vectorSequence ()Lkotlin/sequences/Sequence;
}
public final class space/kscience/kmath/tensors/core/DoubleAnalyticTensorAlgebra : space/kscience/kmath/tensors/core/DoubleOrderedTensorAlgebra, space/kscience/kmath/tensors/AnalyticTensorAlgebra {
public final class space/kscience/kmath/tensors/core/DoubleAnalyticTensorAlgebra : space/kscience/kmath/tensors/core/DoubleTensorAlgebra, space/kscience/kmath/tensors/AnalyticTensorAlgebra {
public fun <init> ()V
public synthetic fun acos (Lspace/kscience/kmath/nd/MutableStructureND;)Lspace/kscience/kmath/nd/MutableStructureND;
public fun acos (Lspace/kscience/kmath/tensors/core/DoubleTensor;)Lspace/kscience/kmath/tensors/core/DoubleTensor;
@ -2831,66 +2761,26 @@ public final class space/kscience/kmath/tensors/core/DoubleAnalyticTensorAlgebra
public fun atanh (Lspace/kscience/kmath/tensors/core/DoubleTensor;)Lspace/kscience/kmath/tensors/core/DoubleTensor;
public synthetic fun ceil (Lspace/kscience/kmath/nd/MutableStructureND;)Lspace/kscience/kmath/nd/MutableStructureND;
public fun ceil (Lspace/kscience/kmath/tensors/core/DoubleTensor;)Lspace/kscience/kmath/tensors/core/DoubleTensor;
public synthetic fun clamp (Lspace/kscience/kmath/nd/MutableStructureND;Ljava/lang/Object;Ljava/lang/Object;)Lspace/kscience/kmath/nd/MutableStructureND;
public fun clamp (Lspace/kscience/kmath/tensors/core/DoubleTensor;DD)Lspace/kscience/kmath/tensors/core/DoubleTensor;
public synthetic fun cos (Lspace/kscience/kmath/nd/MutableStructureND;)Lspace/kscience/kmath/nd/MutableStructureND;
public fun cos (Lspace/kscience/kmath/tensors/core/DoubleTensor;)Lspace/kscience/kmath/tensors/core/DoubleTensor;
public synthetic fun cosh (Lspace/kscience/kmath/nd/MutableStructureND;)Lspace/kscience/kmath/nd/MutableStructureND;
public fun cosh (Lspace/kscience/kmath/tensors/core/DoubleTensor;)Lspace/kscience/kmath/tensors/core/DoubleTensor;
public synthetic fun erf (Lspace/kscience/kmath/nd/MutableStructureND;)Lspace/kscience/kmath/nd/MutableStructureND;
public fun erf (Lspace/kscience/kmath/tensors/core/DoubleTensor;)Lspace/kscience/kmath/tensors/core/DoubleTensor;
public synthetic fun erfc (Lspace/kscience/kmath/nd/MutableStructureND;)Lspace/kscience/kmath/nd/MutableStructureND;
public fun erfc (Lspace/kscience/kmath/tensors/core/DoubleTensor;)Lspace/kscience/kmath/tensors/core/DoubleTensor;
public synthetic fun erfinv (Lspace/kscience/kmath/nd/MutableStructureND;)Lspace/kscience/kmath/nd/MutableStructureND;
public fun erfinv (Lspace/kscience/kmath/tensors/core/DoubleTensor;)Lspace/kscience/kmath/tensors/core/DoubleTensor;
public synthetic fun exp (Lspace/kscience/kmath/nd/MutableStructureND;)Lspace/kscience/kmath/nd/MutableStructureND;
public fun exp (Lspace/kscience/kmath/tensors/core/DoubleTensor;)Lspace/kscience/kmath/tensors/core/DoubleTensor;
public synthetic fun floor (Lspace/kscience/kmath/nd/MutableStructureND;)Lspace/kscience/kmath/nd/MutableStructureND;
public fun floor (Lspace/kscience/kmath/tensors/core/DoubleTensor;)Lspace/kscience/kmath/tensors/core/DoubleTensor;
public synthetic fun heaviside (Lspace/kscience/kmath/nd/MutableStructureND;Lspace/kscience/kmath/nd/MutableStructureND;)Lspace/kscience/kmath/nd/MutableStructureND;
public fun heaviside (Lspace/kscience/kmath/tensors/core/DoubleTensor;Lspace/kscience/kmath/tensors/core/DoubleTensor;)Lspace/kscience/kmath/tensors/core/DoubleTensor;
public synthetic fun histc (Lspace/kscience/kmath/nd/MutableStructureND;ILjava/lang/Object;Ljava/lang/Object;)Lspace/kscience/kmath/nd/MutableStructureND;
public fun histc (Lspace/kscience/kmath/tensors/core/DoubleTensor;IDD)Lspace/kscience/kmath/tensors/core/DoubleTensor;
public synthetic fun igamma (Lspace/kscience/kmath/nd/MutableStructureND;Lspace/kscience/kmath/nd/MutableStructureND;)Lspace/kscience/kmath/nd/MutableStructureND;
public fun igamma (Lspace/kscience/kmath/tensors/core/DoubleTensor;Lspace/kscience/kmath/tensors/core/DoubleTensor;)Lspace/kscience/kmath/tensors/core/DoubleTensor;
public synthetic fun igammac (Lspace/kscience/kmath/nd/MutableStructureND;Lspace/kscience/kmath/nd/MutableStructureND;)Lspace/kscience/kmath/nd/MutableStructureND;
public fun igammac (Lspace/kscience/kmath/tensors/core/DoubleTensor;Lspace/kscience/kmath/tensors/core/DoubleTensor;)Lspace/kscience/kmath/tensors/core/DoubleTensor;
public synthetic fun lerp (Lspace/kscience/kmath/nd/MutableStructureND;Lspace/kscience/kmath/nd/MutableStructureND;Lspace/kscience/kmath/nd/MutableStructureND;)Lspace/kscience/kmath/nd/MutableStructureND;
public fun lerp (Lspace/kscience/kmath/tensors/core/DoubleTensor;Lspace/kscience/kmath/tensors/core/DoubleTensor;Lspace/kscience/kmath/tensors/core/DoubleTensor;)Lspace/kscience/kmath/tensors/core/DoubleTensor;
public synthetic fun lgamma (Lspace/kscience/kmath/nd/MutableStructureND;)Lspace/kscience/kmath/nd/MutableStructureND;
public fun lgamma (Lspace/kscience/kmath/tensors/core/DoubleTensor;)Lspace/kscience/kmath/tensors/core/DoubleTensor;
public synthetic fun log (Lspace/kscience/kmath/nd/MutableStructureND;)Lspace/kscience/kmath/nd/MutableStructureND;
public fun log (Lspace/kscience/kmath/tensors/core/DoubleTensor;)Lspace/kscience/kmath/tensors/core/DoubleTensor;
public synthetic fun logit (Lspace/kscience/kmath/nd/MutableStructureND;Ljava/lang/Object;)Lspace/kscience/kmath/nd/MutableStructureND;
public fun logit (Lspace/kscience/kmath/tensors/core/DoubleTensor;D)Lspace/kscience/kmath/tensors/core/DoubleTensor;
public synthetic fun mvlgamma (Lspace/kscience/kmath/nd/MutableStructureND;I)Lspace/kscience/kmath/nd/MutableStructureND;
public fun mvlgamma (Lspace/kscience/kmath/tensors/core/DoubleTensor;I)Lspace/kscience/kmath/tensors/core/DoubleTensor;
public synthetic fun polygamma (Lspace/kscience/kmath/nd/MutableStructureND;I)Lspace/kscience/kmath/nd/MutableStructureND;
public fun polygamma (Lspace/kscience/kmath/tensors/core/DoubleTensor;I)Lspace/kscience/kmath/tensors/core/DoubleTensor;
public synthetic fun pow (Lspace/kscience/kmath/nd/MutableStructureND;Ljava/lang/Object;)Lspace/kscience/kmath/nd/MutableStructureND;
public fun pow (Lspace/kscience/kmath/tensors/core/DoubleTensor;D)Lspace/kscience/kmath/tensors/core/DoubleTensor;
public synthetic fun quantile (Lspace/kscience/kmath/nd/MutableStructureND;Ljava/lang/Object;IZ)Lspace/kscience/kmath/nd/MutableStructureND;
public fun quantile (Lspace/kscience/kmath/tensors/core/DoubleTensor;DIZ)Lspace/kscience/kmath/tensors/core/DoubleTensor;
public synthetic fun round (Lspace/kscience/kmath/nd/MutableStructureND;)Lspace/kscience/kmath/nd/MutableStructureND;
public fun round (Lspace/kscience/kmath/tensors/core/DoubleTensor;)Lspace/kscience/kmath/tensors/core/DoubleTensor;
public synthetic fun sigmoid (Lspace/kscience/kmath/nd/MutableStructureND;)Lspace/kscience/kmath/nd/MutableStructureND;
public fun sigmoid (Lspace/kscience/kmath/tensors/core/DoubleTensor;)Lspace/kscience/kmath/tensors/core/DoubleTensor;
public synthetic fun sin (Lspace/kscience/kmath/nd/MutableStructureND;)Lspace/kscience/kmath/nd/MutableStructureND;
public fun sin (Lspace/kscience/kmath/tensors/core/DoubleTensor;)Lspace/kscience/kmath/tensors/core/DoubleTensor;
public synthetic fun sinc (Lspace/kscience/kmath/nd/MutableStructureND;)Lspace/kscience/kmath/nd/MutableStructureND;
public fun sinc (Lspace/kscience/kmath/tensors/core/DoubleTensor;)Lspace/kscience/kmath/tensors/core/DoubleTensor;
public synthetic fun sinh (Lspace/kscience/kmath/nd/MutableStructureND;)Lspace/kscience/kmath/nd/MutableStructureND;
public fun sinh (Lspace/kscience/kmath/tensors/core/DoubleTensor;)Lspace/kscience/kmath/tensors/core/DoubleTensor;
public synthetic fun sqrt (Lspace/kscience/kmath/nd/MutableStructureND;)Lspace/kscience/kmath/nd/MutableStructureND;
public fun sqrt (Lspace/kscience/kmath/tensors/core/DoubleTensor;)Lspace/kscience/kmath/tensors/core/DoubleTensor;
public synthetic fun std (Lspace/kscience/kmath/nd/MutableStructureND;IZZ)Lspace/kscience/kmath/nd/MutableStructureND;
public fun std (Lspace/kscience/kmath/tensors/core/DoubleTensor;IZZ)Lspace/kscience/kmath/tensors/core/DoubleTensor;
public synthetic fun tan (Lspace/kscience/kmath/nd/MutableStructureND;)Lspace/kscience/kmath/nd/MutableStructureND;
public fun tan (Lspace/kscience/kmath/tensors/core/DoubleTensor;)Lspace/kscience/kmath/tensors/core/DoubleTensor;
public synthetic fun tanh (Lspace/kscience/kmath/nd/MutableStructureND;)Lspace/kscience/kmath/nd/MutableStructureND;
public fun tanh (Lspace/kscience/kmath/tensors/core/DoubleTensor;)Lspace/kscience/kmath/tensors/core/DoubleTensor;
public synthetic fun trapz (Lspace/kscience/kmath/nd/MutableStructureND;Lspace/kscience/kmath/nd/MutableStructureND;I)Lspace/kscience/kmath/nd/MutableStructureND;
public fun trapz (Lspace/kscience/kmath/tensors/core/DoubleTensor;Lspace/kscience/kmath/tensors/core/DoubleTensor;I)Lspace/kscience/kmath/tensors/core/DoubleTensor;
}
public final class space/kscience/kmath/tensors/core/DoubleAnalyticTensorAlgebraKt {
@ -2923,30 +2813,6 @@ public final class space/kscience/kmath/tensors/core/DoubleLinearOpsTensorAlgebr
public static final fun DoubleLinearOpsTensorAlgebra (Lkotlin/jvm/functions/Function1;)Ljava/lang/Object;
}
public class space/kscience/kmath/tensors/core/DoubleOrderedTensorAlgebra : space/kscience/kmath/tensors/core/DoubleTensorAlgebra, space/kscience/kmath/tensors/OrderedTensorAlgebra {
public fun <init> ()V
public synthetic fun cummax (Lspace/kscience/kmath/nd/MutableStructureND;I)Lspace/kscience/kmath/nd/MutableStructureND;
public fun cummax (Lspace/kscience/kmath/tensors/core/DoubleTensor;I)Lspace/kscience/kmath/tensors/core/DoubleTensor;
public synthetic fun cummin (Lspace/kscience/kmath/nd/MutableStructureND;I)Lspace/kscience/kmath/nd/MutableStructureND;
public fun cummin (Lspace/kscience/kmath/tensors/core/DoubleTensor;I)Lspace/kscience/kmath/tensors/core/DoubleTensor;
public synthetic fun max (Lspace/kscience/kmath/nd/MutableStructureND;IZ)Lspace/kscience/kmath/nd/MutableStructureND;
public fun max (Lspace/kscience/kmath/tensors/core/DoubleTensor;IZ)Lspace/kscience/kmath/tensors/core/DoubleTensor;
public synthetic fun maximum (Lspace/kscience/kmath/nd/MutableStructureND;Lspace/kscience/kmath/nd/MutableStructureND;)V
public fun maximum (Lspace/kscience/kmath/tensors/core/DoubleTensor;Lspace/kscience/kmath/tensors/core/DoubleTensor;)V
public synthetic fun median (Lspace/kscience/kmath/nd/MutableStructureND;IZ)Lspace/kscience/kmath/nd/MutableStructureND;
public fun median (Lspace/kscience/kmath/tensors/core/DoubleTensor;IZ)Lspace/kscience/kmath/tensors/core/DoubleTensor;
public synthetic fun min (Lspace/kscience/kmath/nd/MutableStructureND;IZ)Lspace/kscience/kmath/nd/MutableStructureND;
public fun min (Lspace/kscience/kmath/tensors/core/DoubleTensor;IZ)Lspace/kscience/kmath/tensors/core/DoubleTensor;
public synthetic fun minimum (Lspace/kscience/kmath/nd/MutableStructureND;Lspace/kscience/kmath/nd/MutableStructureND;)V
public fun minimum (Lspace/kscience/kmath/tensors/core/DoubleTensor;Lspace/kscience/kmath/tensors/core/DoubleTensor;)V
public synthetic fun sort (Lspace/kscience/kmath/nd/MutableStructureND;IZZ)Lspace/kscience/kmath/nd/MutableStructureND;
public fun sort (Lspace/kscience/kmath/tensors/core/DoubleTensor;IZZ)Lspace/kscience/kmath/tensors/core/DoubleTensor;
}
public final class space/kscience/kmath/tensors/core/DoubleOrderedTensorAlgebraKt {
public static final fun DoubleOrderedTensorAlgebra (Lkotlin/jvm/functions/Function1;)Ljava/lang/Object;
}
public final class space/kscience/kmath/tensors/core/DoubleReduceOpsTensorAlgebra : space/kscience/kmath/tensors/core/DoubleTensorAlgebra, space/kscience/kmath/tensors/ReduceOpsTensorAlgebra {
public fun <init> ()V
public synthetic fun value (Lspace/kscience/kmath/nd/MutableStructureND;)Ljava/lang/Object;
@ -2962,19 +2828,11 @@ public final class space/kscience/kmath/tensors/core/DoubleTensor : space/kscien
public class space/kscience/kmath/tensors/core/DoubleTensorAlgebra : space/kscience/kmath/tensors/TensorPartialDivisionAlgebra {
public fun <init> ()V
public synthetic fun abs (Lspace/kscience/kmath/nd/MutableStructureND;)Lspace/kscience/kmath/nd/MutableStructureND;
public fun abs (Lspace/kscience/kmath/tensors/core/DoubleTensor;)Lspace/kscience/kmath/tensors/core/DoubleTensor;
public synthetic fun cat (Ljava/util/List;I)Lspace/kscience/kmath/nd/MutableStructureND;
public fun cat (Ljava/util/List;I)Lspace/kscience/kmath/tensors/core/DoubleTensor;
public final fun contentEquals (Lspace/kscience/kmath/tensors/core/DoubleTensor;Lspace/kscience/kmath/tensors/core/DoubleTensor;D)Z
public final fun contentEquals (Lspace/kscience/kmath/tensors/core/DoubleTensor;Lspace/kscience/kmath/tensors/core/DoubleTensor;Lkotlin/jvm/functions/Function2;)Z
public static synthetic fun contentEquals$default (Lspace/kscience/kmath/tensors/core/DoubleTensorAlgebra;Lspace/kscience/kmath/tensors/core/DoubleTensor;Lspace/kscience/kmath/tensors/core/DoubleTensor;DILjava/lang/Object;)Z
public synthetic fun copy (Lspace/kscience/kmath/nd/MutableStructureND;)Lspace/kscience/kmath/nd/MutableStructureND;
public fun copy (Lspace/kscience/kmath/tensors/core/DoubleTensor;)Lspace/kscience/kmath/tensors/core/DoubleTensor;
public synthetic fun cumprod (Lspace/kscience/kmath/nd/MutableStructureND;I)Lspace/kscience/kmath/nd/MutableStructureND;
public fun cumprod (Lspace/kscience/kmath/tensors/core/DoubleTensor;I)Lspace/kscience/kmath/tensors/core/DoubleTensor;
public synthetic fun cumsum (Lspace/kscience/kmath/nd/MutableStructureND;I)Lspace/kscience/kmath/nd/MutableStructureND;
public fun cumsum (Lspace/kscience/kmath/tensors/core/DoubleTensor;I)Lspace/kscience/kmath/tensors/core/DoubleTensor;
public synthetic fun diagonalEmbedding (Lspace/kscience/kmath/nd/MutableStructureND;III)Lspace/kscience/kmath/nd/MutableStructureND;
public fun diagonalEmbedding (Lspace/kscience/kmath/tensors/core/DoubleTensor;III)Lspace/kscience/kmath/tensors/core/DoubleTensor;
public synthetic fun div (Lspace/kscience/kmath/nd/MutableStructureND;Ljava/lang/Object;)Lspace/kscience/kmath/nd/MutableStructureND;
@ -2993,8 +2851,6 @@ public class space/kscience/kmath/tensors/core/DoubleTensorAlgebra : space/kscie
public final fun eq (Lspace/kscience/kmath/tensors/core/DoubleTensor;Lspace/kscience/kmath/tensors/core/DoubleTensor;Lkotlin/jvm/functions/Function2;)Z
public synthetic fun eye (I)Lspace/kscience/kmath/nd/MutableStructureND;
public fun eye (I)Lspace/kscience/kmath/tensors/core/DoubleTensor;
public synthetic fun flatten (Lspace/kscience/kmath/nd/MutableStructureND;II)Lspace/kscience/kmath/nd/MutableStructureND;
public fun flatten (Lspace/kscience/kmath/tensors/core/DoubleTensor;II)Lspace/kscience/kmath/tensors/core/DoubleTensor;
public final fun fromArray ([I[D)Lspace/kscience/kmath/tensors/core/DoubleTensor;
public fun full (D[I)Lspace/kscience/kmath/tensors/core/DoubleTensor;
public synthetic fun full (Ljava/lang/Object;[I)Lspace/kscience/kmath/nd/MutableStructureND;
@ -3003,8 +2859,6 @@ public class space/kscience/kmath/tensors/core/DoubleTensorAlgebra : space/kscie
public synthetic fun get (Lspace/kscience/kmath/nd/MutableStructureND;I)Lspace/kscience/kmath/nd/MutableStructureND;
public fun get (Lspace/kscience/kmath/tensors/core/DoubleTensor;I)Lspace/kscience/kmath/tensors/core/DoubleTensor;
public final fun map (Lspace/kscience/kmath/tensors/core/DoubleTensor;Lkotlin/jvm/functions/Function1;)Lspace/kscience/kmath/tensors/core/DoubleTensor;
public synthetic fun mean (Lspace/kscience/kmath/nd/MutableStructureND;IZ)Lspace/kscience/kmath/nd/MutableStructureND;
public fun mean (Lspace/kscience/kmath/tensors/core/DoubleTensor;IZ)Lspace/kscience/kmath/tensors/core/DoubleTensor;
public fun minus (DLspace/kscience/kmath/tensors/core/DoubleTensor;)Lspace/kscience/kmath/tensors/core/DoubleTensor;
public synthetic fun minus (Ljava/lang/Object;Lspace/kscience/kmath/nd/MutableStructureND;)Lspace/kscience/kmath/nd/MutableStructureND;
public synthetic fun minus (Lspace/kscience/kmath/nd/MutableStructureND;Ljava/lang/Object;)Lspace/kscience/kmath/nd/MutableStructureND;
@ -3029,14 +2883,6 @@ public class space/kscience/kmath/tensors/core/DoubleTensorAlgebra : space/kscie
public synthetic fun plusAssign (Lspace/kscience/kmath/nd/MutableStructureND;Lspace/kscience/kmath/nd/MutableStructureND;)V
public fun plusAssign (Lspace/kscience/kmath/tensors/core/DoubleTensor;D)V
public fun plusAssign (Lspace/kscience/kmath/tensors/core/DoubleTensor;Lspace/kscience/kmath/tensors/core/DoubleTensor;)V
public synthetic fun prod (Lspace/kscience/kmath/nd/MutableStructureND;IZ)Lspace/kscience/kmath/nd/MutableStructureND;
public fun prod (Lspace/kscience/kmath/tensors/core/DoubleTensor;IZ)Lspace/kscience/kmath/tensors/core/DoubleTensor;
public synthetic fun square (Lspace/kscience/kmath/nd/MutableStructureND;)Lspace/kscience/kmath/nd/MutableStructureND;
public fun square (Lspace/kscience/kmath/tensors/core/DoubleTensor;)Lspace/kscience/kmath/tensors/core/DoubleTensor;
public synthetic fun squeeze (Lspace/kscience/kmath/nd/MutableStructureND;I)Lspace/kscience/kmath/nd/MutableStructureND;
public fun squeeze (Lspace/kscience/kmath/tensors/core/DoubleTensor;I)Lspace/kscience/kmath/tensors/core/DoubleTensor;
public synthetic fun sum (Lspace/kscience/kmath/nd/MutableStructureND;IZ)Lspace/kscience/kmath/nd/MutableStructureND;
public fun sum (Lspace/kscience/kmath/tensors/core/DoubleTensor;IZ)Lspace/kscience/kmath/tensors/core/DoubleTensor;
public fun times (DLspace/kscience/kmath/tensors/core/DoubleTensor;)Lspace/kscience/kmath/tensors/core/DoubleTensor;
public synthetic fun times (Ljava/lang/Object;Lspace/kscience/kmath/nd/MutableStructureND;)Lspace/kscience/kmath/nd/MutableStructureND;
public synthetic fun times (Lspace/kscience/kmath/nd/MutableStructureND;Ljava/lang/Object;)Lspace/kscience/kmath/nd/MutableStructureND;
@ -3051,8 +2897,6 @@ public class space/kscience/kmath/tensors/core/DoubleTensorAlgebra : space/kscie
public fun transpose (Lspace/kscience/kmath/tensors/core/DoubleTensor;II)Lspace/kscience/kmath/tensors/core/DoubleTensor;
public synthetic fun unaryMinus (Lspace/kscience/kmath/nd/MutableStructureND;)Lspace/kscience/kmath/nd/MutableStructureND;
public fun unaryMinus (Lspace/kscience/kmath/tensors/core/DoubleTensor;)Lspace/kscience/kmath/tensors/core/DoubleTensor;
public synthetic fun variance (Lspace/kscience/kmath/nd/MutableStructureND;IZZ)Lspace/kscience/kmath/nd/MutableStructureND;
public fun variance (Lspace/kscience/kmath/tensors/core/DoubleTensor;IZZ)Lspace/kscience/kmath/tensors/core/DoubleTensor;
public synthetic fun view (Lspace/kscience/kmath/nd/MutableStructureND;[I)Lspace/kscience/kmath/nd/MutableStructureND;
public fun view (Lspace/kscience/kmath/tensors/core/DoubleTensor;[I)Lspace/kscience/kmath/tensors/core/DoubleTensor;
public synthetic fun viewAs (Lspace/kscience/kmath/nd/MutableStructureND;Lspace/kscience/kmath/nd/MutableStructureND;)Lspace/kscience/kmath/nd/MutableStructureND;

View File

@ -75,14 +75,14 @@ public interface MutableStructure2D<T> : Structure2D<T>, MutableStructureND<T> {
/**
* The buffer of rows of this structure. It gets elements from the structure dynamically.
*/
override val rows: MutableList<MutableStructure1D<T>>
get() = MutableList(rowNum) { i -> MutableBuffer1DWrapper(VirtualMutableBuffer(colNum) { j -> get(i, j) })}
override val rows: List<MutableStructure1D<T>>
get() = List(rowNum) { i -> MutableBuffer1DWrapper(VirtualMutableBuffer(colNum) { j -> get(i, j) })}
/**
* The buffer of columns of this structure. It gets elements from the structure dynamically.
*/
override val columns: MutableList<MutableStructure1D<T>>
get() = MutableList(colNum) { j -> MutableBuffer1DWrapper(VirtualMutableBuffer(rowNum) { i -> get(i, j) }) }
override val columns: List<MutableStructure1D<T>>
get() = List(colNum) { j -> MutableBuffer1DWrapper(VirtualMutableBuffer(rowNum) { i -> get(i, j) }) }
}
/**

View File

@ -2,14 +2,7 @@ package space.kscience.kmath.tensors
public interface AnalyticTensorAlgebra<T, TensorType : TensorStructure<T>> :
TensorPartialDivisionAlgebra<T, TensorType>,
OrderedTensorAlgebra<T, TensorType>{
//https://pytorch.org/docs/stable/generated/torch.quantile.html#torch.quantile
public fun TensorType.quantile(q: T, dim: Int, keepDim: Boolean): TensorType
//https://pytorch.org/docs/stable/generated/torch.std.html#torch.std
public fun TensorType.std(dim: Int, unbiased: Boolean, keepDim: Boolean): TensorType
TensorPartialDivisionAlgebra<T, TensorType> {
//https://pytorch.org/docs/stable/generated/torch.exp.html
public fun TensorType.exp(): TensorType
@ -62,58 +55,4 @@ public interface AnalyticTensorAlgebra<T, TensorType : TensorStructure<T>> :
//https://pytorch.org/docs/stable/generated/torch.floor.html#torch.floor
public fun TensorType.floor(): TensorType
//https://pytorch.org/docs/stable/generated/torch.clamp.html#torch.clamp
public fun TensorType.clamp(min: T, max: T): TensorType
//https://pytorch.org/docs/stable/generated/torch.erf.html#torch.erf
public fun TensorType.erf(): TensorType
//https://pytorch.org/docs/stable/generated/torch.erfinv.html#torch.erfinv
public fun TensorType.erfinv(): TensorType
//https://pytorch.org/docs/stable/generated/torch.erfc.html#torch.erfc
public fun TensorType.erfc(): TensorType
//https://pytorch.org/docs/stable/generated/torch.lerp.html#torch.lerp
public fun TensorType.lerp(end: TensorType, weight: TensorType): TensorType
//https://pytorch.org/docs/stable/generated/torch.lgamma.html#torch.lgamma
public fun TensorType.lgamma(): TensorType
//https://pytorch.org/docs/stable/generated/torch.logit.html#torch.logit
public fun TensorType.logit(eps: T): TensorType
//https://pytorch.org/docs/stable/generated/torch.igamma.html#torch.igamma
public fun TensorType.igamma(other: TensorType): TensorType
//https://pytorch.org/docs/stable/generated/torch.igammac.html#torch.igammac
public fun TensorType.igammac(other: TensorType): TensorType
//https://pytorch.org/docs/stable/generated/torch.mvlgamma.html#torch.mvlgamma
public fun TensorType.mvlgamma(dimensions: Int): TensorType
//https://pytorch.org/docs/stable/generated/torch.polygamma.html#torch.polygamma
public fun TensorType.polygamma(order: Int): TensorType
//https://pytorch.org/docs/stable/generated/torch.pow.html#torch.pow
public fun TensorType.pow(exponent: T): TensorType
//https://pytorch.org/docs/stable/generated/torch.round.html#torch.round
public fun TensorType.round(): TensorType
//https://pytorch.org/docs/stable/generated/torch.sigmoid.html#torch.sigmoid
public fun TensorType.sigmoid(): TensorType
//https://pytorch.org/docs/stable/generated/torch.sinc.html#torch.sinc
public fun TensorType.sinc(): TensorType
//https://pytorch.org/docs/stable/generated/torch.heaviside.html#torch.heaviside
public fun TensorType.heaviside(values: TensorType): TensorType
//https://pytorch.org/docs/stable/generated/torch.trapz.html#torch.trapz
public fun TensorType.trapz(xValues: TensorType, dim: Int): TensorType
//https://pytorch.org/docs/stable/generated/torch.histc.html#torch.histc
public fun TensorType.histc(bins: Int, min: T, max: T): TensorType
}

View File

@ -1,53 +0,0 @@
package space.kscience.kmath.tensors
public interface ComplexTensorAlgebra<T,
RealTensorType : TensorStructure<T>,
ComplexTensorType : ComplexTensorStructure<T, RealTensorType>>
: TensorPartialDivisionAlgebra<T, ComplexTensorType>{
//https://pytorch.org/docs/stable/generated/torch.view_as_complex.html
public fun RealTensorType.viewAsComplex(): ComplexTensorType
// Embed a real tensor as real + i * imaginary
public fun RealTensorType.cartesianEmbedding(imaginary: RealTensorType): ComplexTensorType
// Embed a real tensor as real * exp(i * angle)
public fun RealTensorType.polarEmbedding(angle: RealTensorType): ComplexTensorType
//https://pytorch.org/docs/stable/generated/torch.angle.html
public fun ComplexTensorType.angle(): RealTensorType
//https://pytorch.org/docs/stable/generated/torch.stft.html#torch.stft
public fun ComplexTensorType.shortTimeFourierTransform(
nFFT: Int,
hopLength: Int,
winLength: Int,
window: RealTensorType,
normalised: Boolean,
oneSided: Boolean
)
//https://pytorch.org/docs/stable/generated/torch.istft.html#torch.istft
public fun ComplexTensorType.inverseShortTimeFourierTransform(
nFFT: Int,
hopLength: Int,
winLength: Int,
window: RealTensorType,
center: Boolean,
normalised: Boolean,
oneSided: Boolean,
length: Int
)
//https://pytorch.org/docs/stable/generated/torch.bartlett_window.html#torch.bartlett_window
public fun bartlettWindow(windowLength: Int, periodic: Boolean): RealTensorType
//https://pytorch.org/docs/stable/generated/torch.blackman_window.html#torch.blackman_window
public fun blackmanWindow(windowLength: Int, periodic: Boolean): RealTensorType
//https://pytorch.org/docs/stable/generated/torch.hamming_window.html#torch.hamming_window
public fun hammingWindow(windowLength: Int, periodic: Boolean, alpha: T, beta: T): RealTensorType
//https://pytorch.org/docs/stable/generated/torch.kaiser_window.html#torch.kaiser_window
public fun kaiserWindow(windowLength: Int, periodic: Boolean, beta: T): RealTensorType
}

View File

@ -1,14 +0,0 @@
package space.kscience.kmath.tensors
public interface ComplexTensorStructure<T, RealTensorType: TensorStructure<T>> : TensorStructure<T> {
//https://pytorch.org/docs/master/generated/torch.view_as_real.html
public fun viewAsReal(): RealTensorType
//https://pytorch.org/docs/stable/generated/torch.real.html
public fun realPart(): RealTensorType
//https://pytorch.org/docs/stable/generated/torch.imag.html
public fun imaginaryPart(): RealTensorType
}

View File

@ -1,29 +0,0 @@
package space.kscience.kmath.tensors
public interface OrderedTensorAlgebra<T, TensorType : TensorStructure<T>> :
TensorAlgebra<T, TensorType> {
//https://pytorch.org/docs/stable/generated/torch.max.html#torch.max
public fun TensorType.max(dim: Int, keepDim: Boolean): TensorType
//https://pytorch.org/docs/stable/generated/torch.cummax.html#torch.cummax
public fun TensorType.cummax(dim: Int): TensorType
//https://pytorch.org/docs/stable/generated/torch.min.html#torch.min
public fun TensorType.min(dim: Int, keepDim: Boolean): TensorType
//https://pytorch.org/docs/stable/generated/torch.cummin.html#torch.cummin
public fun TensorType.cummin(dim: Int): TensorType
//https://pytorch.org/docs/stable/generated/torch.median.html#torch.median
public fun TensorType.median(dim: Int, keepDim: Boolean): TensorType
//https://pytorch.org/docs/stable/generated/torch.maximum.html#torch.maximum
public fun maximum(lhs: TensorType, rhs: TensorType)
//https://pytorch.org/docs/stable/generated/torch.minimum.html#torch.minimum
public fun minimum(lhs: TensorType, rhs: TensorType)
//https://pytorch.org/docs/stable/generated/torch.sort.html#torch.sort
public fun TensorType.sort(dim: Int, keepDim: Boolean, descending: Boolean): TensorType
}

View File

@ -41,9 +41,6 @@ public interface TensorAlgebra<T, TensorType : TensorStructure<T>> {
public operator fun TensorType.timesAssign(other: TensorType): Unit
public operator fun TensorType.unaryMinus(): TensorType
//https://pytorch.org/docs/stable/generated/torch.square.html
public fun TensorType.square(): TensorType
//https://pytorch.org/cppdocs/notes/tensor_indexing.html
public operator fun TensorType.get(i: Int): TensorType
@ -56,21 +53,6 @@ public interface TensorAlgebra<T, TensorType : TensorStructure<T>> {
public fun TensorType.eq(other: TensorType, delta: T): Boolean
//https://pytorch.org/docs/stable/generated/torch.abs.html
public fun TensorType.abs(): TensorType
//https://pytorch.org/docs/stable/generated/torch.sum.html
public fun TensorType.sum(dim: Int, keepDim: Boolean): TensorType
//https://pytorch.org/docs/stable/generated/torch.cumsum.html#torch.cumsum
public fun TensorType.cumsum(dim: Int): TensorType
//https://pytorch.org/docs/stable/generated/torch.prod.html#torch.prod
public fun TensorType.prod(dim: Int, keepDim: Boolean): TensorType
//https://pytorch.org/docs/stable/generated/torch.cumprod.html#torch.cumprod
public fun TensorType.cumprod(dim: Int): TensorType
//https://pytorch.org/docs/stable/generated/torch.matmul.html
public infix fun TensorType.dot(other: TensorType): TensorType
@ -80,12 +62,4 @@ public interface TensorAlgebra<T, TensorType : TensorStructure<T>> {
offset: Int = 0, dim1: Int = -2, dim2: Int = -1
): TensorType
//https://pytorch.org/docs/stable/generated/torch.cat.html#torch.cat
public fun cat(tensors: List<TensorType>, dim: Int): TensorType
//https://pytorch.org/docs/stable/generated/torch.flatten.html#torch.flatten
public fun TensorType.flatten(startDim: Int, endDim: Int): TensorType
//https://pytorch.org/docs/stable/generated/torch.squeeze.html
public fun TensorType.squeeze(dim: Int): TensorType
}

View File

@ -7,10 +7,4 @@ public interface TensorPartialDivisionAlgebra<T, TensorType : TensorStructure<T>
public operator fun TensorType.div(other: TensorType): TensorType
public operator fun TensorType.divAssign(value: T)
public operator fun TensorType.divAssign(other: TensorType)
//https://pytorch.org/docs/stable/generated/torch.mean.html#torch.mean
public fun TensorType.mean(dim: Int = 0, keepDim: Boolean = false): TensorType
//https://pytorch.org/docs/stable/generated/torch.var.html#torch.var
public fun TensorType.variance(dim: Int = 0, unbiased: Boolean = true, keepDim: Boolean = false): TensorType
}

View File

@ -5,11 +5,10 @@ import kotlin.math.*
public class DoubleAnalyticTensorAlgebra:
AnalyticTensorAlgebra<Double, DoubleTensor>,
DoubleOrderedTensorAlgebra()
DoubleTensorAlgebra()
{
override fun DoubleTensor.exp(): DoubleTensor = this.map(::exp)
// todo log with other base????
override fun DoubleTensor.log(): DoubleTensor = this.map(::ln)
override fun DoubleTensor.sqrt(): DoubleTensor = this.map(::sqrt)
@ -42,86 +41,6 @@ public class DoubleAnalyticTensorAlgebra:
override fun DoubleTensor.floor(): DoubleTensor = this.map(::floor)
override fun DoubleTensor.clamp(min: Double, max: Double): DoubleTensor {
TODO("Not yet implemented")
}
override fun DoubleTensor.erf(): DoubleTensor {
TODO("Not yet implemented")
}
override fun DoubleTensor.erfinv(): DoubleTensor {
TODO("Not yet implemented")
}
override fun DoubleTensor.erfc(): DoubleTensor {
TODO("Not yet implemented")
}
override fun DoubleTensor.lerp(end: DoubleTensor, weight: DoubleTensor): DoubleTensor {
TODO("Not yet implemented")
}
override fun DoubleTensor.lgamma(): DoubleTensor {
TODO("Not yet implemented")
}
override fun DoubleTensor.logit(eps: Double): DoubleTensor {
TODO("Not yet implemented")
}
override fun DoubleTensor.igamma(other: DoubleTensor): DoubleTensor {
TODO("Not yet implemented")
}
override fun DoubleTensor.igammac(other: DoubleTensor): DoubleTensor {
TODO("Not yet implemented")
}
override fun DoubleTensor.mvlgamma(dimensions: Int): DoubleTensor {
TODO("Not yet implemented")
}
override fun DoubleTensor.polygamma(order: Int): DoubleTensor {
TODO("Not yet implemented")
}
override fun DoubleTensor.pow(exponent: Double): DoubleTensor {
TODO("Not yet implemented")
}
override fun DoubleTensor.round(): DoubleTensor {
TODO("Not yet implemented")
}
override fun DoubleTensor.sigmoid(): DoubleTensor {
TODO("Not yet implemented")
}
override fun DoubleTensor.sinc(): DoubleTensor {
TODO("Not yet implemented")
}
override fun DoubleTensor.heaviside(values: DoubleTensor): DoubleTensor {
TODO("Not yet implemented")
}
override fun DoubleTensor.trapz(xValues: DoubleTensor, dim: Int): DoubleTensor {
TODO("Not yet implemented")
}
override fun DoubleTensor.quantile(q: Double, dim: Int, keepDim: Boolean): DoubleTensor {
TODO("Not yet implemented")
}
override fun DoubleTensor.std(dim: Int, unbiased: Boolean, keepDim: Boolean): DoubleTensor {
TODO("Not yet implemented")
}
override fun DoubleTensor.histc(bins: Int, min: Double, max: Double): DoubleTensor {
TODO("Not yet implemented")
}
}
public inline fun <R> DoubleAnalyticTensorAlgebra(block: DoubleAnalyticTensorAlgebra.() -> R): R =

View File

@ -1,43 +0,0 @@
package space.kscience.kmath.tensors.core
import space.kscience.kmath.tensors.OrderedTensorAlgebra
public open class DoubleOrderedTensorAlgebra:
OrderedTensorAlgebra<Double, DoubleTensor>,
DoubleTensorAlgebra()
{
override fun DoubleTensor.max(dim: Int, keepDim: Boolean): DoubleTensor {
TODO("Not yet implemented")
}
override fun DoubleTensor.cummax(dim: Int): DoubleTensor {
TODO("Not yet implemented")
}
override fun DoubleTensor.min(dim: Int, keepDim: Boolean): DoubleTensor {
TODO("Not yet implemented")
}
override fun DoubleTensor.cummin(dim: Int): DoubleTensor {
TODO("Not yet implemented")
}
override fun DoubleTensor.median(dim: Int, keepDim: Boolean): DoubleTensor {
TODO("Not yet implemented")
}
override fun maximum(lhs: DoubleTensor, rhs: DoubleTensor) {
TODO("Not yet implemented")
}
override fun minimum(lhs: DoubleTensor, rhs: DoubleTensor) {
TODO("Not yet implemented")
}
override fun DoubleTensor.sort(dim: Int, keepDim: Boolean, descending: Boolean): DoubleTensor {
TODO("Not yet implemented")
}
}
public inline fun <R> DoubleOrderedTensorAlgebra(block: DoubleOrderedTensorAlgebra.() -> R): R =
DoubleOrderedTensorAlgebra().block()

View File

@ -224,26 +224,6 @@ public open class DoubleTensorAlgebra : TensorPartialDivisionAlgebra<Double, Dou
return this.view(other.shape)
}
override fun DoubleTensor.abs(): DoubleTensor {
TODO("Not yet implemented")
}
override fun DoubleTensor.sum(dim: Int, keepDim: Boolean): DoubleTensor {
TODO("Not yet implemented")
}
override fun DoubleTensor.cumsum(dim: Int): DoubleTensor {
TODO("Not yet implemented")
}
override fun DoubleTensor.prod(dim: Int, keepDim: Boolean): DoubleTensor {
TODO("Not yet implemented")
}
override fun DoubleTensor.cumprod(dim: Int): DoubleTensor {
TODO("Not yet implemented")
}
override fun DoubleTensor.dot(other: DoubleTensor): DoubleTensor {
if (this.shape.size == 1 && other.shape.size == 1) {
return DoubleTensor(intArrayOf(1), doubleArrayOf(this.times(other).buffer.array().sum()))
@ -308,29 +288,6 @@ public open class DoubleTensorAlgebra : TensorPartialDivisionAlgebra<Double, Dou
TODO("Alya")
}
override fun cat(tensors: List<DoubleTensor>, dim: Int): DoubleTensor {
TODO("Not yet implemented")
}
override fun DoubleTensor.flatten(startDim: Int, endDim: Int): DoubleTensor {
TODO("Not yet implemented")
}
override fun DoubleTensor.mean(dim: Int, keepDim: Boolean): DoubleTensor {
TODO("Not yet implemented")
}
override fun DoubleTensor.square(): DoubleTensor {
TODO("Not yet implemented")
}
override fun DoubleTensor.variance(dim: Int, unbiased: Boolean, keepDim: Boolean): DoubleTensor {
TODO("Not yet implemented")
}
override fun DoubleTensor.squeeze(dim: Int): DoubleTensor {
TODO("Not yet implemented")
}
public fun DoubleTensor.map(transform: (Double) -> Double): DoubleTensor {
return DoubleTensor(