toEnvironmentSurrogate

fun <T, P : Position<out P>, TS : Any, PS : PositionSurrogate> Environment<T, P>.toEnvironmentSurrogate(toConcentrationSurrogate: (T) -> TS, toPositionSurrogate: (P) -> PS): EnvironmentSurrogate<TS, PS>

A function that maps an Environment to its surrogate class (EnvironmentSurrogate).

Parameters

the surrogate type of the position.
toConcentrationSurrogate

the mapping function from to .

toPositionSurrogate

the mapping function from

to .


fun <T, P : Position<out P>, TS : Any> Environment<T, P>.toEnvironmentSurrogate(toConcentrationSurrogate: (T) -> TS): EnvironmentSurrogate<TS, PositionSurrogate>

A function that maps an Environment to its surrogate class (EnvironmentSurrogate). Use the toSuitablePositionSurrogate strategy for PositionSurrogate mapping.

Parameters

the surrogate type of the concentration.
toConcentrationSurrogate

the mapping function from to .