Switch to edit mode.
Name(s): find_tri1: one_off = $list_utils:make(length(this.graph), {}) 2: for x in [1..length(this.graph)] 3: for y in (this.graph[x]) 4: for z in (this.graph[y]) 5: if (z != x) 6: one_off[x] = setadd(one_off[x], {z, y}) 7: endif 8: endfor 9: endfor 10: endfor 11: triangles = {} 12: for x in [1..length(one_off)] 13: for y in (one_off[x]) 14: if (x in this.graph[y[1]]) 15: triangles = setadd(triangles, $list_utils:sort({x, @y})) 16: endif 17: endfor 18: endfor 19: return triangles 20: "Last modified by manta (#7165) on Sun Sep 13 01:57:08 1998 EDT."