# `Tune.Space`
[🔗](https://github.com/mikehostetler/tune/blob/v0.5.0/lib/tune/space.ex#L1)

A value space used by search strategies.

Built-in descriptors are normalized once before search. Custom spaces are
structs whose module implements this behaviour.

# `random_state`

```elixir
@type random_state() :: :rand.state()
```

# `crossover`

```elixir
@callback crossover(struct(), term(), term(), random_state()) :: {term(), random_state()}
```

# `mutate`

```elixir
@callback mutate(struct(), term(), random_state()) :: {term(), random_state()}
```

# `sample`

```elixir
@callback sample(struct(), random_state()) :: {term(), random_state()}
```

# `valid?`

```elixir
@callback valid?(struct(), term()) :: boolean()
```

# `new`

```elixir
@spec new(term()) :: {:ok, struct()} | {:error, Exception.t()}
```

Normalizes a built-in descriptor or custom space.

---

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