From e7b56e49720e04075448dcf407a023ec5db6b6a7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=C2=96=C2=96jenY-Poltavchiny?= Date: Wed, 5 Apr 2023 01:25:58 +0300 Subject: [PATCH] New file in example dir --- .../kscience/kmath/structures/MyTests.kt | 23 +++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 examples/src/main/kotlin/space/kscience/kmath/structures/MyTests.kt diff --git a/examples/src/main/kotlin/space/kscience/kmath/structures/MyTests.kt b/examples/src/main/kotlin/space/kscience/kmath/structures/MyTests.kt new file mode 100644 index 000000000..8b4410db4 --- /dev/null +++ b/examples/src/main/kotlin/space/kscience/kmath/structures/MyTests.kt @@ -0,0 +1,23 @@ +/* + * Copyright 2018-2023 KMath contributors. + * Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file. + */ + +package space.kscience.kmath.structures + +import space.kscience.kmath.operations.DoubleField +import space.kscience.kmath.operations.buffer +import space.kscience.kmath.operations.bufferAlgebra +import space.kscience.kmath.operations.withSize + +//inline fun MutableBuffer.Companion.same( +// n: Int, +// value: R +//): MutableBuffer = auto(n) { value } + + +fun main() { + with(DoubleField.bufferAlgebra.withSize(5)) { + println(number(2.0) + buffer(1, 2, 10, 4, 9)) + } +} \ No newline at end of file