lib/cpee/processtransformation/structures.rb in cpee-1.3.146 vs lib/cpee/processtransformation/structures.rb in cpee-1.3.147
- old
+ new
@@ -368,11 +368,12 @@
loops.each do |l|
maxcut.upto(l.length) do |i|
maxcut = i if t[0...i] == l[0...i]
end
end
- loops << self[i].shift(maxcut)
+ cutted = self[i].shift(maxcut)
+ loops << cutted if cutted.length > 1 ### if only the loop node is left, no need to attach
end
end
def extend
# find largest common
@@ -399,10 +400,10 @@
end
end
end
end
- max.incoming = self.length
+ max.incoming = self.length + 1
max
end
def segment_by_loops(loops)
# supress loops