00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020 #ifndef _SEQ_OPERATORS_H_
00021 #define _SEQ_OPERATORS_H_
00022
00023 template<class PP, class MP, class PAT_ST, template<typename, typename, typename, template <typename> class > class CC,
00024 template <typename> class ALLOC >
00025 void update_rmost_path(SEQ_PATTERN*const& cand_pat) {}
00026
00027 template<class PP, class MP, class PAT_ST, template<typename, typename, typename, template <typename> class > class CC,
00028 template <typename> class ALLOC >
00029 ostream& operator<< (ostream& ostr, const SEQ_PATTERN* p) {
00030
00031
00032 typename SEQ_PATTERN::CONST_IT it;
00033 for(it=p->begin(); it!=p->end(); it++) {
00034 if(it == p->begin()) {
00035 ostr << (*it).v;
00036 } else {
00037 ostr << " -> " << (*it).v;
00038 }
00039 }
00040 ostr<< " -- "<<p->_pat_sup;
00041
00042 return ostr;
00043 }
00044
00045 #include "pattern.h"
00046
00047 template<class T, class MP, class ST, template<class, typename, typename, template <typename> class > class CC,
00048 template <typename> class ALLOC >
00049 bool pattern<T, MP, ST, CC, ALLOC>::operator< (const pattern<T, MP, ST, CC, ALLOC> rhs) const {
00050
00051 CONST_IT it=begin(), rhs_it=rhs.begin();
00052
00053 if(size()!=rhs.size()) {
00054 cerr<<"Sequences are not of the same size."<<endl;
00055 exit(0);
00056 }
00057
00058 while(it!=end() && rhs_it!=rhs.end()) {
00059 if((*it).v != (*rhs_it).v)
00060 return (*it) < (*rhs_it);
00061
00062 it++;
00063 rhs_it++;
00064 }
00065
00066
00067 return false;
00068 }
00069
00070 #endif