Simulation and Random Generation¶
- simulate(network: technology_network) dict[str, list[bool]]¶
- simulate(network: aig_network) dict[str, list[bool]]
- simulate(network: xag_network) dict[str, list[bool]]
- simulate(network: mig_network) dict[str, list[bool]]
- simulate(layout: cartesian_gate_layout) dict[str, list[bool]]
- simulate(layout: shifted_cartesian_gate_layout) dict[str, list[bool]]
- simulate(layout: hexagonal_gate_layout) dict[str, list[bool]]
- simulate_outputs(network: technology_network) list[tuple[str, list[bool]]]¶
- simulate_outputs(network: aig_network) list[tuple[str, list[bool]]]
- simulate_outputs(network: xag_network) list[tuple[str, list[bool]]]
- simulate_outputs(network: mig_network) list[tuple[str, list[bool]]]
- simulate_outputs(layout: cartesian_gate_layout) list[tuple[str, list[bool]]]
- simulate_outputs(layout: shifted_cartesian_gate_layout) list[tuple[str, list[bool]]]
- simulate_outputs(layout: hexagonal_gate_layout) list[tuple[str, list[bool]]]
Return (name, bits) pairs in output declaration order, preserving duplicate labels. Truth-table storage grows exponentially with the input count; fewer than 38 inputs is a representation bound, not a memory guarantee.
- random_network(inputs: int, gates: int, seed: int, *, network_type: type[technology_network] = mnt.pyfiction.networks.technology_network) technology_network¶
- random_network(inputs: int, gates: int, seed: int, *, network_type: type[aig_network]) aig_network
- random_network(inputs: int, gates: int, seed: int, *, network_type: type[xag_network]) xag_network
- random_network(inputs: int, gates: int, seed: int, *, network_type: type[mig_network]) mig_network
- random_network(inputs: int, gates: int, seed: int, *, network_type: type[technology_network | aig_network | xag_network | mig_network]) technology_network | aig_network | xag_network | mig_network
Overloaded function.
Overload 1
Generate directly in the selected network representation. network_type defaults to technology_network. Require at least two inputs and one gate; use the seed as the network name.
Overload 2
Overload 3
Overload 4
Overload 5
Random network generation accepts a keyword-only network_type class.
The default is technology_network; aig_network, xag_network, and mig_network select
their native representations. Pass the exact registered class; subclasses are not supported.
from mnt.pyfiction.networks import aig_network, random_network
random = random_network(3, 4, 42, network_type=aig_network)