intlist.h
来自「聚类算法Enclus的源程序」· C头文件 代码 · 共 32 行
H
32 行
// A node of a linked list
struct listnode {
int item;
listnode* next;
};
// Integer linked list
class IntList {
public:
IntList();
IntList(const IntList& il);
~IntList();
void prepend(int n);
void append(int n);
void insertSorted(int n);
void remove(int n);
listnode* locate(int n);
void copy(const IntList& il);
void clear();
bool isEmpty() { return (head==NULL); }
bool compare_k_1(const IntList& il);
bool exist(int n);
listnode* get_head() const { return head; }
int get_len() const { return len; }
void show() const;
int operator[] (int i) const;
bool operator== (const IntList& il) const;
private:
listnode* head;
int len;
};
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?