#include "OptimisationTools.h" #include namespace OptimisationTools { namespace { } // end anonymous namespace /*! * \fn bool dijkstraAlgorithm(int startIndex, int endIndex, const QList elements, QList &elementPath, double(*distance)(const T &t1, const T &t2)) * Calculates the shortest path between the elements stored in \a elements. * The \l {Dijkstra Algorithm} is used to find the shorest path. * Stores the result inside \a elementPath when sucessfull. * The function handle \a distance is used to calculate the distance between two elements. The distance must be positive. * Returns \c true if successful, \c false else. * * \sa QList */ template bool dijkstraAlgorithm(const QList &elements, int startIndex, int endIndex, QList &elementPath, std::function distance); // don't seperate parameters with new lines or documentation will break } // end OptimisationTools namespace