mapWithLabel fix

This commit is contained in:
Igor Dunaev 2024-04-24 16:56:52 +03:00
parent fc0393436f
commit e0125f0b26

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> {
val labels = labels
val buf = elementAlgebra.bufferFactory(size) {
elementAlgebra.transform(getByOffset(it), labels[it])
elementAlgebra.transform(get(it), labels[it])
}
return buf.moveTo(offsetIndices.first)
}