Description Usage Arguments Details Author(s) References See Also Examples

These functions specify the decay to map distances to attractions.

1 2 3 4 5 6 7 8 | ```
decay.reciprocal(temperature, distance)
decay.exponential(temperature, distance)
decay.subtraction(temperature, distance, multiplier = 1.01)
## S3 method for class 'shallot.decay'
print(x, ...)
``` |

`temperature` |
An object of class |

`distance` |
An object of class |

`multiplier` |
An scalar greater than |

`x` |
An object of class |

`...` |
Currently ignored. |

There are currently three choices for decay functions: reciprocal, exponential, and subtraction.

The reciprocal decay maps a distance `d`

to an attraction `a`

as
follows: `a = 1/d^t`

, where `t`

is the temperature.

The exponential decay maps a distance `d`

to an attraction `a`

as
follows: `a = exp(-t*d)`

, where `t`

is the temperature.

The subtract decay maps a distance `d`

to an attraction `a`

as
follows: `a = (m-d)^t`

, where `t`

is the temperature and `m`

is the maximum distance in `distance`

multiplied by the supplied
`multiplier`.

David B. Dahl dahl@stat.byu.edu

1 2 3 4 5 | ```
temp <- temperature(1.0)
distance <- dist(scale(USArrests))
decay1 <- decay.reciprocal(temp,distance)
decay2 <- decay.exponential(temp,distance)
decay3 <- decay.subtraction(temp,distance)
``` |

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.