Build migrated to gradle-tools 1.4
This commit is contained in:
parent
5a08faf0b6
commit
645d81abf0
@ -1,6 +1,6 @@
|
||||
plugins {
|
||||
id("scientifik.mpp") version "0.1.3" apply false
|
||||
id("scientifik.publish") version "0.1.3" apply false
|
||||
id("scientifik.mpp") version "0.1.4" apply false
|
||||
id("scientifik.publish") version "0.1.4" apply false
|
||||
id("kotlinx-atomicfu") version "0.12.9" apply false
|
||||
}
|
||||
|
||||
|
@ -1,6 +1,5 @@
|
||||
plugins {
|
||||
kotlin("jvm")
|
||||
`maven-publish`
|
||||
id("scientifik.jvm")
|
||||
}
|
||||
|
||||
description = "Commons math binding for kmath"
|
||||
@ -12,19 +11,4 @@ dependencies {
|
||||
api("org.apache.commons:commons-math3:3.6.1")
|
||||
testImplementation("org.jetbrains.kotlin:kotlin-test")
|
||||
testImplementation("org.jetbrains.kotlin:kotlin-test-junit")
|
||||
}
|
||||
|
||||
|
||||
val sourcesJar by tasks.registering(Jar::class) {
|
||||
classifier = "sources"
|
||||
from(sourceSets.main.get().allSource)
|
||||
}
|
||||
|
||||
publishing {
|
||||
publications {
|
||||
register("jvm", MavenPublication::class) {
|
||||
from(components["java"])
|
||||
artifact(sourcesJar.get())
|
||||
}
|
||||
}
|
||||
}
|
@ -11,7 +11,7 @@ import scientifik.kmath.structures.*
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
* Streaming and buffer transformations
|
||||
*/
|
||||
object Transformations {
|
||||
|
||||
|
@ -8,6 +8,4 @@ kotlin.sourceSets {
|
||||
api(project(":kmath-memory"))
|
||||
}
|
||||
}
|
||||
//mingwMain {}
|
||||
//mingwTest {}
|
||||
}
|
@ -1,7 +1,14 @@
|
||||
package scientifik.kmath.operations
|
||||
|
||||
/**
|
||||
* Marker interface for any algebra
|
||||
*/
|
||||
interface Algebra
|
||||
|
||||
interface SpaceOperations<T> {
|
||||
/**
|
||||
* Space-like operations without neutral element
|
||||
*/
|
||||
interface SpaceOperations<T> : Algebra {
|
||||
/**
|
||||
* Addition operation for two context elements
|
||||
*/
|
||||
@ -38,6 +45,9 @@ interface Space<T> : SpaceOperations<T> {
|
||||
val zero: T
|
||||
}
|
||||
|
||||
/**
|
||||
* Operations on ring without multiplication neutral element
|
||||
*/
|
||||
interface RingOperations<T> : SpaceOperations<T> {
|
||||
/**
|
||||
* Multiplication for two field elements
|
||||
|
@ -0,0 +1,34 @@
|
||||
package scientifik.kmath.operations
|
||||
|
||||
import kotlin.jvm.JvmName
|
||||
import kotlin.reflect.KClass
|
||||
|
||||
/**
|
||||
* A suspendable univariate function defined in algebraic context
|
||||
*/
|
||||
interface UFunction<T, C : SpaceOperations<T>> {
|
||||
suspend operator fun C.invoke(arg: T): T
|
||||
}
|
||||
|
||||
suspend fun UFunction<Double, RealField>.invoke(arg: Double) = RealField.invoke(arg)
|
||||
|
||||
/**
|
||||
* A suspendable multivariate (N->1) function defined on algebraic context
|
||||
*/
|
||||
interface MFunction<T, C : SpaceOperations<T>> {
|
||||
/**
|
||||
* The input dimension of the function
|
||||
*/
|
||||
val dimension: UInt
|
||||
|
||||
suspend operator fun C.invoke(vararg args: T): T
|
||||
}
|
||||
|
||||
suspend fun MFunction<Double, RealField>.invoke(args: DoubleArray) = RealField.invoke(*args.toTypedArray())
|
||||
@JvmName("varargInvoke")
|
||||
suspend fun MFunction<Double, RealField>.invoke(vararg args: Double) = RealField.invoke(*args.toTypedArray())
|
||||
|
||||
|
||||
interface ParametricUFunction<T, P, C : SpaceOperations<T>> {
|
||||
suspend operator fun C.invoke(arg: T, parameter: P): T
|
||||
}
|
@ -1,6 +1,5 @@
|
||||
plugins {
|
||||
id("scientifik.mpp")
|
||||
id("kotlinx-atomicfu")
|
||||
}
|
||||
|
||||
kotlin.sourceSets {
|
||||
|
@ -1,55 +0,0 @@
|
||||
plugins {
|
||||
id "org.jetbrains.kotlin.multiplatform"
|
||||
}
|
||||
|
||||
kotlin {
|
||||
targets {
|
||||
fromPreset(presets.jvm, 'jvm')
|
||||
fromPreset(presets.js, 'js')
|
||||
// For ARM, preset should be changed to presets.iosArm32 or presets.iosArm64
|
||||
// For Linux, preset should be changed to e.g. presets.linuxX64
|
||||
// For MacOS, preset should be changed to e.g. presets.macosX64
|
||||
//fromPreset(presets.mingwX64, 'mingw')
|
||||
}
|
||||
sourceSets {
|
||||
commonMain {
|
||||
dependencies {
|
||||
api project(":kmath-core")
|
||||
implementation 'org.jetbrains.kotlin:kotlin-stdlib-common'
|
||||
api "org.jetbrains.kotlinx:kotlinx-io:$ioVersion"
|
||||
}
|
||||
}
|
||||
commonTest {
|
||||
dependencies {
|
||||
implementation 'org.jetbrains.kotlin:kotlin-test-common'
|
||||
implementation 'org.jetbrains.kotlin:kotlin-test-annotations-common'
|
||||
}
|
||||
}
|
||||
jvmMain {
|
||||
dependencies {
|
||||
implementation 'org.jetbrains.kotlin:kotlin-stdlib-jdk8'
|
||||
api "org.jetbrains.kotlinx:kotlinx-io-jvm:$ioVersion"
|
||||
}
|
||||
}
|
||||
jvmTest {
|
||||
dependencies {
|
||||
implementation 'org.jetbrains.kotlin:kotlin-test'
|
||||
implementation 'org.jetbrains.kotlin:kotlin-test-junit'
|
||||
}
|
||||
}
|
||||
jsMain {
|
||||
dependencies {
|
||||
implementation 'org.jetbrains.kotlin:kotlin-stdlib-js'
|
||||
}
|
||||
}
|
||||
jsTest {
|
||||
dependencies {
|
||||
implementation 'org.jetbrains.kotlin:kotlin-test-js'
|
||||
}
|
||||
}
|
||||
// mingwMain {
|
||||
// }
|
||||
// mingwTest {
|
||||
// }
|
||||
}
|
||||
}
|
@ -32,5 +32,6 @@ include(
|
||||
":kmath-commons",
|
||||
":kmath-koma",
|
||||
":kmath-prob",
|
||||
":kmath-io",
|
||||
":examples"
|
||||
)
|
||||
|
Loading…
Reference in New Issue
Block a user