Package space.kscience.kmath.streaming

Types

RingBuffer
Link copied to clipboard
common
class RingBuffer<T>(buffer: MutableBuffer<T?>, startIndex: Int, size: Int) : Buffer<T>
Thread-safe ring buffer

Functions

asFlow
Link copied to clipboard
common
fun <T> Buffer<T>.asFlow(): Flow<T>
Create a Flow from buffer
chunked
Link copied to clipboard
common
fun Flow<Double>.chunked(bufferSize: Int): Flow<DoubleBuffer>
Specialized flow chunker for real buffer
fun <T> Flow<T>.chunked(bufferSize: Int, bufferFactory: BufferFactory<T>): Flow<Buffer<T>>
Collect incoming flow into fixed size chunks
spread
Link copied to clipboard
common
fun <T> Flow<Buffer<T>>.spread(): Flow<T>
Flat map a Flow of Buffer into continuous Flow of elements
windowed
Link copied to clipboard
common
fun <T> Flow<T>.windowed(window: Int): Flow<Buffer<T>>
Map a flow to a moving window buffer.