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

📄 record.h

📁 这是本人精心搜集的关于常用图论算法的一套源码
💻 H
字号:
template <class K> 
class Record
{ friend bool operator==(const Record &x, const Record &y) {return x.key==y.key; }
  friend bool operator<(const Record &x, const Record &y) { return x.key<y.key; }
  friend bool operator>(const Record &x, const Record &y) { return x.key>y.key; }
  friend bool operator>=(const Record &x, const Record &y) { return x.key>=y.key; }
  friend bool operator<=(const Record &x, const Record &y) { return x.key<=y.key; }
  friend bool operator!=(const Record &x, const Record &y) { return x.key!=y.key; }
//  friend  ostream &operator<<(ostream& out,Record<K> &x)
//   { return out<<x.key<<' '; }

 public:
  Record():key(-999){}
  Record(K k):key(k){}
  Record(const Record& copy)
   { key=copy.key;  other=copy.other; }
  Record& operator=(const Record& copy)
   { key=copy.key;  other=copy.other; return *this; }
  K Getkey(){ return key;  } 
  private:
    K key;
    char *other;
};

⌨️ 快捷键说明

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