예제 #1
0
파일: master.cpp 프로젝트: ogdf/ogdf
int Master::enumerationStrategy(const Sub *s1, const Sub *s2)
{
	switch (enumerationStrategy_) {
	case BestFirst:    return bestFirstSearch(s1, s2);
	case BreadthFirst: return breadthFirstSearch(s1, s2);
	case DepthFirst:   return depthFirstSearch(s1, s2);
	case DiveAndBest:  return diveAndBestFirstSearch(s1, s2);
	default:
		Logger::ifout() << "Master::enumerationStrategy(): Unknown enumeration strategy\n";
		OGDF_THROW_PARAM(AlgorithmFailureException, ogdf::AlgorithmFailureCode::IllegalParameter);
	}
}
예제 #2
0
파일: master.cpp 프로젝트: ogdf/ogdf
int Master::diveAndBestFirstSearch(const Sub *s1, const Sub* s2) const
{
	if (feasibleFound()) return bestFirstSearch(s1, s2);
	else                 return depthFirstSearch(s1, s2);
}
State* SearchTree::greedy()
{
    return bestFirstSearch(heuristicComparator);
}
State* SearchTree::AStar()
{
    return bestFirstSearch(fComparator);
}
State* SearchTree::orderSearch()
{
    return bestFirstSearch(costComparator);
}