Method find_intersec
has a Cognitive Complexity of 13 (exceeds 5 allowed). Consider refactoring. Open
def find_intersec
big_mapped_vertices, small_mapped_vertices = [], []
lattices_variants = nil
loop do
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Method vertices_with_differ_edges
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
def vertices_with_differ_edges(mapped_big, big_to_small)
result = mapped_big.each_with_object(Set.new) do |bv, vertices|
sv = big_to_small[bv]
mapped_big.each do |bw|
next if bv == bw
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Method vertex_comparer
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
def vertex_comparer(g1, g2, v, w)
# valence is not compared because could not be case when names is equal
# and valencies is not
return false unless v.name == w.name && v.lattice == w.lattice
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"