CRFSpecElement.h
Go to the documentation of this file.00001 #ifndef CRFSPECELEMENT_H_
00002 #define CRFSPECELEMENT_H_
00003 #include <functional>
00004 #include "types.h"
00005
00006 namespace gplib
00007 {
00008
00009
00010
00011
00012
00013
00014
00015
00016 class CalcSpectralElement: public std::binary_function<tcomp, tcomp, tcomp>
00017 {
00018 private:
00019 tcomp DivThreshold;
00020 public:
00021 CalcSpectralElement(tcomp t) :
00022 DivThreshold(t)
00023 {
00024 }
00025 tcomp operator()(const tcomp rad, const tcomp ver) const
00026 {
00027 return rad * conj(ver) / std::max(abs(ver * conj(ver)), abs(
00028 DivThreshold));
00029 }
00030 };
00031
00032 }
00033 #endif