# decay.reciprocal: Decay Functions In shallot: Random Partition Distribution Indexed by Pairwise Information

## Description

These functions specify the decay to map distances to attractions.

## Usage

 ```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, ...) ```

## Arguments

 `temperature` An object of class `shallot.temperature`. `distance` An object of class `dist`. `multiplier` An scalar greater than `1.0` to ensure that attractions from `decay.subtraction` are finite. `x` An object of class `shallot.decay`. `...` Currently ignored.

## Details

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.

## Author(s)

David B. Dahl dahl@stat.byu.edu

## References

`dist`, `temperature`, `attraction`
 ```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) ```