boofun.visualization.widgets

Interactive Jupyter widgets for Boolean function exploration.

This module provides ipywidgets-based interactive tools for exploring Boolean functions in Jupyter notebooks.

Requires: ipywidgets (pip install ipywidgets)

Functions

create_function_explorer(f)

Convenience function to create and display a function explorer.

create_growth_explorer(family_func[, name, ...])

Convenience function to create and display a growth explorer.

Classes

GrowthExplorer(family_func[, name, n_range])

Interactive widget for exploring how functions grow with n.

InteractiveFunctionExplorer(f)

Interactive widget for exploring a single Boolean function.

PropertyDashboard(functions)

Dashboard comparing multiple functions side by side.

class boofun.visualization.widgets.InteractiveFunctionExplorer(f: BooleanFunction)[source]

Interactive widget for exploring a single Boolean function.

Features: - View truth table - View Fourier coefficients - View influences - Noise stability curve

__init__(f: BooleanFunction)[source]

Create explorer for a Boolean function.

Parameters:

f – Boolean function to explore

display()[source]

Show the interactive widget.

class boofun.visualization.widgets.GrowthExplorer(family_func: Callable[[int], 'BooleanFunction'], name: str = 'Function', n_range: tuple = (1, 12))[source]

Interactive widget for exploring how functions grow with n.

Features: - Slider to change n - Real-time plots of properties - Compare with theoretical bounds

__init__(family_func: Callable[[int], 'BooleanFunction'], name: str = 'Function', n_range: tuple = (1, 12))[source]

Create growth explorer.

Parameters:
  • family_func – Function that takes n and returns BooleanFunction

  • name – Name of the function family

  • n_range – (min_n, max_n) range for slider

display()[source]

Show the interactive widget.

class boofun.visualization.widgets.PropertyDashboard(functions: Dict[str, 'BooleanFunction'])[source]

Dashboard comparing multiple functions side by side.

__init__(functions: Dict[str, 'BooleanFunction'])[source]

Create dashboard for multiple functions.

Parameters:

functions – Dict mapping names to BooleanFunction objects

display()[source]

Show the dashboard.

boofun.visualization.widgets.create_function_explorer(f: BooleanFunction) InteractiveFunctionExplorer[source]

Convenience function to create and display a function explorer.

Parameters:

f – Boolean function to explore

Returns:

InteractiveFunctionExplorer instance

boofun.visualization.widgets.create_growth_explorer(family_func: Callable[[int], 'BooleanFunction'], name: str = 'Function', n_range: tuple = (1, 12)) GrowthExplorer[source]

Convenience function to create and display a growth explorer.

Parameters:
  • family_func – Function that takes n and returns BooleanFunction

  • name – Name of the function family

  • n_range – (min_n, max_n) range

Returns:

GrowthExplorer instance