Fix platform declarations

This commit is contained in:
Iaroslav Postovalov 2020-10-23 17:01:16 +07:00
parent 826ec727b7
commit 59b120e086
No known key found for this signature in database
GPG Key ID: 46E15E4A31B3BCD7

View File

@ -6,6 +6,7 @@ import kscience.kmath.chains.collect
import kscience.kmath.structures.Buffer import kscience.kmath.structures.Buffer
import kscience.kmath.structures.BufferFactory import kscience.kmath.structures.BufferFactory
import kscience.kmath.structures.IntBuffer import kscience.kmath.structures.IntBuffer
import kotlin.jvm.JvmName
/** /**
* Sampler that generates chains of values of type [T]. * Sampler that generates chains of values of type [T].
@ -83,11 +84,13 @@ public suspend fun <T : Any> Sampler<T>.next(generator: RandomGenerator): T = sa
/** /**
* Generates [size] real samples and chunks them into some buffers. * Generates [size] real samples and chunks them into some buffers.
*/ */
@JvmName("sampleRealBuffer")
public fun Sampler<Double>.sampleBuffer(generator: RandomGenerator, size: Int): Chain<Buffer<Double>> = public fun Sampler<Double>.sampleBuffer(generator: RandomGenerator, size: Int): Chain<Buffer<Double>> =
sampleBuffer(generator, size, Buffer.Companion::real) sampleBuffer(generator, size, Buffer.Companion::real)
/** /**
* Generates [size] integer samples and chunks them into some buffers. * Generates [size] integer samples and chunks them into some buffers.
*/ */
@JvmName("sampleIntBuffer")
public fun Sampler<Int>.sampleBuffer(generator: RandomGenerator, size: Int): Chain<Buffer<Int>> = public fun Sampler<Int>.sampleBuffer(generator: RandomGenerator, size: Int): Chain<Buffer<Int>> =
sampleBuffer(generator, size, ::IntBuffer) sampleBuffer(generator, size, ::IntBuffer)