From e469ad7c6a00bf73e08266bc6ff56e87833baea7 Mon Sep 17 00:00:00 2001 From: Dsplib Date: Thu, 2 Jul 2020 19:51:03 +0300 Subject: [PATCH] modified: README.md modified: dspl/dox/en/array.dox modified: dspl/dox/en/complex.dox modified: dspl/dox/en/mainpage.dox modified: dspl/dox/footer_en.html modified: dspl/dox/header_en.html modified: dspl/src/array.c modified: dspl/src/cheby.c modified: dspl/src/complex.c --- README.md | 51 +++++++++- dspl/dox/en/array.dox | 211 +++++++++++++++++++++++++-------------- dspl/dox/en/complex.dox | 95 ++++++++++-------- dspl/dox/en/mainpage.dox | 99 ++++++++++-------- dspl/dox/footer_en.html | 16 ++- dspl/dox/header_en.html | 32 +++--- dspl/src/array.c | 8 +- dspl/src/cheby.c | 104 ++----------------- dspl/src/complex.c | 92 ++--------------- 9 files changed, 339 insertions(+), 369 deletions(-) diff --git a/README.md b/README.md index 1d99b56..3cd028e 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,51 @@ -# libdspl-2.0 Digital signal processing library +# libdspl-2.0 free вigital signal processing algorithm library + +libdspl-2.0 — opensource cross-platform digital signal processing algorithm library, written in C language. +Distributed under LGPL v3 license. This allows to use this library in all applications with dynamic linking. + +libdspl-2.0 includes follow algorithms sets: +* Digital spectral analysis, discrete and fast Fourier transform algorithms. +* Analog and digital IIR filters design and analysis. +* Digital FIR filters design and analysis. +* Windows function collection includes 15 different parametric and nonparametric window functions. +* Digital Hilbert transform algorithms. +* Mathematical sections includes trigonometric, hyperbolic, elliptic functions of real and complex variables. +* Pseudorandom numbers generation algorithms. +* Statistic functions. +* Linar algebra algorithms (BLAS and LAPACK packages are used under the hood of the DSPL-2.0 library). +* Digital resampling algorithms. - -libdspl-2.0 is free cross-platform library of digital signal processing algorithms. -libdspl-2.0 includes the following groups of algorithms: +### Build and run libdspl-2.0 +To build the DSPL-2.0 library on Windows, a special set of programs dsplib toolchain is provided. Dsplib toolchain includes GCC, GNUPLOT, CodeBlocks IDE, Far file manager and also Unix utilities for Windows OS. +### Documentation content +* Mathematical sections: + * [Basic math functions of the real and complex arguments.](http://en.dsplib.org/dspl/group___s_p_e_c___m_a_t_h___c_o_m_m_o_n___g_r_o_u_p.html) + * [Trigonometric and hyperbolic of functions the real and complex arguments.](http://en.dsplib.org/dspl/group___s_p_e_c___m_a_t_h___t_r_i_g___g_r_o_u_p.html) + * [Transcendent math functions.] + * [Elliptic Jacoby functions of the real and complex arguments.] + * [Pseudo-random numbers generation.] + * [Math statistic functions.] + * [Linear algebra and matrix operations.] + +* Digital spectral analysis: + * [Discrete Fourier transform and fast Fourier transform algorithms.] + * [Windows function for filter design and spectrum analysis.] + * [Hilbert transform algorithms.] + +* Analog and digital filters design and analysis: + * [Convolution and digital filtration.] + * [IIR filters design.] + * [FIR filter design.] + * [Analog and digital filter analysis.] + +* Other algortithms: + * [Digital samplerate conversion (resampling).] + * [Input and output data from external files.] + * [Plotting data by Gnuplot interface.] + +* Appendix + * [libdspl-2.0 data types.] + * [Error codes.] \ No newline at end of file diff --git a/dspl/dox/en/array.dox b/dspl/dox/en/array.dox index d13f398..cb894fe 100644 --- a/dspl/dox/en/array.dox +++ b/dspl/dox/en/array.dox @@ -1,3 +1,74 @@ +/*! **************************************************************************** +\ingroup SPEC_MATH_COMMON_GROUP +\fn int array_scale_lin(double* x, int n, + double xmin, double xmax, double dx, + double h, double* y) +\brief Vector `x` linear transformation + +Function transforms values \f$x(i)\f$, \f$i = 0,1,\ldots n\f$ +to the \f$y(i)\f$, accordint to equation: + +\f[ +y(i) = k_x x(i) + d_x, \qquad k_x = +\frac{h}{x_{\textrm{max}} - x_{\textrm{min}}}. +\f] + +All values of the vector `x` between +\f$x_{\textrm{min}}\f$ and \f$x_{\textrm{max}}\f$, transforms to +the vector `y` between \f$d_x\f$ and \f$h + d_x\f$. +Parameter \f$d_x\f$ sets mean shift of the vector `y`. + +This function is convenient for translating values ​​ +of different dimensions. For example it can be used +to transfer the values ​​of the vector `x` +to the graph of the height of` h`, where the height can +be set in the number of pixels, in centimeters, etc. + +\param[in] x +Pointer to the input vector `x`. \n +Vector size is `[n x 1]`. \n +\n + +\param[in] n +Size of vector `x`. \n +\n + +\param[in] xmin +Parameter \f$x_{\textrm{min}}\f$. \n +\n + +\param[in] xmax +Parameter \f$x_{\textrm{min}}\f$. \n +Value `xmax` must be more than `xmin`. \n +\n + +\param[in] dx +Displacement after transformation. \n +This parameter must have output vector `y` +dimensions (pixels, centimeters). \n +\n + +\param[in] h +Height of vector `y` after transforming between `dx` and `h+dx`. \n +\n + +\param[out] y +Pointer to the output vector `y`. \n +Vector size is `[n x 1]`. \n +Memory must be allocated. \n +\note +Pointer `y` can be equal to `x`. +Velues of vector `x` will be rewritten in this case. \n +\n + +\return +`RES_OK` if function returns successfully. \n +Else \ref ERROR_CODE_GROUP "code error". + +\author Sergey Bakhurin www.dsplib.org +**************************************************************************** */ + + /*! **************************************************************************** \fn int concat(void* a, size_t na, void* b, size_t nb, void* c) @@ -54,9 +125,7 @@ Vector `c` keeps follow data: c = [1.0, 2.0, 3.0, 4.0, 5.0] \endverbatim -\author -Sergey Bakhurin -www.dsplib.org +\author Sergey Bakhurin www.dsplib.org ****************************************************************************** */ @@ -111,9 +180,7 @@ vector `y` will keep array: c = [0.0, 2.0, 4.0, 6.0, 8.0] \endverbatim -\author -Sergey Bakhurin -www.dsplib.org +\author Sergey Bakhurin www.dsplib.org ****************************************************************************** */ @@ -290,73 +357,67 @@ Program result: /*! **************************************************************************** \ingroup SPEC_MATH_COMMON_GROUP \fn int linspace(double x0, double x1, int n, int type, double* x) -\brief Функция заполняет массив линейно-нарастающими, равноотстоящими -значениями от `x0` до `x1` +\brief Function fills a vector with `n` linearly spaced elements +between `x0` and `x1`. -Заполняет массив `x` длиной `n` значениями в диапазоне -от \f$x_0\f$ до \f$x_1\f$. Функция поддерживает два типа заполнения -в соответствии с параметром `type`: \n +Function supports two kinds of filling according to `type` parameter: \n -Симметричное заполнение согласно выражению (параметр `type=DSPL_SYMMETRIC`): \n +Symmetric fill (parameter `type=DSPL_SYMMETRIC`): \n \f$x(k) = x_0 + k \cdot dx\f$, \f$dx = \frac{x_1 - x_0}{n-1}\f$, \f$k = 0 \ldots n-1.\f$ -Периодическое заполнение (параметр `type=DSPL_PERIODIC`) согласно выражению: \n +Periodic fill (parameter `type=DSPL_PERIODIC`): \n \f$x(k) = x_0 + k \cdot dx\f$, \f$dx = \frac{x_1 - x_0}{n}\f$, \f$k = 0 \ldots n-1.\f$ \param[in] x0 -Начальное показателя \f$x_0\f$. \n \n +Start point \f$x_0\f$. \n \n \param[in] x1 -Конечное значение \f$x_1\f$. \n \n +End point \f$x_1\f$. \n \n \param[in] n -Количество точек массива `x`. \n \n +Number of points `x` (size of vector `x`). \n \n \param[in] type -Тип заполнения: \n - -`DSPL_SYMMETRIC` --- симметричное заполнение, \n -`DSPL_PERIODIC` --- периодическое заполнение. \n \n +Fill type: \n +`DSPL_SYMMETRIC` --- symmetric, \n +`DSPL_PERIODIC` --- periodic. \n \n \param[in,out] x -Указатель на вектор равноотстоящих значений . \n -Размер вектора `[n x 1]`. \n -Память должна быть выделена. \n \n +Pointer to the output linearly spaced vector `x` . \n +Vector size is `[n x 1]`. \n +Memory must be allocated. \n \n \return -`RES_OK` --- функция выполнена успешно. \n -В противном случае \ref ERROR_CODE_GROUP "код ошибки". \n \n +`RES_OK` if function returns successfully. \n + Else \ref ERROR_CODE_GROUP "error code". \note -Отличие периодического и симметричного заполнения можно -понять из следующих примеров. \n -Пример 1. Периодическое заполнение. -\code{.cpp} +Difference between symmetric and periodic filling we can +understand from the follow examples. \n +Example 1. Periodic fill. double x[5]; linspace(0, 5, 5, DSPL_PERIODIC, x); \endcode -В массиве `x` будут лежать значения: +Values in the vector `x` are: \verbatim 0, 1, 2, 3, 4 \endverbatim \n \n -Пример 2. Симметричное заполнение. +Example 2. Symmetric fill. \code{.cpp} double x[5]; linspace(0, 5, 5, DSPL_SYMMETRIC, x); \endcode -В массиве `x` будут лежать значения: +Values in the vector `x` are: \verbatim 0, 1.25, 2.5, 3.75, 5 \endverbatim -\author -Бахурин Сергей -www.dsplib.org +\author Sergey Bakhurin www.dsplib.org ***************************************************************************** */ @@ -366,76 +427,76 @@ www.dsplib.org /*! **************************************************************************** \ingroup SPEC_MATH_COMMON_GROUP \fn int logspace(double x0, double x1, int n, int type, double* x) -\brief Функция заполняет массив значениями логарифмической шкале +\brief Function fills a vector with `n` logarithmically spaced elements +between \f$10^{x_0}\f$ and \f$10^{x_1}\f$. -Заполняет массив `x` длиной `n` значениями в диапазоне -от \f$10^{x_0}\f$ до \f$10^{x_1}\f$. \n -Функция поддерживает два типа заполнения в соответствии с параметром `type`: \n -Симметричное заполнение согласно выражению: \n +Function supports two kinds of filling according to `type` parameter: \n -\f$x(k) = 10^{x_0} \cdot dx^k\f$, где \f$dx = \sqrt[n-1]{10^{x_1 - x_0}}\f$, +Symmetric fill (parameter `type=DSPL_SYMMETRIC`): \n + +\f$x(k) = 10^{x_0} \cdot dx^k\f$, here \f$dx = \sqrt[n-1]{10^{x_1 - x_0}}\f$, \f$k = 0 \ldots n-1.\f$ -Периодическое заполнение согласно выражению: +Periodic fill (parameter `type=DSPL_PERIODIC`): \n -\f$x(k) = 10^{x_0} \cdot dx^k\f$, где \f$dx = \sqrt[n]{10^{x_1 - x_0}}\f$, +\f$x(k) = 10^{x_0} \cdot dx^k\f$, here \f$dx = \sqrt[n]{10^{x_1 - x_0}}\f$, \f$k = 0 \ldots n-1.\f$ \n + \param[in] x0 -Начальное значение показателя \f$x_0\f$. \n \n +Start exponent value \f$x_0\f$. \n \n \param[in] x1 -Конечное значение показателя \f$x_1\f$. \n \n +End exponent value \f$x_1\f$. \n \n \param[in] n -Количество точек массива `x`. \n \n +Number of points `x` (size of vector `x`). \n \n \param[in] type -Тип заполнения: \n -`DSPL_SYMMETRIC` --- симметричное заполнение, \n -`DSPL_PERIODIC` --- периодическое заполнение. \n \n +Fill type: \n +`DSPL_SYMMETRIC` --- symmetric, \n +`DSPL_PERIODIC` --- periodic. \n \n \param[in,out] x -Указатель на вектор значений в логарифмической шкале. \n -Размер вектора `[n x 1]`. \n -Память должна быть выделена. \n \n +Pointer to the output logarithmically spaced vector `x` . \n +Vector size is `[n x 1]`. \n +Memory must be allocated. \n \n \return -`RES_OK` --- функция выполнена успешно. \n -В противном случае \ref ERROR_CODE_GROUP "код ошибки". +`RES_OK` if function returns successfully. \n + Else \ref ERROR_CODE_GROUP "error code". \note -Отличие периодического и симметричного заполнения можно -понять из следующих примеров. \n - -Пример 1. Периодическое заполнение. +Difference between symmetric and periodic filling we can +understand from the follow examples. \n +Example 1. Periodic fill. \code{.cpp} double x[5]; logspace(-2, 3, 5, DSPL_PERIODIC, x); \endcode -В массиве `x` будут лежать значения: + +Values in the vector `x` are: + \verbatim 0.01, 0.1, 1, 10, 100 \endverbatim \n \n -Пример 2. Симметричное заполнение. +Example 2. Symmetric fill. \code{.cpp} double x[5]; logspace(-2, 3, 5, DSPL_SYMMETRIC, x); \endcode -В массиве `x` будут лежать значения: +Values in the vector `x` are: \verbatim 0.01 0.178 3.162 56.234 1000 \endverbatim -\author -Бахурин Сергей -www.dsplib.org +\author Sergey Bakhurin www.dsplib.org ***************************************************************************** */ @@ -444,23 +505,23 @@ www.dsplib.org /*! **************************************************************************** \ingroup SPEC_MATH_COMMON_GROUP \fn int ones(double* x, int n) -\brief Функция заполнения вещественного массива единицами +\brief Function fills all real vector `x` by ones values. \param[in, out] x -Указатель на вещественный вектор `x`. \n -Размер вектора `[n x 1]`. \n -Значения данного вектора будут установлены в единицу. \n +Pointer to the vector `x`. \n +Vector size is `[n x 1]`. \n +All elements on this vector will be set to one. \n \n \param[in] n -Размер вектора `x`. \n +Size of vector `x`. \n \n \return -`RES_OK` если функция выполнена успешно. \n - В противном случае \ref ERROR_CODE_GROUP "код ошибки". +`RES_OK` if function returns successfully. \n + Else \ref ERROR_CODE_GROUP "error code". -Пример: +Example: \code{.cpp} double y[5] = {0}; int i; @@ -469,14 +530,12 @@ for(i = 0; i < 5; i++) printf("%6.1f% ", y[i]); \endcode \n -Результат выполнения: +Vector `y` values are: \verbatim 1.0 1.0 1.0 1.0 1.0 \endverbatim -\author -Бахурин Сергей -www.dsplib.org +\author Sergey Bakhurin www.dsplib.org **************************************************************************** */ diff --git a/dspl/dox/en/complex.dox b/dspl/dox/en/complex.dox index 21b456f..1965b16 100644 --- a/dspl/dox/en/complex.dox +++ b/dspl/dox/en/complex.dox @@ -1,14 +1,13 @@ /*! **************************************************************************** \ingroup TYPES_GROUP \typedef complex_t -\brief Описание комплексного типа данных. +\brief Complex data type. -Комплексный тип данных в библиотеке DSPL-2.0 определен как -массив из двух элементов типа `double`. -При этом первый элемент массива определяет реальную часть -комплексного числа, а второй - мнимую. +DSPL-2.0 decribes complex numbers data type as an array +of two `double` elements. +First element sets real part, second --- imaginary part. -Например: +For example: \code{.cpp} complex_t z; @@ -16,10 +15,10 @@ z[1] = -2.0; \endcode -Переменная `z = 1-2j`, где `j` - мнимая единица. +Variable `z = 1-2j`, here `j` - imaginary unit. -Для удобства работы с комплексными числами реализованы -специальные макросы: \ref RE, \ref IM, \ref ABSSQR +For the convenience of working with complex numbers implemented +special macros: \ref RE, \ref IM, \ref ABSSQR ***************************************************************************** */ @@ -33,15 +32,16 @@ /*! **************************************************************************** \ingroup TYPES_GROUP \def ABSSQR(x) -\brief Макрос возвращает квадрат модуля комплексного числа `x`. +\brief +The macro returns the square of the modulus of a complex number `x`. -Квадрат модуля комплексного числа \f$ x = a + j b \f$ равен: +Square of the modulus of a complex number \f$ x = a + j b \f$ equals: \f[ |x|^2 = x x^* = a^2 + b^2. \f] -Например: +Example: \code{.cpp} complex_t z; double y; @@ -50,7 +50,7 @@ y = ABSSQR(z); \endcode -Переменная `z = 1-2j`, где `j` - мнимая единица, а переменная `y = 5`. +Variable `z = 1-2j`, here `j` - imaginary unit, but variable `y = 5`. ***************************************************************************** */ @@ -63,26 +63,26 @@ /*! **************************************************************************** \ingroup TYPES_GROUP \def IM(x) -\brief Макрос определяющий мнимую часть комплексного числа. +\brief Macro sets imaginary part of the complex number. -Например: +Example: \code{.cpp} complex_t z; RE(z) = 1.0; IM(z) = -2.0; \endcode -Переменная `z = 1-2j`, где `j` - мнимая единица. +Variable `z = 1-2j`, here `j` - imaginary unit. -Аналогично, макрос можно использовать для получения -мнимой части комплексного числа: +This macro can be used to return +imaginary part of the complex number: \code{.cpp} complex_t z = {3.0, -4.0}; double r; r = IM(z); \endcode -В данном примере переменная `z = 3-4i`, -а в переменой `r` будет храниться число -4. +In this example `z = 3-4i`, +but variable `r` will keep -4. ***************************************************************************** */ @@ -97,27 +97,27 @@ /*! **************************************************************************** \ingroup TYPES_GROUP \def RE(x) -\brief Макрос определяющий реальную часть комплексного числа. +\brief Macro sets real part of the complex number. -Например: +Example: \code{.cpp} complex_t z; RE(z) = 1.0; IM(z) = -2.0; \endcode -Переменная `z = 1-2j`, где `j` - мнимая единица. +Variable `z = 1-2j`, here `j` - imaginary unit. -Аналогично, макрос можно использовать для получения -реальной части комплексного числа: +This macro can be used to return +real part of the complex number: \code{.cpp} complex_t z = {3.0, -4.0}; double r; r = RE(z); \endcode -В данном примере переменная `z = 3-4i`, а в переменой `r` -будет храниться число 3. +In this example `z = 3-4i`, +but variable `r` will keep 3. ***************************************************************************** */ @@ -133,19 +133,23 @@ Function fills `re` and `im` vectors corresponds to real and image parts of the input complex array `x`. \n -\param[in] x Pointer to the real complex vector. \n - Vector size is `[n x 1]`. \n \n +\param[in] x +Pointer to the real complex vector. \n +Vector size is `[n x 1]`. \n \n -\param[in] n Size of the input complex vector `x` and real and image - vectors `re` and `im`. \n \n +\param[in] n +Size of the input complex vector `x` and real and image +vectors `re` and `im`. \n \n -\param[out] re Pointer to the real part vector. \n - Vector size is `[n x 1]`. \n - Memory must be allocated. \n \n +\param[out] re +Pointer to the real part vector. \n +Vector size is `[n x 1]`. \n +Memory must be allocated. \n \n -\param[out] im Pointer to the image part vector. \n - Vector size is `[n x 1]`. \n - Memory must be allocated. \n \n +\param[out] im +Pointer to the image part vector. \n +Vector size is `[n x 1]`. \n +Memory must be allocated. \n \n \return `RES_OK` if function converts complex vector successfully. \n @@ -188,14 +192,17 @@ So complex vector contains data: \n `y[i] = x[i] + j0, here i = 0,1,2 ... n-1` -\param[in] x Pointer to the real vector `x`. \n - Vector size is `[n x 1]`. \n \n +\param[in] x +Pointer to the real vector `x`. \n +Vector size is `[n x 1]`. \n \n -\param[in] n Size of the real vector `x` and complex vector `y`. \n \n +\param[in] n +Size of the real vector `x` and complex vector `y`. \n \n -\param[out] y Pointer to the complex vector `y`. \n - Vector size is `[n x 1]`. \n - Memory must be allocated. \n \n +\param[out] y +Pointer to the complex vector `y`. \n +Vector size is `[n x 1]`. \n +Memory must be allocated. \n \n \return @@ -204,7 +211,7 @@ Else \ref ERROR_CODE_GROUP "code error": \n -Например при выполнении следующего кода +Example: \code{.cpp} double x[3] = {1.0, 2.0, 3.0}; complex_t y[3]; diff --git a/dspl/dox/en/mainpage.dox b/dspl/dox/en/mainpage.dox index 775f08b..5c4a3fd 100644 --- a/dspl/dox/en/mainpage.dox +++ b/dspl/dox/en/mainpage.dox @@ -1,69 +1,82 @@ /*! **************************************************************************** -\mainpage DSPL-2.0 - библиотека алгоритмов цифровой обработки сигналов. +\mainpage DSPL-2.0 - Digital Signal Processing Algorithm Library +. -\section sec_main_page DSPL-2.0 --- свободная библиотека алгоритмов ЦОС - -DSPL-2.0 --- свободная библиотека алгоритмов цифровой обработки сигналов, -с открытым исходным кодом, написанная на языке Си. \n +\section sec_main_page DSPL-2.0 --- free DSP algorithm library -Распространяется под лицензией -LGPL v3. -Это позволяет использовать данную библиотеку в закрытых приложения при -условии динамической линковки. +DSPL-2.0 --- opensource cross-platform digital +signal processing algorithm library, written in C language. \n + +Distributed under + LGPL v3 license. +This allows to use this library in all applications with dynamic linking. -Исходные коды библиотеки доступны на +Source codes are available on GitHub. \n -Вы также можете внести свой вклад в развитие данной библиотеки. -\b Присоединяйтесь! +DSPL-2.0 includes follow algorithms sets: \n + - Digital spectral analysis, discrete and fast Fourier transform algorithms. \n + - Analog and digital IIR filters design and analysis. \n + - Digital FIR filters design and analysis. \n + - Windows function collection includes 15 different parametric + and nonparametric window functions. \n + - Digital Hilbert transform algorithms. \n + - Mathematical sections includes trigonometric, hyperbolic, elliptic functions of real and complex variables. \n + - Pseudorandom numbers generation algorithms. \n + - Statistic functions. \n + - Linar algebra algorithms (BLAS and LAPACK packages are used under the hood of the DSPL-2.0 library). \n + - Digital resampling algorithms. \n -\subsection sec_doc_start Компиляция и запуск программ DSPL-2.0 -Для сборки библиотеки DSPL-2.0 в системе Windows подготовлен специальный -набор программ \ref getting_started_toolchain "dsplib toolchain", -в состав которого входит компилятор GCC, пакет построения графиков GNUPLOT, -среда разработки и отладки CodeBlocks, а также файловый менеджер Far и -коллекция портированных Unix утилит. +\subsection sec_doc_start Build and run DSPL-2.0 + +To build the DSPL-2.0 library on Windows, a special +set of programs \ref getting_started_toolchain "dsplib toolchain" is provided. +Dsplib toolchain includes GCC, GNUPLOT, CodeBlocks IDE, Far file manager and also Unix utilities for Windows OS. \ref getting_started_toolchain \n \ref getting_started_make \n \ref getting_started_codeblocks \n \ref SYS_LOADING_GROUP \n -\subsection sec_doc_content Разделы документации -Математические функции: \n -\ref SPEC_MATH_COMMON_GROUP \n -\ref SPEC_MATH_TRIG_GROUP \n -\ref SPEC_MATH_TRANSCEND \n -\ref SPEC_MATH_ELLIP_GROUP \n -\ref SPEC_MATH_RAND_GEN_GROUP \n -\ref SPEC_MATH_STAT_GROUP \n -\ref SPEC_MATH_LINALG_GROUP \n +\subsection sec_doc_content Documentation content +Mathematical sections: \n + - \ref SPEC_MATH_COMMON_GROUP \n + - \ref SPEC_MATH_TRIG_GROUP \n + - \ref SPEC_MATH_TRANSCEND \n + - \ref SPEC_MATH_ELLIP_GROUP \n + - \ref SPEC_MATH_RAND_GEN_GROUP \n + - \ref SPEC_MATH_STAT_GROUP \n + - \ref SPEC_MATH_LINALG_GROUP \n \n -Алгоритмы спектрального анализа: \n -\ref DFT_GROUP \n -\ref WIN_GROUP \n -\ref HILBERT_GROUP \n + +Digital spectral analysis: \n + - \ref DFT_GROUP \n + - \ref WIN_GROUP \n + - \ref HILBERT_GROUP \n \n -Расчет и анализ аналоговых и цифровых фильтров:\n -\ref FILTER_CONV_GROUP \n -\ref IIR_FILTER_DESIGN_GROUP \n -\ref FIR_FILTER_DESIGN_GROUP \n -\ref FILTER_ANALYSIS_GROUP \n + +Analog and digital filters design and analysis:\n + - \ref FILTER_CONV_GROUP \n + - \ref IIR_FILTER_DESIGN_GROUP \n + - \ref FIR_FILTER_DESIGN_GROUP \n + - \ref FILTER_ANALYSIS_GROUP \n \n -Прочие алгоритмы: \n -\ref RESAMPLING_GROUP \n -\ref IN_OUT_GROUP \n -\ref PLOT_GROUP \n + +Other algortithms: \n + - \ref RESAMPLING_GROUP \n + - \ref IN_OUT_GROUP \n + - \ref PLOT_GROUP \n \n -Приложения\n -\ref TYPES_GROUP \n -\ref ERROR_CODE_GROUP \n + +Appendix\n + - \ref TYPES_GROUP \n + - \ref ERROR_CODE_GROUP \n ***************************************************************************** */ diff --git a/dspl/dox/footer_en.html b/dspl/dox/footer_en.html index 1e17f0f..a623e4b 100644 --- a/dspl/dox/footer_en.html +++ b/dspl/dox/footer_en.html @@ -19,6 +19,20 @@ $generatedby   +
+ + +
- \ No newline at end of file + + diff --git a/dspl/dox/header_en.html b/dspl/dox/header_en.html index 71a8c40..4b26796 100644 --- a/dspl/dox/header_en.html +++ b/dspl/dox/header_en.html @@ -36,9 +36,6 @@ $extrastylesheet - - - + + + + - - - - -
@@ -124,6 +129,7 @@ screen.colorDepth:screen.pixelDepth))+";u"+escape(document.URL)+ +
diff --git a/dspl/src/array.c b/dspl/src/array.c index 73327f9..5e559ed 100644 --- a/dspl/src/array.c +++ b/dspl/src/array.c @@ -29,7 +29,7 @@ /****************************************************************************** Vector linear transformation -------------------------------------------------------------------------------- -Documented: +Documented: RU, EN *******************************************************************************/ int array_scale_lin(double* x, int n, double xmin, double xmax, double dx, @@ -206,7 +206,7 @@ int DSPL_API flipip_cmplx(complex_t* x, int n) /******************************************************************************* Linspace array filling -------------------------------------------------------------------------------- -Documented: RU +Documented: RU, EN *******************************************************************************/ int DSPL_API linspace(double x0, double x1, int n, int type, double* x) { @@ -245,7 +245,7 @@ int DSPL_API linspace(double x0, double x1, int n, int type, double* x) /******************************************************************************* Logspace array filling -------------------------------------------------------------------------------- -Documented: RU +Documented: RU, EN *******************************************************************************/ int DSPL_API logspace(double x0, double x1, int n, int type, double* x) { @@ -284,7 +284,7 @@ int DSPL_API logspace(double x0, double x1, int n, int type, double* x) /******************************************************************************* Ones double array -------------------------------------------------------------------------------- -Documented: RU +Documented: RU, EN *******************************************************************************/ int DSPL_API ones(double* x, int n) { diff --git a/dspl/src/cheby.c b/dspl/src/cheby.c index 0a69160..1b7d487 100644 --- a/dspl/src/cheby.c +++ b/dspl/src/cheby.c @@ -25,55 +25,9 @@ /****************************************************************************** -\ingroup SPEC_MATH_TRANSCEND -\fn int cheby_poly1(double* x, int n, int ord, double* y) -\brief Chebyshev polynomial of the first kind order `ord` - -Function calculates Chebyshev polynomial \f$ C_ord(x)\f$ of the first kind -order `ord` for the real vector `x` (length `n`) by recurrent equation: -\f[ -C_ord(x) = 2 x C_{ord-1}(x) - C_{ord-2}(x), -\f] -where \f$ C_0(x) = 1 \f$, \f$ C_1(x) = x\f$ - -\param[in] x Pointer to the real argument vector `x`. \n - Vector size is `[n x 1]`. \n \n - -\param[in] n Size of vectors `x` and `y`. \n \n - -\param[in] ord Chebyshev polynomial order. \n \n - -\param[out] y Pointer to the Chebyshev polynomial values, - corresponds to the argument `x`. \n - Vector size is `[n x 1]`. \n - Memory must be allocated. \n \n - -\return -`RES_OK` if Chebyshev polynomial is calculated successfully. \n -Else \ref ERROR_CODE_GROUP "code error". \n - -Example: - -\include cheby_poly1_test.c - - \n \n -Text files will be created in `dat` directory: \n - -
-cheby_poly1_ord1.txt
-cheby_poly1_ord2.txt
-cheby_poly1_ord3.txt
-cheby_poly1_ord4.txt
-
- -GNUPLOT package will create Chebyshev polynomials plot from saved text-files: - -\image html cheby_poly1.png - -GNUPLOT script is follow: -\include cheby_poly1.plt - -\author Sergey Bakhurin www.dsplib.org +Chebyshev polynomial of the first kind order `ord` +-------------------------------------------------------------------------------- +Documented: RU, EN *******************************************************************************/ int DSPL_API cheby_poly1(double* x, int n, int ord, double* y) { @@ -121,55 +75,9 @@ int DSPL_API cheby_poly1(double* x, int n, int ord, double* y) /****************************************************************************** -\ingroup SPEC_MATH_TRANSCEND -\fn int cheby_poly2(double* x, int n, int ord, double* y) -\brief Chebyshev polynomial of the second kind order `ord` - -Function calculates Chebyshev polynomial \f$ U_ord(x)\f$ of the first kind -order `ord` for the real vector `x` (length `n`) by recurrent equation: -\f[ -U_ord(x) = 2 x U_{ord-1}(x) - U_{ord-2}(x), -\f] -where \f$ U_0(x) = 1 \f$, \f$ U_1(x) = 2x\f$ - -\param[in] x Pointer to the real argument vector `x`. \n - Vector size is `[n x 1]`. \n \n - -\param[in] n Size of vectors `x` and `y`. \n \n - -\param[in] ord Chebyshev polynomial order. \n \n - -\param[out] y Pointer to the Chebyshev polynomial values, - corresponds to the argument `x`. \n - Vector size is `[n x 1]`. \n - Memory must be allocated. \n \n - -\return -`RES_OK` if Chebyshev polynomial is calculated successfully. \n -Else \ref ERROR_CODE_GROUP "code error". \n - -Example: - -\include cheby_poly2_test.c - - \n \n -Text files will be created in `dat` directory: \n - -
-cheby_poly2_ord1.txt
-cheby_poly2_ord2.txt
-cheby_poly2_ord3.txt
-cheby_poly2_ord4.txt
-
- -GNUPLOT package will create Chebyshev polynomials plot from saved text-files: - -\image html cheby_poly2.png - -GNUPLOT script is follow: -\include cheby_poly2.plt - -\author Sergey Bakhurin www.dsplib.org +Chebyshev polynomial of the second kind order `ord` +-------------------------------------------------------------------------------- +Documented: RU, EN *******************************************************************************/ int DSPL_API cheby_poly2(double* x, int n, int ord, double* y) { diff --git a/dspl/src/complex.c b/dspl/src/complex.c index 363b117..df2f916 100644 --- a/dspl/src/complex.c +++ b/dspl/src/complex.c @@ -27,49 +27,9 @@ /****************************************************************************** -\ingroup TYPES_GROUP -\fn int cmplx2re(complex_t* x, int n, double* re, double* im) -\brief Separate complex vector to the real and image vectors - -Function fills `re` and `im` vectors corresponds to real and image -parts of the input complex array `x`. \n - - -\param[in] x Pointer to the real complex vector. \n - Vector size is `[n x 1]`. \n \n - -\param[in] n Size of the input complex vector `x` and real and image - vectors `re` and `im`. \n \n - -\param[out] re Pointer to the real part vector. \n - Vector size is `[n x 1]`. \n - Memory must be allocated. \n \n - -\param[out] im Pointer to the image part vector. \n - Vector size is `[n x 1]`. \n - Memory must be allocated. \n \n - -\return -`RES_OK` if function converts complex vector successfully. \n -Else \ref ERROR_CODE_GROUP "code error". \n - -Example: \n -\code{.cpp} - complex_t x[3] = {{1.0, 2.0}, {3.0, 4.0}, {5.0, 6.0}}; - double re[3], im[3]; - - cmplx2re(x, 3, re, im); -\endcode - -Vectors `re` and `im` will contains: - -\verbatim -re[0] = 1.0; im[0] = 2.0; -re[1] = 3.0; im[1] = 4.0; -re[2] = 5.0; im[2] = 6.0; -\endverbatim - -\author Sergey Bakhurin. www.dsplib.org +Separate complex vector to the real and image vectors +-------------------------------------------------------------------------------- +Documented: RU, EN *******************************************************************************/ int DSPL_API cmplx2re(complex_t* x, int n, double* re, double* im) { @@ -97,49 +57,9 @@ int DSPL_API cmplx2re(complex_t* x, int n, double* re, double* im) /****************************************************************************** -\ingroup TYPES_GROUP -\fn int re2cmplx(double* x, int n, complex_t *y) -\brief Convert real array to the complex array. - -Function copies the vector `x` to the real part of vector `y`. -Image part of the vector `y` sets as zero. \n -So complex vector contains data: \n -`y[i] = x[i] + j0, here i = 0,1,2 ... n-1` - - -\param[in] x Pointer to the real vector `x`. \n - Vector size is `[n x 1]`. \n \n - -\param[in] n Size of the real vector `x` and complex vector `y`. \n \n - -\param[out] y Pointer to the complex vector `y`. \n - Vector size is `[n x 1]`. \n - Memory must be allocated. \n \n - - -\return -`RES_OK` if function returns successfully. \n -Else \ref ERROR_CODE_GROUP "code error": \n - - - -Например при выполнении следующего кода -\code{.cpp} - double x[3] = {1.0, 2.0, 3.0}; - complex_t y[3]; - - re2cmplx(x, 3, y); -\endcode - -Vector `y` will keep: - -\verbatim - y[0] = 1+0j; - y[1] = 2+0j; - y[2] = 3+0j. -\endverbatim - -\author Sergey Bakhurin. www.dsplib.org +Convert real array to the complex array. +-------------------------------------------------------------------------------- +Documented: RU, EN *******************************************************************************/ int DSPL_API re2cmplx(double* x, int n, complex_t* y) {