Merge to update docs and contributions #504
@ -439,7 +439,7 @@ public class DSField<T, A : ExtendedField<T>>(
|
||||
}
|
||||
|
||||
@UnstableKMathAPI
|
||||
public class DerivativeStructureFieldExpression<T, A : ExtendedField<T>>(
|
||||
public class DSFieldExpression<T, A : ExtendedField<T>>(
|
||||
public val algebra: A,
|
||||
public val bufferFactory: MutableBufferFactory<T>,
|
||||
public val function: DSField<T, A>.() -> DS<T, A>,
|
||||
|
@ -30,7 +30,7 @@ internal class AutoDiffTest {
|
||||
private val y by symbol
|
||||
|
||||
@Test
|
||||
fun derivativeStructureFieldTest() {
|
||||
fun dsAlgebraTest() {
|
||||
diff(2, x to 1.0, y to 1.0) {
|
||||
val x = bindSymbol(x)//by binding()
|
||||
val y = bindSymbol("y")
|
||||
@ -44,8 +44,8 @@ internal class AutoDiffTest {
|
||||
}
|
||||
|
||||
@Test
|
||||
fun autoDifTest() {
|
||||
val f = DerivativeStructureFieldExpression(DoubleField, ::DoubleBuffer) {
|
||||
fun dsExpressionTest() {
|
||||
val f = DSFieldExpression(DoubleField, ::DoubleBuffer) {
|
||||
val x by binding
|
||||
val y by binding
|
||||
x.pow(2) + 2 * x * y + y.pow(2) + 1
|
||||
|
Loading…
Reference in New Issue
Block a user