/** remove and return the open node specified by a key */ inline Titem_& PopOpenNode(const Key& key) { Titem_& item = m_open.Pop(key); uint idxPop = m_open_queue.FindIndex(item); m_open_queue.Remove(idxPop); return item; }
/** insert given item as open node (into m_open and m_open_queue) */ inline void InsertOpenNode(Titem_& item) { assert(m_closed.Find(item.GetKey()) == NULL); m_open.Push(item); m_open_queue.Include(&item); if (&item == m_new_node) { m_new_node = NULL; } }
/** remove and return the best open node */ inline Titem_ *PopBestOpenNode() { if (!m_open_queue.IsEmpty()) { Titem_ *item = m_open_queue.Shift(); m_open.Pop(*item); return item; } return NULL; }
/** return number of open nodes */ inline int OpenCount() { return m_open.Count(); }
/** close node */ inline void InsertClosedNode(Titem_& item) { assert(m_open.Find(item.GetKey()) == NULL); m_closed.Push(item); }
/** return the open node specified by a key or NULL if not found */ inline Titem_ *FindOpenNode(const Key& key) { Titem_ *item = m_open.Find(key); return item; }
/** return number of open nodes */ FORCEINLINE int OpenCount() { return m_open.Count(); }
/** return the open node specified by a key or NULL if not found */ FORCEINLINE Titem_ *FindOpenNode(const Key& key) { Titem_ *item = m_open.Find(key); return item; }