00001 #ifndef CALCULO_FUNCAO_H
00002 #define CALCULO_FUNCAO_H
00003
00004 #include <vector>
00005 #include <string>
00006 #include <map>
00007
00008 #include "formula.H"
00009
00010 namespace Calculo {
00011
00017 class Funcao {
00018 public:
00021 typedef std::map<std::string, double> MapaDeConstantes;
00022
00027 typedef std::map<std::string, Funcao> MapaDeFuncoes;
00028
00030 typedef std::vector<std::string> Parametros;
00031
00034 Funcao(Parametros const& parametros = Parametros(),
00035 std::string const& formula = "");
00036
00040 double operator()(MapaDeConstantes const& constantes,
00041 MapaDeFuncoes const& funcoes,
00042 std::vector<double> const& argumentos) const;
00043
00044 private:
00045 std::vector<std::string> parametros;
00046 Formula formula;
00047 };
00048
00049 }
00050
00051 #include "funcao_impl.H"
00052
00053 #endif // FUNCAO_H