org.jetbrains.kotlinx.ggdsl.letsplot.stat.statScaled.kt Maven / Gradle / Ivy
package org.jetbrains.kotlinx.ggdsl.letsplot.stat
import org.jetbrains.kotlinx.ggdsl.dsl.ScalableNonPositionalAes
import org.jetbrains.kotlinx.ggdsl.dsl.ScalablePositionalAes
import org.jetbrains.kotlinx.ggdsl.dsl.scaled
import org.jetbrains.kotlinx.ggdsl.ir.bindings.*
import org.jetbrains.kotlinx.ggdsl.ir.scale.NonPositionalScale
import org.jetbrains.kotlinx.ggdsl.ir.scale.NonPositionalUnspecifiedScale
import org.jetbrains.kotlinx.ggdsl.ir.scale.PositionalScale
import org.jetbrains.kotlinx.ggdsl.ir.scale.PositionalUnspecifiedScale
import kotlin.reflect.typeOf
public inline fun Statistic.scaled(): ColumnScaledUnspecifiedDefault =
ColumnScaledUnspecifiedDefault(this.toColumnPointer())
public inline fun Statistic.scaled(scale: PositionalUnspecifiedScale): ColumnScaledPositionalUnspecified =
ColumnScaledPositionalUnspecified(this.toColumnPointer(), scale)
public inline fun Statistic.scaled(scale: NonPositionalUnspecifiedScale): ColumnScaledNonPositionalUnspecified =
ColumnScaledNonPositionalUnspecified(this.toColumnPointer(), scale)
public inline fun Statistic.scaled(
scale: PositionalScale
): ColumnScaledPositional = ColumnScaledPositional(this.toColumnPointer(), scale)
public inline fun Statistic.scaled(
scale: NonPositionalScale
): ColumnScaledNonPositional = ColumnScaledNonPositional(this.toColumnPointer(), scale)
public inline operator fun ScalablePositionalAes.invoke(
stat: Statistic
): ScaledUnspecifiedDefaultPositionalMapping {
val mapping = ScaledUnspecifiedDefaultPositionalMapping(
this.name,
stat.toColumnPointer().scaled(),
typeOf()
)
context.bindingCollector.mappings[this.name] = mapping
return mapping
}
public inline operator fun
ScalableNonPositionalAes.invoke(
stat: Statistic
): ScaledUnspecifiedDefaultNonPositionalMapping {
val mapping = ScaledUnspecifiedDefaultNonPositionalMapping(
this.name,
stat.toColumnPointer().scaled(),
typeOf()
)
context.bindingCollector.mappings[this.name] = mapping
return mapping
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy