xc
OpTrigonometricas.h
1 // -*-c++-*-
2 //----------------------------------------------------------------------------
3 // xc utils library; general purpose classes and functions.
4 //
5 // Copyright (C) Luis C. PĂ©rez Tato
6 //
7 // XC utils is free software: you can redistribute it and/or modify
8 // it under the terms of the GNU General Public License as published by
9 // the Free Software Foundation, either version 3 of the License, or
10 // (at your option) any later version.
11 //
12 // This software is distributed in the hope that it will be useful, but
13 // WITHOUT ANY WARRANTY; without even the implied warranty of
14 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 // GNU General Public License for more details.
16 //
17 // You should have received a copy of the GNU General Public License
18 // along with this program.
19 // If not, see <http://www.gnu.org/licenses/>.
20 //----------------------------------------------------------------------------
21 //OpTrigonometricas.h
22 
23 #ifndef OPTRIGONOMETRICAS_H
24 #define OPTRIGONOMETRICAS_H
25 
26 #include "OpUnario.h"
27 #include "operator_names.h"
28 
29 class OpPi : public OpUnario
30  {
31 
32  public:
33  OpPi(void) : OpUnario() {}
34  inline virtual const std::string &getName(void) const
35  { return nmbOpPi; }
36  virtual const Operando &Opera(const Operando *v1= NULL,const Operando *v2= NULL) const;
37  };
38 
39 class OpSin : public OpUnario
40  {
41 
42  public:
43  OpSin(void) : OpUnario() {}
44  inline virtual const std::string &getName(void) const
45  { return nmbOpSin; }
46  virtual const Operando &Opera(const Operando *,const Operando *v2= NULL) const;
47  virtual Rama Diferencia(const Variable &,const Rama &r) const;
48  };
49 
50 class OpCos : public OpUnario
51  {
52 
53  public:
54  OpCos(void) : OpUnario() {}
55  inline virtual const std::string &getName(void) const
56  { return nmbOpCos; }
57  virtual const Operando &Opera(const Operando *,const Operando *v2= NULL) const;
58  virtual Rama Diferencia(const Variable &,const Rama &r) const;
59  };
60 
61 class OpTan : public OpUnario
62  {
63 
64  public:
65  OpTan(void) : OpUnario() {}
66  inline virtual const std::string &getName(void) const
67  { return nmbOpTan; }
68  virtual const Operando &Opera(const Operando *,const Operando *v2= NULL) const;
69  virtual Rama Diferencia(const Variable &,const Rama &r) const;
70  };
71 
72 class OpAtan : public OpUnario
73  {
74 
75  public:
76  OpAtan(void) : OpUnario() {}
77  inline virtual const std::string &getName(void) const
78  { return nmbOpAtan; }
79  virtual const Operando &Opera(const Operando *,const Operando *v2= NULL) const;
80  virtual Rama Diferencia(const Variable &,const Rama &r) const;
81  };
82 
84 class OpSec : public OpUnario
85  {
86 
87  public:
88  OpSec(void) : OpUnario() {}
89  inline virtual const std::string &getName(void) const
90  { return nmbOpSec; }
91  virtual const Operando &Opera(const Operando *,const Operando *v2= NULL) const;
92  };
93 
95 class OpCosec : public OpUnario
96  {
97 
98  public:
99  OpCosec(void) : OpUnario() {}
100  inline virtual const std::string &getName(void) const
101  { return nmbOpCosec; }
102  virtual const Operando &Opera(const Operando *,const Operando *v2= NULL) const;
103  };
104 
106 class OpCotg : public OpUnario
107  {
108 
109  public:
110  OpCotg(void) : OpUnario() {}
111  inline virtual const std::string &getName(void) const
112  { return nmbOpCotg; }
113  virtual const Operando &Opera(const Operando *,const Operando *v2= NULL) const;
114  };
115 
118 class OpDeg2Rad : public OpUnario
119  {
120 
121  public:
122  OpDeg2Rad(void) : OpUnario() {}
123  inline virtual const std::string &getName(void) const
124  { return nmbOpDeg2Rad; }
125  virtual const Operando &Opera(const Operando *,const Operando *v2= NULL) const;
126  virtual Rama Diferencia(const Variable &,const Rama &r) const;
127  };
128 
129 
132 class OpRad2Deg : public OpUnario
133  {
134 
135  public:
136  OpRad2Deg(void) : OpUnario() {}
137  inline virtual const std::string &getName(void) const
138  { return nmbOpRad2Deg; }
139  virtual const Operando &Opera(const Operando *,const Operando *v2= NULL) const;
140  virtual Rama Diferencia(const Variable &,const Rama &r) const;
141  };
142 
143 
144 #endif
Definition: OpTrigonometricas.h:29
virtual const std::string & getName(void) const
Return the operand name.
Definition: OpTrigonometricas.h:34
Cosecant function cosec(x)= 1/sin(x)
Definition: OpTrigonometricas.h:95
Function that converts sexagesimal degrees into radians deg2rad(x)= pi/180*x.
Definition: OpTrigonometricas.h:118
Definition: OpUnario.h:29
Function that converts radians into sexagesimal degrees rad2deg(x)= 180/pi*x.
Definition: OpTrigonometricas.h:132
Definition: Variable.h:31
virtual const std::string & getName(void) const
Return the operand name.
Definition: OpTrigonometricas.h:66
virtual const std::string & getName(void) const
Return the operand name.
Definition: OpTrigonometricas.h:123
virtual const std::string & getName(void) const
Return the operand name.
Definition: OpTrigonometricas.h:44
Definition: OpTrigonometricas.h:72
Cotangent function cotg(x)= 1/tan(x)
Definition: OpTrigonometricas.h:106
Definition: OpTrigonometricas.h:61
virtual const std::string & getName(void) const
Return the operand name.
Definition: OpTrigonometricas.h:100
virtual const std::string & getName(void) const
Return the operand name.
Definition: OpTrigonometricas.h:137
Operando.
Definition: Operando.h:42
Secant function sec(x)= 1/cos(x)
Definition: OpTrigonometricas.h:84
Definition: OpTrigonometricas.h:50
virtual const std::string & getName(void) const
Return the operand name.
Definition: OpTrigonometricas.h:55
Definition: Rama.h:33
virtual const std::string & getName(void) const
Return the operand name.
Definition: OpTrigonometricas.h:89
Definition: OpTrigonometricas.h:39
virtual const std::string & getName(void) const
Return the operand name.
Definition: OpTrigonometricas.h:111
virtual const std::string & getName(void) const
Return the operand name.
Definition: OpTrigonometricas.h:77