diff --git a/src/storm/utility/shortestPaths.cpp b/src/storm/utility/shortestPaths.cpp index 19ba70983..c2f6a97b9 100644 --- a/src/storm/utility/shortestPaths.cpp +++ b/src/storm/utility/shortestPaths.cpp @@ -1,3 +1,4 @@ +#include #include #include #include @@ -373,6 +374,16 @@ namespace storm { template class ShortestPathsGenerator; + + // only prints the info stored in the Path struct; + // does not traverse the actual path (see printKShortestPath for that) + template + std::ostream& operator<<(std::ostream& out, Path const& p) { + out << "Path with predecessorNode: " << ((p.predecessorNode) ? std::to_string(p.predecessorNode.get()) : "None"); + out << " predecessorK: " << p.predecessorK << " distance: " << p.distance; + return out; + } + template std::ostream& operator<<(std::ostream& out, Path const& p); } } } diff --git a/src/storm/utility/shortestPaths.h b/src/storm/utility/shortestPaths.h index 359a30c5e..ad344f1aa 100644 --- a/src/storm/utility/shortestPaths.h +++ b/src/storm/utility/shortestPaths.h @@ -55,6 +55,9 @@ namespace storm { } }; + template + std::ostream& operator<<(std::ostream& out, Path const& p); + // when using the raw matrix/vector invocation, this enum parameter // forces the caller to declare whether the matrix has the evil I-P // format, which requires back-conversion of the entries