tf_privacy.restart_query.PeriodicRoundRestartIndicator

Indicator for resetting the tree state after every a few number of queries.

Inherits From: RestartIndicator

The indicator will maintain an internal counter as state.

frequency The next function will return True every frequency number of next calls.

Methods

initialize

View source

Returns initialized state of 0 for PeriodicRoundRestartIndicator.

next

View source

Gets next bool indicator and advances the state.

Args
state The current state.

Returns
A pair (value, new_state) where value is the bool indicator and new_state of state+1.