prio_impl.prog
资源名称:leda.tar.gz [点击查看]
上传用户:gzelex
上传日期:2007-01-07
资源大小:707k
文件大小:1k
源码类别:
数值算法/人工智能
开发平台:
MultiPlatform
- begingroup
- parskip 0ptbaselineskip 0pt
- tt {ttobeyspacesgdef {hskip.5em}} defpar{leavevmodeendgraf} catcode``=active
- obeylines ttverbatim
- typedef ... prio_impl_item;
- class prio_impl {
- virtual int cmp(GenPtr, GenPtr) const = 0;
- virtual int int_type() const = 0;
- virtual void clear_key(GenPtr&) const = 0;
- virtual void clear_inf(GenPtr&) const = 0;
- virtual void copy_key(GenPtr&) const = 0;
- virtual void copy_inf(GenPtr&) const = 0;
- public:
- prio_impl();
- prio_impl(int);
- prio_impl(int,int);
- prio_impl(const prio_impl&);
- ~prio_impl();
- prio_impl& operator=(const prio_impl&);
- prio_impl_item insert(GenPtr,GenPtr);
- prio_impl_item find_min() const;
- prio_impl_item first_item() const;
- prio_impl_item next_item(prio_impl_item) const;
- prio_impl_item item(void* p) const { return prio_impl_item(p); }
- GenPtr key(prio_impl_item) const;
- GenPtr inf(prio_impl_item) const;
- void del_min();
- void del_item(prio_impl_item);
- void decrease_key(prio_impl_item,GenPtr);
- void change_inf(prio_impl_item,GenPtr);
- void clear();
- int size() const;
- };
- endgroup