Skip to content

Commit 4084439

Browse files
committed
Up version
1 parent 745a7ad commit 4084439

File tree

5 files changed

+14
-9
lines changed

5 files changed

+14
-9
lines changed

build.gradle.kts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ allprojects {
1010
}
1111

1212
group = "space.kscience"
13-
version = "0.3.0-dev-17"
13+
version = "0.3.0-dev-18"
1414
}
1515

1616
subprojects {

kmath-core/src/commonMain/kotlin/space/kscience/kmath/expressions/FunctionalExpressionAlgebra.kt

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -164,8 +164,6 @@ public open class FunctionalExpressionExtendedField<T, out A : ExtendedField<T>>
164164

165165
override fun binaryOperationFunction(operation: String): (left: Expression<T>, right: Expression<T>) -> Expression<T> =
166166
super<FunctionalExpressionField>.binaryOperationFunction(operation)
167-
168-
override fun bindSymbol(value: String): Expression<T> = super<FunctionalExpressionField>.bindSymbol(value)
169167
}
170168

171169
public inline fun <T, A : Group<T>> A.expressionInGroup(

kmath-core/src/commonMain/kotlin/space/kscience/kmath/expressions/SimpleAutoDiff.kt

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -272,7 +272,7 @@ public fun <T : Any, F : ExtendedField<T>> SimpleAutoDiffField<T, F>.sqrt(x: Aut
272272
public fun <T : Any, F : ExtendedField<T>> SimpleAutoDiffField<T, F>.pow(
273273
x: AutoDiffValue<T>,
274274
y: Double,
275-
): AutoDiffValue<T> = derive(const { x.value.pow(y)}) { z ->
275+
): AutoDiffValue<T> = derive(const { x.value.pow(y) }) { z ->
276276
x.d += z.d * y * x.value.pow(y - 1)
277277
}
278278

@@ -343,10 +343,7 @@ public fun <T : Any, F : ExtendedField<T>> SimpleAutoDiffField<T, F>.atanh(x: Au
343343
public class SimpleAutoDiffExtendedField<T : Any, F : ExtendedField<T>>(
344344
context: F,
345345
bindings: Map<Symbol, T>,
346-
) : ExtendedField<AutoDiffValue<T>>, ScaleOperations<AutoDiffValue<T>>,
347-
SimpleAutoDiffField<T, F>(context, bindings) {
348-
349-
override fun bindSymbol(value: String): AutoDiffValue<T> = super<SimpleAutoDiffField>.bindSymbol(value)
346+
) : ExtendedField<AutoDiffValue<T>>, ScaleOperations<AutoDiffValue<T>>, SimpleAutoDiffField<T, F>(context, bindings) {
350347

351348
override fun number(value: Number): AutoDiffValue<T> = const { number(value) }
352349

kmath-tensorflow/src/main/kotlin/space/kscience/kmath/tensorflow/TensorFlowAlgebra.kt

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -241,6 +241,16 @@ public abstract class TensorFlowAlgebra<T, TT : TNumber, A : Ring<T>> internal c
241241
ops.math.argMax(asTensorFlow().output, ops.constant(dim), TInt32::class.java).output()
242242
).actualTensor
243243

244+
// private val symbolCache = HashMap<String, TensorFlowOutput<T, TT>>()
245+
//
246+
// override fun bindSymbolOrNull(value: String): TensorFlowOutput<T, TT>? {
247+
// return symbolCache.getOrPut(value){ops.var}
248+
// }
249+
//
250+
// public fun StructureND<T>.grad(
251+
//
252+
// )= operate { ops.gradients() }
253+
244254
@OptIn(UnstableKMathAPI::class)
245255
override fun export(arg: StructureND<T>): StructureND<T> =
246256
if (arg is TensorFlowOutput<T, *>) arg.actualTensor else arg

kmath-tensorflow/src/main/kotlin/space/kscience/kmath/tensorflow/tfOperations.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,4 +20,4 @@ public fun <T, TT : TNumber, A> TensorFlowAlgebra<T, TT, A>.sin(
2020

2121
public fun <T, TT : TNumber, A> TensorFlowAlgebra<T, TT, A>.cos(
2222
arg: StructureND<T>,
23-
): TensorFlowOutput<T, TT> where A : TrigonometricOperations<T>, A : Ring<T> = arg.operate { ops.math.cos(it) }
23+
): TensorFlowOutput<T, TT> where A : TrigonometricOperations<T>, A : Ring<T> = arg.operate { ops.math.cos(it) }

0 commit comments

Comments
 (0)