⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 bbnode.h

📁 data structures, algorithms and Application书的源代码
💻 H
字号:
// used by bbloadd.cpp

#ifndef bbnode_
#define bbnode_

template <class T> class HeapNode;
template <class T> class MaxHeap;

class bbnode {
   friend void AddLiveNode(MaxHeap<HeapNode<int> > &, bbnode *,
                             int, bool, int);
   friend int MaxLoading(int *, int, int, int *);
   friend class AdjacencyGraph;
   private:
      bbnode *parent; // pointer to parent node
      bool LChild;    // true iff left child of parent
};

template<class T>
class HeapNode {
   friend void AddLiveNode(MaxHeap<HeapNode<T> > &, bbnode *,
                   T, bool, int);
   friend T MaxLoading(T *, T, int, int *);
   public:
      operator T () const {return uweight;}
   private:
      bbnode *ptr;  // pointer to live node
      T uweight;    // upper weight of live node
      int level;    // level of live node
};

#endif

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -