booldijkstraAlgorithm(constQList<T>&elements,intstartIndex,intendIndex,QList<T>&elementPath,std::function<double(constT&,constT&)>distance)// don't seperate parameters with new lines or documentation will break
{
if(elements.isEmpty()||startIndex<0
||startIndex>=elements.size()||endIndex<0
||endIndex>=elements.size()){
returnfalse;
}
//qWarning("optitools");
// Each element of type T gets stuff into a Node
/// @param distance is the distance between the Node and it's predecessor
booldijkstraAlgorithm(constQList<T>&elements,intstartIndex,intendIndex,QList<T>&elementPath,std::function<double(constT&,constT&)>distance);// don't seperate parameters with new lines or documentation will break
// The list with all Nodes (elements)
QList<Node>nodeList;
// This list will be initalized with (pointer to) all elements of nodeList.
// Elements will be successively remove during the execution of the Dijkstra Algorithm.