1 #ifndef __fpa__Base__Functors__Inverse__hxx__
2 #define __fpa__Base__Functors__Inverse__hxx__
4 // -------------------------------------------------------------------------
5 template< class _TInput, class _TOutput >
6 typename fpa::Base::Functors::Inverse< _TInput, _TOutput >::
7 TOutput fpa::Base::Functors::Inverse< _TInput, _TOutput >::
8 Evaluate( const TInput& x ) const
10 TInput sign = TInput( ( x < TInput( 0 ) )? -1: 1 );
11 TOutput y = TOutput( 1 ) / ( TOutput( 1 ) + TOutput( x * sign ) );
12 return( y * TOutput( sign ) );
15 // -------------------------------------------------------------------------
16 template< class _TInput, class _TOutput >
17 fpa::Base::Functors::Inverse< _TInput, _TOutput >::
23 // -------------------------------------------------------------------------
24 template< class _TInput, class _TOutput >
25 fpa::Base::Functors::Inverse< _TInput, _TOutput >::
30 #endif // __fpa__Base__Functors__Inverse__hxx__