//! @copyright *this file is freware. //! @warning Use it at your own risk. //! @file ternary_test.cpp //! @author Dejan D. M. Milosavljevic //! @version 1.0 //! @date 2003 //! @please "Do not remove or change this comments" //! @description triplet tests. //! @bug //! @warning Use it at your own risk. //! @copyright *this file is freware. #include #include #include "ternary.hpp" using namespace std; using namespace stl_ext; template< typename N_scalar> class linear_function: public ternary_function < N_scalar const&, N_scalar const&, N_scalar const&, N_scalar> { public: linear_function(){} result_type operator()( first_argument_type P_a, second_argument_type P_x, third_argument_type P_b ) { return P_a * P_x + P_b; } }; int main_ternary( int argc, char *argv[] ) { cout << "--- main_ternary ---" << endl; float I_x; for( I_x = float( -5 ); I_x < float( 5 ); I_x += float( 0.1 ) ) cout << linear_function()( 10, I_x, 2 ) << endl; // cin.get(); return 0; }