// Souffle - A Datalog Compiler
// Copyright (c) 2016, The Souffle Developers. All rights reserved
// Licensed under the Universal Permissive License v 1.0 as shown at:
// - https://opensource.org/licenses/UPL
// - <souffle root>/licenses/SOUFFLE-UPL.txt

// Find the shortest outward edge for every Node
.type Node <: symbol

.decl Edge(n:Node, m:Node, w:number)
.input Edge()

.decl ShortestEdgeFromN(n:Node, l:number)
.output ShortestEdgeFromN()

ShortestEdgeFromN(x, l) :- Edge(x, _, _), l = min Z : Edge(x, _, Z).
