From 508b2ebd7a582786fddfd52b20298c5b7f877408 Mon Sep 17 00:00:00 2001 From: "M.V. Hutz" Date: Sat, 17 Jan 2026 14:56:18 -0500 Subject: [PATCH] chore: remove unused deltanet package Closes #34 --- pkg/deltanet/deltanet.go | 6 --- pkg/deltanet/node.go | 94 ---------------------------------------- 2 files changed, 100 deletions(-) delete mode 100644 pkg/deltanet/deltanet.go delete mode 100644 pkg/deltanet/node.go diff --git a/pkg/deltanet/deltanet.go b/pkg/deltanet/deltanet.go deleted file mode 100644 index bea8298..0000000 --- a/pkg/deltanet/deltanet.go +++ /dev/null @@ -1,6 +0,0 @@ -// Package "deltanet" is a reduction strategy using ∆-nets. -package deltanet - -type Graph struct { - Nodes []Node -} diff --git a/pkg/deltanet/node.go b/pkg/deltanet/node.go deleted file mode 100644 index 91a77d0..0000000 --- a/pkg/deltanet/node.go +++ /dev/null @@ -1,94 +0,0 @@ -package deltanet - -/** ------------------------------------------------------------------------- */ - -// A connection between exactly two nodes in a graph. -type Edge struct { - A, B Node -} - -// Returns all nodes the edge is connected to. -func (e Edge) GetConnections() []Node { return []Node{e.A, e.B} } - -// Determines if a node is connected via this edge. -func (e Edge) IsConnected(n Node) bool { return e.A == n || e.B == n } - -// Swaps an edges connected with one node, for another. -func (e *Edge) Swap(from Node, to Node) { - if e.A == from { - e.A = to - } - if e.B == from { - e.B = to - } -} - -// Returns true if the edge is connected to each node via their pricniple ports. -func (e Edge) IsPrincipleEdge() bool { - return e.A.GetMainPort() == e && e.B.GetMainPort() == e -} - -/** ------------------------------------------------------------------------- */ - -type Node interface { - // Returns the principle port that the node is attached to. - GetMainPort() Edge - - // Returns all auxiliary ports that the node has. These ports are guaranteed - // to be ordered clockwise, as they would appear graphically. - GetAuxPorts() []Edge - - // Returns the label of the node. May be blank. - GetLabel() string -} - -/** ------------------------------------------------------------------------- */ - -type EraserNode struct { - Main Edge -} - -func (n EraserNode) GetLabel() string { return "Ⓧ" } -func (n EraserNode) GetMainPort() Edge { return n.Main } -func (n EraserNode) GetAuxPorts() []Edge { return []Edge{} } - -/** ------------------------------------------------------------------------- */ - -type ReplicatorNode struct { - Main Edge - Level uint - Aux []Edge - Deltas []int -} - -func (n ReplicatorNode) GetLabel() string { return "" } -func (n ReplicatorNode) GetMainPort() Edge { return n.Main } -func (n ReplicatorNode) GetAuxPorts() []Edge { return n.Aux } - -// Returns the level of the replicator node. -func (n ReplicatorNode) GetLevel() uint { return n.Level } - -/** ------------------------------------------------------------------------- */ - -type FanNode struct { - Label string - Main Edge - Left, Right Edge -} - -func (n FanNode) GetLabel() string { return n.Label } -func (n FanNode) GetMainPort() Edge { return n.Main } -func (n FanNode) GetAuxPorts() []Edge { return []Edge{n.Left, n.Right} } - -/** ------------------------------------------------------------------------- */ - -type TerminalNode struct { - Label string - Main Edge -} - -func (n TerminalNode) GetLabel() string { return n.Label } -func (n TerminalNode) GetMainPort() Edge { return n.Main } -func (n TerminalNode) GetAuxPorts() []Edge { return []Edge{} } - -/** ------------------------------------------------------------------------- */ -- 2.49.1