Main Page | Class Hierarchy | Class List | File List | Class Members

tagorder.h

00001 /* libIXAml - IXA Taldea */
00002 
00003 #ifndef _TAGORDER_H
00004 #define _TAGORDER_H
00005 
00006 #include <vector>
00007 #include <algorithm>
00008 
00011 template <class VT> class TagOrder {
00012  public:
00013 
00016   static std::vector<VT> Ordenatu(const std::vector<VT> v){
00017     std::vector<VT> ord (v.size());
00018     copy(v.begin(),v.end(),ord.begin());
00019     sort(ord.begin(),ord.end(), TagOrder<VT>());
00020     return ord;
00021   }
00022 
00025   bool operator() (VT x1, VT x2) const {return (x1 < x2); }
00026 
00027 };
00028 
00029 #endif //_TAGORDER_H

Generated on Tue Sep 11 12:07:44 2007 for libIXAml by doxygen 1.3.5