Main Page   Namespace List   Class Hierarchy   Compound List   File List   Namespace Members   Compound Members   File Members  

sequencetransform.h

Go to the documentation of this file.
00001 
00006 #ifndef __SEQUENCE_TRANSFORM_H__
00007 #define __SEQUENCE_TRANSFORM_H__
00008 
00009 #include "genericalgs.h"
00010 
00011 
00014 namespace SequenceTransform {
00015 
00016 
00017 
00021 template <class InContainer, class OutContainer>
00022 class OneD {
00023 public:
00024   virtual void operator() (const InContainer& in, OutContainer& out) const=0;
00025 };
00026 
00027 
00029 template <class InContainer, class OutContainer>
00030 class Threshold : public OneD<InContainer,OutContainer> {
00031 public:
00032   typedef typename InContainer::value_type value_type;
00033   Threshold(const value_type* threshold_=0) : threshold(threshold_) { }
00034   virtual void operator() (const InContainer& in, OutContainer& out) const
00035     {  if (threshold) Generic::lower_threshold(in.begin(),in.end(),out.begin(),*threshold,0.0);  }
00036 private:
00037   const value_type* threshold;
00038 };
00039 
00040 
00041 
00042 } /* namespace SequenceTransform */
00043 
00044 #endif /* __SEQUENCE_TRANSFORM_H__ */

Generated on Mon Jan 20 02:35:45 2003 for RF-LISSOM by doxygen1.3-rc2