Skip to content

Commit

Permalink
undo last commit
Browse files Browse the repository at this point in the history
  • Loading branch information
RazinShaikh committed Jul 20, 2024
1 parent 5d32e35 commit 3b7007d
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions pyzx/editor_actions.py
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@ def add_Z_identity(g: BaseGraph[VT,ET],
etab[upair(v2,w)] = [1,0]
return (etab, [], rem_edges, False)

def match_bialgebra_op(g: BaseGraph[VT,ET],
def match_bialgebra(g: BaseGraph[VT,ET],
edgef: Optional[Callable[[ET],bool]] = None
) -> List[Tuple[VT,VT]]:
if edgef is not None: candidates = set([e for e in g.edges() if edgef(e)])
Expand Down Expand Up @@ -252,7 +252,7 @@ def match_bialgebra_op(g: BaseGraph[VT,ET],
candidates.difference_update(g.incident_edges(n))
return m

def bialgebra_op(g: BaseGraph[VT,ET],
def bialgebra(g: BaseGraph[VT,ET],
matches: List[Tuple[VT,VT]]
) -> rules.RewriteOutputType[VT,ET]:
rem_verts = []
Expand Down Expand Up @@ -300,7 +300,7 @@ def bialgebra_op(g: BaseGraph[VT,ET],
g.scalar.add_power((g.vertex_degree(v1)-2)*(g.vertex_degree(v2)-2))
return (etab, rem_verts, [], False)

def match_bialgebra(g: BaseGraph[VT,ET],
def match_bialgebra_op(g: BaseGraph[VT,ET],
vertexf: Optional[Callable[[VT], bool]] = None,
vertex_type: Optional[Tuple[VertexType, VertexType]] = None,
edge_type: Optional[EdgeType] = None
Expand Down Expand Up @@ -332,7 +332,7 @@ def match_bialgebra(g: BaseGraph[VT,ET],
return None
return type1_vertices, type2_vertices

def bialgebra(g: BaseGraph[VT,ET],
def bialgebra_op(g: BaseGraph[VT,ET],
matches: Tuple[List[VT], List[VT]],
edge_type: Optional[EdgeType] = EdgeType.SIMPLE
) -> rules.RewriteOutputType[VT,ET]:
Expand Down

0 comments on commit 3b7007d

Please sign in to comment.