Sha256: 27e5c1f2e00b8fbf2196e24ac0762dc13f7c3370fd0929c0021b2120f94fe61d
Contents?: true
Size: 432 Bytes
Versions: 3
Compression:
Stored size: 432 Bytes
Contents
# frozen_string_literal: true require_relative '../graph' module Tangle module Undirected module Simple # # A simple graph, without loops and multiple edges class Graph < Tangle::Undirected::Graph protected def insert_edge(edge) raise LoopError if edge.loop? raise MultiEdgeError if adjacent?(*edge.each_vertex) super end end end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
tangle-0.11.0 | lib/tangle/undirected/simple/graph.rb |
tangle-0.10.2 | lib/tangle/undirected/simple/graph.rb |
tangle-0.10.1 | lib/tangle/undirected/simple/graph.rb |