boofun.visualization.latex_export
LaTeX/TikZ Export for Boolean Function Visualizations.
This module provides comprehensive LaTeX export for: - Fourier spectrum diagrams - Influence bar charts - Decision trees - Function family comparison tables - Boolean cube visualizations
Functions
|
Export comparison table of multiple functions. |
|
Export Boolean cube visualization as TikZ. |
|
Export Fourier spectrum as TikZ bar chart. |
|
Export influences as TikZ bar chart. |
|
Export Fourier spectrum as LaTeX table. |
Classes
|
Unified LaTeX exporter for Boolean function visualizations. |
- boofun.visualization.latex_export.export_fourier_tikz(f: BooleanFunction, var_names: List[str] | None = None, width: float = 10, height: float = 5, highlight_threshold: float = 0.1, show_labels: bool = True) str[source]
Export Fourier spectrum as TikZ bar chart.
- Parameters:
f – Boolean function
var_names – Variable names for subset labels
width – Chart width in cm
height – Chart height in cm
highlight_threshold – Highlight coefficients above this
show_labels – Show subset labels on x-axis
- Returns:
TikZ code string
- boofun.visualization.latex_export.export_influences_tikz(f: BooleanFunction, var_names: List[str] | None = None, width: float = 8, height: float = 5, horizontal: bool = True) str[source]
Export influences as TikZ bar chart.
- Parameters:
f – Boolean function
var_names – Variable names
width – Chart width in cm
height – Chart height in cm
horizontal – Use horizontal bars
- Returns:
TikZ code string
- boofun.visualization.latex_export.export_cube_tikz(n: int = 3, labels: bool = True) str[source]
Export Boolean cube visualization as TikZ.
- Parameters:
n – Number of dimensions (2, 3, or 4)
labels – Show vertex labels
- Returns:
TikZ code string
- boofun.visualization.latex_export.export_comparison_table(functions: Dict[str, BooleanFunction], properties: List[str] = None) str[source]
Export comparison table of multiple functions.
- Parameters:
functions – Dict mapping names to BooleanFunction objects
properties – List of properties to compare
- Returns:
LaTeX table string
- boofun.visualization.latex_export.export_spectrum_table(f: BooleanFunction, var_names: List[str] | None = None, max_rows: int = 16) str[source]
Export Fourier spectrum as LaTeX table.
- Parameters:
f – Boolean function
var_names – Variable names
max_rows – Maximum rows to show
- Returns:
LaTeX table string
- class boofun.visualization.latex_export.LaTeXExporter(f: BooleanFunction, var_names: List[str] | None = None)[source]
Unified LaTeX exporter for Boolean function visualizations.
- __init__(f: BooleanFunction, var_names: List[str] | None = None)[source]
Initialize exporter.
- Parameters:
f – Boolean function
var_names – Variable names