12#ifndef UNIQUE_QUEUE_INCLUDE_GUARD
13#define UNIQUE_QUEUE_INCLUDE_GUARD
38 robin_hood::unordered_map<HF::SpatialStructures::Node, int>
hashmap;
103 std::vector<SpatialStructures::Node>
popMany(
int max = -1);
117 template <
typename arr_type>
119 auto node_to_push =
Node(
120 static_cast<float>(node[0]),
121 static_cast<float>(node[1]),
122 static_cast<float>(node[2])
125 return this->
push(node_to_push);
Contains definitions for the Node structure.
Generate a graph of accessible space from a given start point.
A queue that remembers every object inserted, and prevents the addition of nodes that have already be...
std::queue< HF::SpatialStructures::Node > node_queue
The underlying queue.
bool PushAny(const arr_type &node)
Call push with any type of object.
HF::SpatialStructures::Node pop()
Remove the topmost node from the queue and return it.
bool forcePush(const HF::SpatialStructures::Node &p)
Forcibly push a node onto the queue without checking it. Saves a hash function, but risks breaking th...
int size() const
Determine how many nodes are currently in the queue.
void clearQueue()
Clear every node from the queue without forgetting them.
bool empty() const
Tell if the queue is empty.
robin_hood::unordered_map< HF::SpatialStructures::Node, int > hashmap
Hashmap to keep track of nodes that have entered the queue.
HF::SpatialStructures::Node popFromDict()
Retrieve the topmost node from the queue, but "forget" about it to allow it to enter again in the fut...
bool push(const HF::SpatialStructures::Node &p)
Add a node to the queue if it has never previously been in the queue.
std::vector< SpatialStructures::Node > popMany(int max=-1)
Pop a set amount of nodes from the queue, and return them as a vector.
bool hasNode(const HF::SpatialStructures::Node &p) const
Check to see if the node has ever been in the queue.
A point in space with an ID.