# `Monty.Frameworks.Models.Salience.ReturnInhibitor.DecayKernel`
[🔗](https://github.com/d-led/ex.tbp.monty/blob/v0.1.0/packages/ex_tbp_monty_core/lib/monty/frameworks/models/salience/return_inhibitor/decay_kernel.ex#L1)

One place the sensor has been, and how much it still says "not here again".

Mirrors
`tbp/monty/frameworks/models/salience/return_inhibitor.py::DecayKernel`: a
kernel returns the product of two exponentials — one falling with the time since
it was created, one falling with distance from where it was created — so a
salience module stops proposing the spot it just looked at, and stops sooner the
further away it is looking.

Both decays are half-lives: `tau_t` and `tau_s` are the times and distances at
which the weight halves, so the exponent divides by `tau / ln 2`. Beyond
`:spatial_cutoff` metres the kernel says nothing at all, which keeps a
surface's far side free of a visit to its near side.

Monty mutates a kernel in place; a struct here is a value, so stepping answers
the kernel and whether it has decayed below `:w_t_min` — at which point its
field drops it.

# `location`

```elixir
@type location() :: [float()]
```

# `points`

```elixir
@type points() :: [[float()]]
```

# `t`

```elixir
@type t() :: %Monty.Frameworks.Models.Salience.ReturnInhibitor.DecayKernel{
  location: location(),
  spatial_cutoff: float() | nil,
  steps: non_neg_integer(),
  tau_s: float(),
  tau_t: float(),
  w_t_min: float()
}
```

# `new`

```elixir
@spec new(location(), keyword()) :: t()
```

# `space_weight`

```elixir
@spec space_weight(t(), points()) :: [float()]
```

How much the kernel matters at each of `points`, from distance alone.

Zero beyond the spatial cutoff, which is what makes the kernel local rather
than merely weaker in the distance.

# `step`

```elixir
@spec step(t()) :: {t(), boolean()}
```

One step older, and whether that was one too many.

Monty checks the *new* weight against the minimum, so a kernel is dropped on the
step after it falls below it.

# `time_weight`

```elixir
@spec time_weight(t()) :: float()
```

How much the kernel still matters, from its age alone.

# `weights`

```elixir
@spec weights(t(), points()) :: [float()]
```

The kernel's weight at each point: its age and its distance together.

---

*Consult [api-reference.md](api-reference.md) for complete listing*
