|
Open Graph Drawing Framework |
v. 2023.09 (Elderberry)
|
|
|
Go to the documentation of this file.
81 explicit AStarSearch(
const bool directed =
false,
const double maxGap = 1,
122 (*m_predecessor)[target] =
nullptr;
127 node v = queue.topElement();
150 for (
node v = target; v != source;) {
154 edge e = (*m_predecessor)[v];
171 edge e = adj->theEdge();
177 (*m_predecessor)[w] = e;
The namespace for all OGDF objects.
Compare floating point numbers with epsilons and integral numbers with normal compare operators.
Includes declaration of graph class.
#define OGDF_ASSERT(expr)
Assert condition expr. See doc/build.md for more information.
NodeArray< bool > m_folded
PrioritizedMapQueue< node, T > NodeQueue
Priority queue interface wrapping various heaps.
void push(const E &element, const P &priority)
Adds a new element to the queue.
bool contains(const E &element) const
Returns whether this queue contains that key.
Class for adjacency list elements.
std::enable_if< std::is_integral< T >::value, bool >::type less(const T &x, const T &y) const
Compare if x is LESS than y for integral types.
bool empty() const
Checks whether the queue is empty.
NodeArray< T > m_distance
adjEntry succ() const
Returns the successor in the adjacency list.
Prioritized queue interface wrapper for heaps.
RegisteredArray for nodes, edges and adjEntries of a graph.
Data type for general directed graphs (adjacency list representation).
const EdgeArray< T > * m_cost
AStarSearch(const bool directed=false, const double maxGap=1, const EpsilonTest &et=EpsilonTest())
Initializes a new A* search algorithm.
void investigateNode(const node v)
std::enable_if< std::is_integral< T >::value, bool >::type equal(const T &x, const T &y) const
Compare if x is EQUAL to y for integral types.
NodeArray< edge > * m_predecessor
A-Star informed search algorithm.
std::function< T(node)> m_heuristic
void decrease(const E &element, const P &priority)
Decreases the priority of the given element.
T call(const Graph &graph, const EdgeArray< T > &cost, const node source, const node target, NodeArray< edge > &predecessor, std::function< T(node)> heuristic=[](node) { return T(0);})
Computes the shortests path between source and target.
Basic declarations, included by all source files.
adjEntry firstAdj() const
Returns the first entry in the adjaceny list.
node opposite(node v) const
Returns the adjacent node different from v.
bool validatePath(const node source, const node target) const
Class for the representation of edges.
std::enable_if< std::is_integral< T >::value, bool >::type geq(const T &x, const T &y) const
Compare if x is GEQ to y for integral types.
node target() const
Returns the target node of the edge.
Class for the representation of nodes.
RegisteredArray for edges of a graph, specialized for EdgeArray<edge>.