tqec.compile.substitute.SubstitutionKey

class SubstitutionKey(spec1: CubeSpec, spec2: CubeSpec, pipe_type: PipeType)[source]

The key for selecting the substitution rule.

Substitution rules will be selected based on the key to apply the substitution during the block graph compilation.

spec1

the cube specification of the first cube. By convention, the cube corresponding to spec1 should have a smaller position than the cube corresponding to spec2.

Type:

tqec.compile.specs.CubeSpec

spec2

the cube specification of the second cube.

Type:

tqec.compile.specs.CubeSpec

pipe_type

the type of the pipe connecting the two cubes.

Type:

tqec.sketchup.block_graph.PipeType

__init__(spec1: CubeSpec, spec2: CubeSpec, pipe_type: PipeType) None

Methods

__init__(spec1, spec2, pipe_type)

Attributes

spec1

spec2

pipe_type