tf_privacy.tree_aggregation.ValueGenerator

Base class establishing interface for stateful value generation.

A ValueGenerator maintains a state, and each time next is called, a new value is generated and the state is advanced.

Methods

initialize

View source

Makes an initialized state for the ValueGenerator.

Returns
An initial state.

next

View source

Gets next value and advances the ValueGenerator.

Args
state The current state.

Returns
A pair (value, new_state) where value is the next value and new_state is the advanced state.