overrides/model.rb
#This looks for edges that have a start/end vertex at the point
This looks for edges that have a start/end vertex at the point
This looks for edges that have a start / end vertex at the point
def traverse(path_list, list_edges, start_vertex, end_vertex, forbidden_edges: [])
    path_edges = list_edges.reject { |e| forbidden_edges.include?(e) }
    new_path = nil
    path_edges.each do |path_edge|
      puts "Path #{path_edge.entityID}"
      if path_edge.on?(end_vertex)
        puts "End Found"
        return path_list.concat([path_edge])
      end
      new_path  = traverse(path_list.concat([path_edge]),path_edge.connected_at_other_vertex(start_vertex), path_edge.other_point(start_vertex), end_vertex,
               forbidden_edges: forbidden_edges.concat([path_edge]))
    end
    return new_path
  end
def traverse ( path_list , list_edges , start_vertex , end_vertex , forbidden_edges : [ ] ) path_edges = list_edges . reject { | e | forbidden_edges . include? ( e ) } new_path = nil path_edges . each do | path_edge | puts "Path #{path_edge.entityID}" if path_edge . on? ( end_vertex ) puts "End Found" return path_list . concat ( [ path_edge ] ) end new_path = traverse ( path_list . concat ( [ path_edge ] ) , path_edge . connected_at_other_vertex ( start_vertex ) , path_edge . other_point ( start_vertex ) , end_vertex , forbidden_edges : forbidden_edges . concat ( [ path_edge ] ) ) end return new_path end
This looks for edges that have a start/end vertex at the point
This looks for edges that have a start / end vertex at the point
path_list
<not_specific>
list_edges
<not_specific>
start_vertex
<not_specific>
end_vertex
<not_specific>
forbidden_edges
<not_specific>