kopia lustrzana https://github.com/Dsplib/libdspl-2.0
Changes to be committed:
modified: dspl/dox/ru/groups_define.dox modified: dspl/dox/ru/mainpage.dox modified: dspl/src/conv.c modified: dspl/src/randgen.c modified: include/dspl.hpull/6/merge
rodzic
db8750225c
commit
a8a0b4a0c1
|
@ -5,7 +5,6 @@
|
|||
пользователя. Данные функции являются кроссплатформенными и обеспечивают единый
|
||||
интерфейс динамического связывания в Linux и Windows.
|
||||
|
||||
|
||||
\defgroup TYPES_GROUP Типы данных DSPL
|
||||
В данной группе описаны типы данных библиотеки DSPL и методы их преобразования.
|
||||
|
||||
|
|
|
@ -35,6 +35,7 @@ DSPL-2.0 --- свободная библиотека алгоритмов циф
|
|||
|
||||
\subsection sec_doc_content Разделы документации
|
||||
<b>Математические функции:</b> \n
|
||||
|
||||
- \ref ARRAY_GROUP \n
|
||||
- \ref SPEC_MATH_COMMON_GROUP \n
|
||||
- \ref SPEC_MATH_POLY_GROUP \n
|
||||
|
@ -47,12 +48,14 @@ DSPL-2.0 --- свободная библиотека алгоритмов циф
|
|||
\n
|
||||
|
||||
<b>Алгоритмы спектрального анализа: </b> \n
|
||||
|
||||
- \ref DFT_GROUP \n
|
||||
- \ref WIN_GROUP \n
|
||||
- \ref HILBERT_GROUP \n
|
||||
\n
|
||||
|
||||
<b>Расчет и анализ аналоговых и цифровых фильтров:</b>\n
|
||||
|
||||
- \ref FILTER_CONV_GROUP \n
|
||||
- \ref IIR_FILTER_DESIGN_GROUP \n
|
||||
- \ref FIR_FILTER_DESIGN_GROUP \n
|
||||
|
@ -60,12 +63,14 @@ DSPL-2.0 --- свободная библиотека алгоритмов циф
|
|||
\n
|
||||
|
||||
<b>Прочие алгоритмы:</b> \n
|
||||
|
||||
- \ref RESAMPLING_GROUP \n
|
||||
- \ref IN_OUT_GROUP \n
|
||||
- \ref PLOT_GROUP \n
|
||||
\n
|
||||
|
||||
<b>Приложения</b>\n
|
||||
|
||||
- \ref TYPES_GROUP \n
|
||||
- \ref ERROR_CODE_GROUP \n
|
||||
***************************************************************************** */
|
||||
|
|
|
@ -894,7 +894,7 @@ Memory must be allocated. \n \n
|
|||
|
||||
\return
|
||||
`RES_OK` if filter output is calculated successfully. \n
|
||||
Else \ref ERROR_CODE_GROUP "code error": \n
|
||||
Else \ref ERROR_CODE_GROUP "code error". \n
|
||||
|
||||
Example:
|
||||
|
||||
|
|
|
@ -155,7 +155,47 @@ int DSPL_API random_init(random_t* prnd, int type, void* seed)
|
|||
|
||||
|
||||
#ifdef DOXYGEN_ENGLISH
|
||||
/*! ****************************************************************************
|
||||
\ingroup SPEC_MATH_RAND_GEN_GROUP
|
||||
\fn int randb(double* x, int n, random_t* prnd)
|
||||
\brief Binary unipolar [0, 1] pseudorandom vector.
|
||||
|
||||
The function generates a unipolar pseudo-random vector,
|
||||
each element of which takes an equally probable value of 0 or 1
|
||||
|
||||
\param[in,out] x
|
||||
Pointer to the unipolar pseudo-random vector. \n
|
||||
Vector size is `[n x 1]`. \n
|
||||
Memory must be allocated. \n\n
|
||||
|
||||
\param[in] n
|
||||
Size of vector `x`. \n\n
|
||||
|
||||
\param[in] prnd
|
||||
Pointer to the `random_t` structure. \n
|
||||
The structure must be pre-filled with the \ref random_init function. \n
|
||||
This pointer can be `NULL`, then it will be used
|
||||
built-in pseudorandom generator defined by the C language standard.
|
||||
However, this mode is not recommended,
|
||||
for example in cryptography and other tasks.
|
||||
There is no guarantee of the quality of the pseudorandom numbers produced if
|
||||
the `prnd` parameter is set to` NULL`. \n\n
|
||||
|
||||
\return
|
||||
`RES_OK` --- if pseudorandom vector is calculated successfully. \n
|
||||
Else \ref ERROR_CODE_GROUP "code error".
|
||||
|
||||
Example:
|
||||
|
||||
\include randb_test.c
|
||||
|
||||
Program genrates unipolar [0, 1] and bipolar[-1, 1] pseudorandom binary vectors.
|
||||
|
||||
As a result of the program run, you can see the graph:
|
||||
\image html randb_test.png
|
||||
|
||||
\author Sergey Bakhurin. www.dsplib.org
|
||||
***************************************************************************** */
|
||||
#endif
|
||||
#ifdef DOXYGEN_RUSSIAN
|
||||
/*! ****************************************************************************
|
||||
|
@ -229,7 +269,47 @@ int DSPL_API randb(double* x, int n, random_t* prnd)
|
|||
|
||||
|
||||
#ifdef DOXYGEN_ENGLISH
|
||||
/*! ****************************************************************************
|
||||
\ingroup SPEC_MATH_RAND_GEN_GROUP
|
||||
\fn int randb2(double* x, int n, random_t* prnd)
|
||||
\brief Binary bipolar [-1, 1] pseudorandom vector.
|
||||
|
||||
The function generates a unipolar pseudo-random vector,
|
||||
each element of which takes an equally probable value of -1 or 1
|
||||
|
||||
\param[in,out] x
|
||||
Pointer to the bipolar pseudorandom vector. \n
|
||||
Vector size is `[n x 1]`. \n
|
||||
Memory must be allocated. \n\n
|
||||
|
||||
\param[in] n
|
||||
Size of vector `x`. \n\n
|
||||
|
||||
\param[in] prnd
|
||||
Pointer to the `random_t` structure. \n
|
||||
The structure must be pre-filled with the \ref random_init function. \n
|
||||
This pointer can be `NULL`, then it will be used
|
||||
built-in pseudorandom generator defined by the C language standard.
|
||||
However, this mode is not recommended,
|
||||
for example in cryptography and other tasks.
|
||||
There is no guarantee of the quality of the pseudorandom numbers produced if
|
||||
the `prnd` parameter is set to` NULL`. \n\n
|
||||
|
||||
\return
|
||||
`RES_OK` --- if pseudorandom vector is calculated successfully. \n
|
||||
Else \ref ERROR_CODE_GROUP "code error".
|
||||
|
||||
Example:
|
||||
|
||||
\include randb_test.c
|
||||
|
||||
Program genrates unipolar [0, 1] and bipolar[-1, 1] pseudorandom binary vectors.
|
||||
|
||||
As a result of the program run, you can see the graph:
|
||||
\image html randb_test.png
|
||||
|
||||
\author Sergey Bakhurin. www.dsplib.org
|
||||
***************************************************************************** */
|
||||
#endif
|
||||
#ifdef DOXYGEN_RUSSIAN
|
||||
/*! ****************************************************************************
|
||||
|
@ -299,6 +379,9 @@ int DSPL_API randb2(double* x, int n, random_t* prnd)
|
|||
return RES_OK;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
#ifdef DOXYGEN_ENGLISH
|
||||
|
||||
#endif
|
||||
|
|
|
@ -238,6 +238,9 @@ typedef struct
|
|||
#define RAND_MT19937_NN 312
|
||||
|
||||
#ifdef DOXYGEN_ENGLISH
|
||||
|
||||
#endif
|
||||
#ifdef DOXYGEN_RUSSIAN
|
||||
/*! ****************************************************************************
|
||||
\ingroup SPEC_MATH_RAND_GEN_GROUP
|
||||
\struct random_t
|
||||
|
@ -247,9 +250,9 @@ typedef struct
|
|||
псевдослучайных чисел. В библиотеке используются следующие датчики:
|
||||
\li MRG32K3A -- 32 битный датчик разработан Пьером Лекуэром [1].
|
||||
\li MT19937-64 -- 64-битный датчик
|
||||
<a href = "https://en.wikipedia.org/wiki/Mersenne_Twister">
|
||||
Вихрь Мерсенна
|
||||
</a> [2, 3].
|
||||
<a href = "https://en.wikipedia.org/wiki/Mersenne_Twister">
|
||||
Вихрь Мерсенна
|
||||
</a> [2, 3].
|
||||
|
||||
\note
|
||||
[1] Pierre L'Ecuyer, (1999) Good Parameters and Implementations for Combined
|
||||
|
@ -281,22 +284,19 @@ typedef struct
|
|||
|
||||
\author Бахурин Сергей. www.dsplib.org
|
||||
***************************************************************************** */
|
||||
#endif
|
||||
#ifdef DOXYGEN_RUSSIAN
|
||||
|
||||
#endif
|
||||
typedef struct
|
||||
{
|
||||
|
||||
double mrg32k3a_seed;
|
||||
double mrg32k3a_x[3];
|
||||
double mrg32k3a_y[3];
|
||||
double mrg32k3a_seed;
|
||||
double mrg32k3a_x[3];
|
||||
double mrg32k3a_y[3];
|
||||
|
||||
/* The array for the MT19937 state vector */
|
||||
unsigned long long mt19937_mt[RAND_MT19937_NN];
|
||||
int mt19937_mti;
|
||||
/* The array for the MT19937 state vector */
|
||||
unsigned long long mt19937_mt[RAND_MT19937_NN];
|
||||
int mt19937_mti;
|
||||
|
||||
int type;
|
||||
int type;
|
||||
|
||||
}random_t;
|
||||
|
||||
|
|
Ładowanie…
Reference in New Issue