Sha256: 5e7cb3db5b31675bf88129a1a163fe9ad4b1b10a5090cc1925aeced99f7ef427
Contents?: true
Size: 348 Bytes
Versions: 15
Compression:
Stored size: 348 Bytes
Contents
require 'tangle/edge' module Tangle module Simple # # An edge in a simple graph, with no loops or multiedges # class Edge < Tangle::Edge private def validate_edge super raise LoopError unless @vertices.count == 2 raise MultiEdgeError if @graph.edges.include? self end end end end
Version data entries
15 entries across 15 versions & 1 rubygems