# `Tune.Search.Study`
[🔗](https://github.com/mikehostetler/tune/blob/v0.5.0/lib/tune/search/study.ex#L1)

Shared limits and accounting for Tune runs.

A Study owns limits, accounting, candidate identity, history, the incumbent,
local random state, stop state, and result construction. It does not know a
search algorithm or a runtime program type.

# `t`

```elixir
@type t() :: %Tune.Search.Study{
  best: term(),
  budget: term(),
  calls: term(),
  candidates: term(),
  evaluations: term(),
  expires_at: term(),
  limits: term(),
  max_model_calls: term(),
  metadata: term(),
  next_id: term(),
  notes: term(),
  rand: term(),
  seed: term(),
  stop_reason: term(),
  successful_models: term(),
  usage: term()
}
```

# `account_evaluation`

```elixir
@spec account_evaluation(t(), Tune.Evaluation.t()) :: t()
```

# `account_score`

```elixir
@spec account_score(t(), Tune.Evaluation.t()) :: t()
```

# `emit`

```elixir
@spec emit(t(), map()) :: :ok
```

# `evaluation_limits`

```elixir
@spec evaluation_limits(t()) :: map()
```

# `exhausted?`

```elixir
@spec exhausted?(t()) :: boolean()
```

# `incumbent`

```elixir
@spec incumbent(t()) :: Tune.Candidate.t() | nil
```

# `limit_reason`

```elixir
@spec limit_reason(t()) :: atom() | nil
```

# `new`

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

# `note`

```elixir
@spec note(t(), atom(), term()) :: t()
```

# `notes`

```elixir
@spec notes(t()) :: map()
```

# `random`

```elixir
@spec random(t()) :: {float(), t()}
```

# `random`

```elixir
@spec random(t(), (term() -&gt; {term(), term()})) :: {term(), t()}
```

# `record`

```elixir
@spec record(t(), term(), map(), Tune.Evaluation.t() | nil, map()) ::
  {Tune.Candidate.t(), t()}
```

# `remaining_deadline`

```elixir
@spec remaining_deadline(t()) :: non_neg_integer() | nil
```

# `remaining_evaluations`

```elixir
@spec remaining_evaluations(t()) :: non_neg_integer() | nil
```

# `remaining_model_calls`

```elixir
@spec remaining_model_calls(t()) :: non_neg_integer() | nil
```

# `result`

```elixir
@spec result(t(), term(), map(), keyword()) :: Tune.Result.t()
```

# `sample`

```elixir
@spec sample(t(), list(), non_neg_integer()) :: {list(), t()}
```

# `shuffle`

```elixir
@spec shuffle(t(), list()) :: {list(), t()}
```

# `stop`

```elixir
@spec stop(t(), atom()) :: t()
```

# `stop_reason`

```elixir
@spec stop_reason(t()) :: atom() | nil
```

# `uniform`

```elixir
@spec uniform(t(), pos_integer()) :: {non_neg_integer(), t()}
```

---

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