WIP: feature/emd #521

Draft
teldufalsari wants to merge 11 commits from teldufalsari/kmath:feature/emd into dev
Showing only changes of commit e0125f0b26 - Show all commits

View File

@ -169,7 +169,7 @@ public open class SeriesAlgebra<T, out A : Ring<T>, out BA : BufferAlgebra<T, A>
public inline fun Buffer<T>.mapWithLabel(crossinline transform: A.(arg: T, label: L) -> T): Series<T> { public inline fun Buffer<T>.mapWithLabel(crossinline transform: A.(arg: T, label: L) -> T): Series<T> {
val labels = labels val labels = labels
val buf = elementAlgebra.bufferFactory(size) { val buf = elementAlgebra.bufferFactory(size) {
elementAlgebra.transform(getByOffset(it), labels[it]) elementAlgebra.transform(get(it), labels[it])
} }
return buf.moveTo(offsetIndices.first) return buf.moveTo(offsetIndices.first)
} }