bbnode.h
来自「一本全面剖析C++数据结构算法的书籍」· C头文件 代码 · 共 33 行
H
33 行
// 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 + =
减小字号Ctrl + -
显示快捷键?