# tf_privacy.restart_query.RestartIndicator

<br />

|---|
| [![](https://www.tensorflow.org/images/GitHub-Mark-32px.png) View source on GitHub](https://github.com/tensorflow/privacy/blob/v0.9.0/privacy/privacy/dp_query/restart_query.py#L27-L55) |

Base class establishing interface for restarting the tree state.

A `RestartIndicator` maintains a state, and each time `next` is called, a bool
value is generated to indicate whether to restart, and the indicator state is
advanced.

## Methods

### `initialize`

[View source](https://github.com/tensorflow/privacy/blob/v0.9.0/privacy/privacy/dp_query/restart_query.py#L35-L42)

    @abc.abstractmethod
    initialize()

Makes an initialized state for `RestartIndicator`.

<br />

<br />

<br />

| Returns ||
|---|---|
| An initial state. ||

<br />

### `next`

[View source](https://github.com/tensorflow/privacy/blob/v0.9.0/privacy/privacy/dp_query/restart_query.py#L44-L55)

    @abc.abstractmethod
    next(
        state
    )

Gets next bool indicator and advances the `RestartIndicator` state.

<br />

<br />

<br />

| Args ||
|---|---|
| `state` | The current state. |

<br />

<br />

<br />

<br />

| Returns ||
|---|---|
| A pair (value, new_state) where value is bool indicator and new_state is the advanced state. ||

<br />