Home | Develop | Download | Contact
RaDefines.hpp
1/*
2 * RaDefines.hpp
3 *
4 * Copyright 2018 Fernando Pujaico Rivera <fernando.pujaico.rivera@gmail.com>
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
19 * MA 02110-1301, USA.
20 *
21 */
22
31#ifndef __PDS_RADEFINES_HPP__
32#define __PDS_RADEFINES_HPP__
33
34#include <iostream>
35#include <cstring>
36#include <cmath>
37#include <ctime>
38#include <vector>
39
40
54 #ifndef __CURRENT_FILENAME__
65 #define __CURRENT_FILENAME__ (strrchr(__FILE__, '/') ? strrchr(__FILE__, '/') + 1 : strrchr(__FILE__, '\\') ? strrchr(__FILE__, '\\') + 1 : __FILE__)
66 #endif
67
68
69 #ifdef __GNUC__
80 #define __PDS_RA_UNUSED(x) UNUSED_ ## x __attribute__((__unused__))
81 #else
92 #define __PDS_RA_UNUSED(x) UNUSED_ ## x
93 #endif
94
105 #ifndef pds_print_error_message
117 #define pds_print_error_message(msg) \
118 std::cerr<<"----ERROR :: "<<__CURRENT_FILENAME__ \
119 <<" -- "<<__PRETTY_FUNCTION__ \
120 <<" -- line "<<__LINE__<<std::endl \
121 <<"----ERROR :: "<<msg<<std::endl
122 #endif
123
124
125
126 #ifndef pds_print_warning_message
139 #define pds_print_warning_message(msg) \
140 std::cout<<"--WARNING :: "<<__PRETTY_FUNCTION__<<std::endl \
141 <<"--WARNING :: "<<msg<<std::endl
142 #endif
143
144
145 #ifndef pds_print_info_message
157 #define pds_print_info_message(msg) \
158 std::cout<<"-----INFO :: "<<msg<<std::endl
159 #endif
160
161
167namespace Pds{
168
169namespace Ra{
170
182 const double SpeedOfLight=299792458;
183
189 const double Pi =3.14159265358979323846264338327950288;
190
196 const double Phi=1.61803398874989484820458683436563811;
197
203 const double OneOverSqrt2Pi=0.398942280401433;
204
210 const double OneOverSqrt2=0.707106781186547;
211
217 const double TwoOverSqrtPi=1.12837916709551;
218
224 const double Ln2=6.93147180559945e-01;
225
231 const double Euler=2.71828182845904523536028747135266249775724709369995;
232
238 const double ToRadians =Pds::Ra::Pi/180.0;
239
245 const double ToDegrees = 180.0/Pds::Ra::Pi;
246
247
253 const double Semitone=1.059463094359295;
254
258 const double Nan=nan("");
259
260
283 typedef double (*FuncPointer)(double);
284
299 const unsigned int StringPrecision=14;
300
304 const double WarningRCond=0.000000001;
305
306
324 typedef enum
325 {
329
333
337 } ImportRange;
338
339
345 typedef enum
346 {
351
356
362 } Padding;
363
369 typedef enum
370 {
374
378 } FormatType;
379
380
386namespace Tag{
387
388
397 const std::string BinaryTreeNode="BinaryTreeNode";
398
402 const std::string Matrix="Matrix";
403
407 const std::string SampleBlock="SampleBlock";
408
412 const std::string BatchBlock="BatchBlock";
413
417 const std::string VectorBlock="VectorBlock";
418
422 const std::string TensorVectorBlock="TensorVectorBlock";
423
427 const std::string VectorDouble="VectorDouble";
428
432 const std::string TensorVectorDouble="TensorVectorDouble";
433
437}
438
439
440}
441}
442
448#endif /* __PDS_RADEFINES_HPP__ */
La clase tipo Pds::BinaryTreeNode. Esta clase genera una estructura de datos que contem um valor y do...
La clase tipo Pds::Matrix . Esta clase genera una matriz de Nlin lineas y Ncol columnas....
Definition: Matrix.hpp:96
const unsigned int StringPrecision
Número de decimales a mostrar cuando se imprime en pantalla o en archivo.
Definition: RaDefines.hpp:299
const double TwoOverSqrtPi
Es equivalente a 2/sqrt(PI).
Definition: RaDefines.hpp:217
const std::string VectorBlock
Tag de un objeto de tipo Pds::Ra::Tag::VectorBlock.
Definition: RaDefines.hpp:417
const double Ln2
Es equivalente a ln(2).
Definition: RaDefines.hpp:224
const double Euler
Es equivalente a e.
Definition: RaDefines.hpp:231
const double Semitone
Factor de de un semitono.
Definition: RaDefines.hpp:253
const double ToDegrees
Factor de conversión de grados radianes a sexagesimales.
Definition: RaDefines.hpp:245
const double WarningRCond
Valor minimo que puede tener rcond, abajo de este valor será mostrado un mensaje en pantalla.
Definition: RaDefines.hpp:304
const double OneOverSqrt2
Es equivalente a 1/sqrt(2).
Definition: RaDefines.hpp:210
const std::string TensorVectorBlock
Tag de un objeto de tipo Pds::Ra::Tag::TensorVectorBlock.
Definition: RaDefines.hpp:422
const std::string VectorDouble
Tag de un objeto de tipo Pds::Ra::Tag::VectorDouble.
Definition: RaDefines.hpp:427
const double Phi
Número aureo. Es equivalente a (1+sqrt(5))/2.
Definition: RaDefines.hpp:196
FormatType
Tipo de dato en la carga de información desde archivo.
Definition: RaDefines.hpp:370
const double SpeedOfLight
Valor de la velocidad de la luz en metros por segundo.
Definition: RaDefines.hpp:182
Padding
Tipo de dato que especifica el padding en la convolucion.
Definition: RaDefines.hpp:346
const double Nan
Not A Number.
Definition: RaDefines.hpp:258
ImportRange
Cuales datos seran leidos.
Definition: RaDefines.hpp:325
const double OneOverSqrt2Pi
Es equivalente a 1/sqrt(2*PI).
Definition: RaDefines.hpp:203
const double ToRadians
Factor de conversión de grados sexagesimales a radianes.
Definition: RaDefines.hpp:238
double(* FuncPointer)(double)
Función real de dominio real.
Definition: RaDefines.hpp:283
const std::string TensorVectorDouble
Tag de un objeto de tipo Pds::Ra::Tag::TensorVectorDouble.
Definition: RaDefines.hpp:432
const double Pi
Número PI.
Definition: RaDefines.hpp:189
@ MatFileFormat
Definition: RaDefines.hpp:377
@ TextFormat
Definition: RaDefines.hpp:373
@ WithoutLast
Definition: RaDefines.hpp:336
@ WithoutFirst
Definition: RaDefines.hpp:332
std::vector< std::vector< Pds::Matrix > > BatchBlock
Definición de un tipo de dato Pds::BatchBlock.
Definition: Matrix.hpp:8153
std::vector< Pds::Matrix > SampleBlock
Definición de un tipo de dato Pds::SampleBlock.
Definition: Matrix.hpp:8147
Nombre de espacio para Pds (Procesamiento Digital de Senales)
Definition: AbstractRV.hpp:42

Enlaces de interés

HomePage Bazaar Download Bug report Ayuda Developer Feed