00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020 #ifndef SCALAR_FUNCTION_GREATER_THAN_HPP
00021 #define SCALAR_FUNCTION_GREATER_THAN_HPP
00022
00023 #include <ScalarFunctionBase.hpp>
00024
00034 class ScalarFunctionGreaterThan
00035 : public ScalarFunctionBase
00036 {
00037 private:
00038 ConstReferenceCounting<ScalarFunctionBase>
00039 __f;
00040 ConstReferenceCounting<ScalarFunctionBase>
00041 __g;
00050 std::ostream& __put(std::ostream& os) const
00051 {
00052 os << '(' << *__f << '>' << *__g << ')';
00053 return os;
00054 }
00055
00056 public:
00064 real_t operator()(const TinyVector<3,real_t>& X) const
00065 {
00066 return (*__f)(X)>(*__g)(X);
00067 }
00068
00074 bool canBeSimplified() const
00075 {
00076 return false;
00077 }
00078
00085 ScalarFunctionGreaterThan(ConstReferenceCounting<ScalarFunctionBase> f,
00086 ConstReferenceCounting<ScalarFunctionBase> g)
00087 : ScalarFunctionBase(ScalarFunctionBase::gt),
00088 __f(f),
00089 __g(g)
00090 {
00091 ;
00092 }
00093
00099 ScalarFunctionGreaterThan(const ScalarFunctionGreaterThan& f)
00100 : ScalarFunctionBase(f),
00101 __f(f.__f),
00102 __g(f.__g)
00103 {
00104 ;
00105 }
00106
00111 ~ScalarFunctionGreaterThan()
00112 {
00113 ;
00114 }
00115 };
00116
00117 #endif // SCALAR_FUNCTION_GREATER_THAN_HPP