Description Usage Arguments Value See Also Examples
Create a bijective mapping between the two real intervals
[domainMin, domainMax]
and [imageMin, imageMax]
. The returned
mapping will map domainMin
to imageMin
and domainMax
to imageMax
and vice versa.
Notice that domainMin>domainMax
as well as imageMi >imageMax
are both permissible, in which case smaller input values may map to larger
output values.
Furthermore, although we specify domain and image boundaries, the returned
mapping will not have any boundaries. It is entirely allowed to map values
smaller than domainMin
or larger than domainMax
. These may
then land outside of [imageMin, imageMax]
, though.
1 2 | Transformation.mapIntervals(domainMin, domainMax, imageMin = 0,
imageMax = 1)
|
domainMin |
the minimum of the original interval |
domainMax |
the maximum of the original interval |
imageMin |
the minimum of the goal interval |
imageMax |
the maximum of the goal interval |
a bijection between [d, domainMax]
and [0,1]
Transformation.normalizeInterval
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 | trafo <- Transformation.mapIntervals(-1, 1, 0, 2)
trafo
# An object of class "Transformation"
# Slot "forward":
# function (x)
# x + 1
# <environment: 0x35519c0>
#
# Slot "backward":
# function (x)
# x - 1
# <environment: 0x35519c0>
trafo <- Transformation.mapIntervals(0.2, 12, -0.1, 2)
trafo
# An object of class "Transformation"
# Slot "forward":
# function (x)
# (2.1 * ((x - 0.2)/11.8)) - 0.1
# <environment: 0x3c877f0>
#
# Slot "backward":
# function (x)
# 0.2 + (11.8 * ((x + 0.1)/2.1))
# <environment: 0x3c877f0>
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.