• Main Page
  • Namespaces
  • Data Structures
  • Files
  • File List

/export/development/ViennaMath/viennamath/runtime/operations/function_symbol.hpp

Go to the documentation of this file.
00001 #ifndef VIENNAMATH_FUNCTION_SYMBOL_OPERATIONS_HPP
00002 #define VIENNAMATH_FUNCTION_SYMBOL_OPERATIONS_HPP
00003 
00004 /* =======================================================================
00005    Copyright (c) 2012, Institute for Microelectronics,
00006                        Institute for Analysis and Scientific Computing,
00007                        TU Wien.
00008                              -----------------
00009                ViennaMath - Symbolic and Numerical Math in C++
00010                              -----------------
00011 
00012    Author:     Karl Rupp                          rupp@iue.tuwien.ac.at
00013 
00014    License:    MIT (X11), see file LICENSE in the ViennaMath base directory
00015 ======================================================================= */
00016 
00017 
00018 
00019 
00020 #include <ostream>
00021 #include "viennamath/forwards.h"
00022 #include "viennamath/runtime/binary_operators.hpp"
00023 
00028 namespace viennamath
00029 {
00030   
00031       
00033     
00035     
00037 
00039 
00040     template <typename NumericT, typename InterfaceType>
00041     rt_binary_expr<InterfaceType> operator*(rt_constant<NumericT, InterfaceType> const & lhs, rt_function_symbol<InterfaceType> const & rhs)
00042     {
00043       return rt_binary_expr<InterfaceType>(lhs.clone(), new op_binary<op_mult<typename InterfaceType::numeric_type>, InterfaceType>(), rhs.clone());
00044     }
00045 
00047     template <typename InterfaceType>
00048     rt_binary_expr<InterfaceType> operator*(rt_expr<InterfaceType> const & lhs, rt_function_symbol<InterfaceType> const & rhs)
00049     {
00050       return rt_binary_expr<InterfaceType>(lhs.get()->clone(), new op_binary<op_mult<typename InterfaceType::numeric_type>, InterfaceType>(), rhs.clone());
00051     }
00052 
00054 
00055   
00056 }
00057 
00058 #endif

Generated on Wed Feb 29 2012 21:50:43 for ViennaMath by  doxygen 1.7.1