added header and footer for doxygen

added sinc function

 Changes to be committed:
	new file:   dox/doxy_stylesheet.css
	modified:   dox/doxyfile_ru
	new file:   dox/footer.html
	new file:   dox/header.html
	modified:   dspl/src/fft.c
	modified:   dspl/src/fillarray.c
	modified:   dspl/src/fourier_series.c
	modified:   dspl/src/math.c
	modified:   dspl/src/signals.c
	modified:   include/dspl.c
	modified:   include/dspl.h
	modified:   release/include/dspl.c
	modified:   release/include/dspl.h
pull/2/head
Dsplib 2018-09-12 23:52:09 +03:00
rodzic 19d4e40a88
commit 4ec07a1b4f
13 zmienionych plików z 2307 dodań i 452 usunięć

Plik diff jest za duży Load Diff

Wyświetl plik

@ -1,4 +1,4 @@
# Doxyfile 1.8.11
# Doxyfile 1.8.13
# This file describes the settings to be used by the documentation system
# doxygen (www.doxygen.org) for a project.
@ -303,6 +303,15 @@ EXTENSION_MAPPING =
MARKDOWN_SUPPORT = YES
# When the TOC_INCLUDE_HEADINGS tag is set to a non-zero value, all headings up
# to that level are automatically included in the table of contents, even if
# they do not have an id attribute.
# Note: This feature currently applies only to Markdown headings.
# Minimum value: 0, maximum value: 99, default value: 0.
# This tag requires that the tag MARKDOWN_SUPPORT is set to YES.
TOC_INCLUDE_HEADINGS = 0
# When enabled doxygen tries to link words that correspond to documented
# classes, or namespaces to their corresponding documentation. Such a link can
# be prevented in individual cases by putting a % sign in front of the word or
@ -809,8 +818,8 @@ INPUT_ENCODING = UTF-8
# If left blank the following patterns are tested:*.c, *.cc, *.cxx, *.cpp,
# *.c++, *.java, *.ii, *.ixx, *.ipp, *.i++, *.inl, *.idl, *.ddl, *.odl, *.h,
# *.hh, *.hxx, *.hpp, *.h++, *.cs, *.d, *.php, *.php4, *.php5, *.phtml, *.inc,
# *.m, *.markdown, *.md, *.mm, *.dox, *.py, *.pyw, *.f90, *.f, *.for, *.tcl,
# *.vhd, *.vhdl, *.ucf, *.qsf, *.as and *.js.
# *.m, *.markdown, *.md, *.mm, *.dox, *.py, *.pyw, *.f90, *.f95, *.f03, *.f08,
# *.f, *.for, *.tcl, *.vhd, *.vhdl, *.ucf and *.qsf.
FILE_PATTERNS = *.c \
*.cc \
@ -1156,7 +1165,7 @@ HTML_FILE_EXTENSION = .html
# of the possible markers and block names see the documentation.
# This tag requires that the tag GENERATE_HTML is set to YES.
HTML_HEADER =
HTML_HEADER = header.html
# The HTML_FOOTER tag can be used to specify a user-defined HTML footer for each
# generated HTML page. If the tag is left blank doxygen will generate a standard
@ -1166,7 +1175,7 @@ HTML_HEADER =
# that doxygen normally uses.
# This tag requires that the tag GENERATE_HTML is set to YES.
HTML_FOOTER =
HTML_FOOTER = footer.html
# The HTML_STYLESHEET tag can be used to specify a user-defined cascading style
# sheet that is used by each HTML page. It can be used to fine-tune the look of
@ -1178,7 +1187,7 @@ HTML_FOOTER =
# obsolete.
# This tag requires that the tag GENERATE_HTML is set to YES.
HTML_STYLESHEET =
HTML_STYLESHEET = doxy_stylesheet.css
# The HTML_EXTRA_STYLESHEET tag can be used to specify additional user-defined
# cascading style sheets that are included after the standard style sheets
@ -2424,6 +2433,11 @@ DIAFILE_DIRS =
PLANTUML_JAR_PATH =
# When using plantuml, the PLANTUML_CFG_FILE tag can be used to specify a
# configuration file for plantuml.
PLANTUML_CFG_FILE =
# When using plantuml, the specified paths are searched for files specified by
# the !include statement in a plantuml block.

46
dox/footer.html 100644
Wyświetl plik

@ -0,0 +1,46 @@
<!-- HTML footer for doxygen 1.8.13-->
<!-- start footer part -->
<!--BEGIN GENERATE_TREEVIEW-->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
<ul>
$navpath
<li class="footer">$generatedby
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="$relpath^doxygen.png" alt="doxygen"/></a> $doxygenversion </li>
</ul>
</div>
<!--END GENERATE_TREEVIEW-->
<!--BEGIN !GENERATE_TREEVIEW-->
<hr class="footer"/><address class="footer"><small>
$generatedby &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="$relpath^doxygen.png" alt="doxygen"/>
</a> $doxygenversion
</small></address>
<!--END !GENERATE_TREEVIEW-->
</div> <!--div id="dsplib_content"-->
</div><!--div id="dsplib_maket"-->
</div> <!-- div id="dsplib_main" -->
<div id="dsplib_footer">
<div id = "dsplib_bottombar">
<a href="http://ru.dsplib.org">Содержание</a>
<a href="http://ru.dsplib.org/dspl">DSPL</a>
<a href="http://ru.dsplib.org/forum">Форум</a>
<div class="dsplib_copyright">
&copy; Бахурин Сергей 2015 - 2018. Все права защищены.
Любое копирование материалов сайте без разрешения автора запрещено.
</div>
</div>
</div>
</div> <!-- div id="wrapper" -->
</body>
</html>

134
dox/header.html 100644
Wyświetl plik

@ -0,0 +1,134 @@
<!-- HTML header for doxygen 1.8.13-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen $doxygenversion"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<!--BEGIN PROJECT_NAME--><title>$projectname: $title</title><!--END PROJECT_NAME-->
<!--BEGIN !PROJECT_NAME--><title>$title</title><!--END !PROJECT_NAME-->
<link href="$relpath^tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="$relpath^jquery.js"></script>
<script type="text/javascript" src="$relpath^dynsections.js"></script>
$treeview
$search
$mathjax
<link href="$relpath^$stylesheet" rel="stylesheet" type="text/css" />
$extrastylesheet
<link href="http://dsplib.org/header_footer.css" rel="stylesheet">
</head>
<body>
<!-- Yandex.Metrika counter -->
<script type="text/javascript" >
(function (d, w, c) {
(w[c] = w[c] || []).push(function() {
try {
w.yaCounter32971694 = new Ya.Metrika({
id:32971694,
clickmap:true,
trackLinks:true,
accurateTrackBounce:true
});
} catch(e) { }
});
var n = d.getElementsByTagName("script")[0],
s = d.createElement("script"),
f = function () { n.parentNode.insertBefore(s, n); };
s.type = "text/javascript";
s.async = true;
s.src = "https://mc.yandex.ru/metrika/watch.js";
if (w.opera == "[object Opera]") {
d.addEventListener("DOMContentLoaded", f, false);
} else { f(); }
})(document, window, "yandex_metrika_callbacks");
</script>
<noscript><div><img src="https://mc.yandex.ru/watch/32971694" style="position:absolute; left:-9999px;" alt="" /></div></noscript>
<!-- /Yandex.Metrika counter -->
<div id="dsplib_wrapper">
<div id="dsplib_main">
<div id="dsplib_header">
<div id = "dsplib_menubar">
<nav>
<ul>
<div id = "dsplib_logo"><img src="http://dsplib.org/logo.png" /> </div>
<li><a href="http://ru.dsplib.org">Содержание</a></li>
<li><a href="http://ru.dsplib.org/dspl">DSPL</a></li>
<li><a href="http://ru.dsplib.org/forum">Форум</a></li>
</ul>
</nav>
</div><!--div id="dsplib_header"-->
</div><!--div id = "dsplib_menubar"-->
<div id="dsplib_maket">
<div id="dsplib_right">
<script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
<!-- right -->
<ins class="adsbygoogle"
style="display:inline-block;width:160px;height:600px"
data-ad-client="ca-pub-6804616542664514"
data-ad-slot="1279323001"></ins>
<script>
(adsbygoogle = window.adsbygoogle || []).push({});
</script>
</div>
<div id="dsplib_content">
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<!--BEGIN TITLEAREA-->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
<tbody>
<tr style="height: 56px;">
<!--BEGIN PROJECT_LOGO-->
<td id="projectlogo"><img alt="Logo" src="$relpath^$projectlogo"/></td>
<!--END PROJECT_LOGO-->
<!--BEGIN PROJECT_NAME-->
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">$projectname
<!--BEGIN PROJECT_NUMBER-->&#160;<span id="projectnumber">$projectnumber</span><!--END PROJECT_NUMBER-->
</div>
<!--BEGIN PROJECT_BRIEF--><div id="projectbrief">$projectbrief</div><!--END PROJECT_BRIEF-->
</td>
<!--END PROJECT_NAME-->
<!--BEGIN !PROJECT_NAME-->
<!--BEGIN PROJECT_BRIEF-->
<td style="padding-left: 0.5em;">
<div id="projectbrief">$projectbrief</div>
</td>
<!--END PROJECT_BRIEF-->
<!--END !PROJECT_NAME-->
<!--BEGIN DISABLE_INDEX-->
<!--BEGIN SEARCHENGINE-->
<td>$searchbox</td>
<!--END SEARCHENGINE-->
<!--END DISABLE_INDEX-->
</tr>
</tbody>
</table>
</div>
<!--END TITLEAREA-->
<!-- end header part -->

Wyświetl plik

@ -401,9 +401,9 @@ int DSPL_API fft_shift(double* x, int n, double* y)
/**************************************************************************************************
/*******************************************************************************
FFT shifting for complex vector
***************************************************************************************************/
*******************************************************************************/
int DSPL_API fft_shift_cmplx(complex_t* x, int n, complex_t* y)
{
int n2, r;
@ -445,10 +445,3 @@ int DSPL_API fft_shift_cmplx(complex_t* x, int n, complex_t* y)
return RES_OK;
}

Wyświetl plik

@ -25,9 +25,9 @@
/**************************************************************************************************
/*******************************************************************************
Linspace array filling
***************************************************************************************************/
*******************************************************************************/
int DSPL_API linspace(double x0, double x1, int n, int type, double* x)
{
double dx;
@ -62,9 +62,9 @@ int DSPL_API linspace(double x0, double x1, int n, int type, double* x)
/**************************************************************************************************
/*******************************************************************************
Logspace array filling
***************************************************************************************************/
*******************************************************************************/
int DSPL_API logspace(double x0, double x1, int n, int type, double* x)
{
double mx, a, b;
@ -98,8 +98,3 @@ int DSPL_API logspace(double x0, double x1, int n, int type, double* x)
return RES_OK;
}

Wyświetl plik

@ -85,13 +85,13 @@ int DSPL_API fourier_series_rec(double* w, complex_t* s, int nw, double *t, int
for(k = 0; k < nw; k++)
{
for(m = 1; m < nt; m++)
for(m = 0; m < nt; m++)
{
RE(e) = cos(w[k] * t[m]);
IM(e) = sin(w[k] * t[m]);
RE(y[k]) += CMRE(s[k], e);
IM(y[k]) += CMIM(s[k], e);
RE(y[m]) += CMRE(s[k], e);
IM(y[m]) += CMIM(s[k], e);
}
}

Wyświetl plik

@ -24,10 +24,37 @@
#include "dspl.h"
/*******************************************************************************
module operator for double
*******************************************************************************/
double DSPL_API dmod (double x, double y)
{
if(y == 0.0)
return x;
return x - floor(x/y) * y;
if(y == 0.0)
return x;
return x - floor(x/y) * y;
}
/*******************************************************************************
sinc(x) = sin(pi*x)/(pi*x)
*******************************************************************************/
int DSPL_API sinc(double* x, int n, double* y)
{
int k;
if(!x || !y)
return ERROR_PTR;
if(n<1)
return ERROR_SIZE;
for(k = 0; k < n; k++)
y[k] = (x[k]==0.0) ? 1.0 : sin(M_PI*x[k])/(M_PI*x[k]);
return RES_OK;
}

Wyświetl plik

@ -29,32 +29,58 @@
/**************************************************************************************************
/*******************************************************************************
Rectangle pulse signal
***************************************************************************************************/
int DSPL_API signal_pimp(double* t, size_t n, double amp, double tau, double dt, double period, double* y)
*******************************************************************************/
int DSPL_API signal_pimp(double* t, size_t n, double amp,
double tau, double dt, double period, double* y)
{
int k;
double ll, lr, p2, tp;
int k;
double ll, lr, p2, tp;
if(!t || !y)
return ERROR_PTR;
if(n < 1)
return ERROR_SIZE;
if(tau < 0.0 || period < 0.0)
return ERROR_NEGATIVE;
if(!t || !y)
return ERROR_PTR;
if(n < 1)
return ERROR_SIZE;
if(tau < 0.0 || period < 0.0)
return ERROR_NEGATIVE;
ll = -0.5 * tau;
lr = 0.5 * tau;
p2 = period*0.5;
for(k = 0; k < n; k++)
{
tp = dmod(t[k] - dt + p2, period) - p2;
y[k] = (tp < ll || tp > lr) ? 0.0 : amp;
}
return RES_OK;
ll = -0.5 * tau;
lr = 0.5 * tau;
p2 = period*0.5;
for(k = 0; k < n; k++)
{
tp = dmod(t[k] - dt + p2, period) - p2;
y[k] = (tp < ll || tp > lr) ? 0.0 : amp;
}
return RES_OK;
}
/*******************************************************************************
Saw periodic signal
*******************************************************************************/
int DSPL_API signal_saw(double* t, size_t n, double amp,
double dt, double period, double* y)
{
int k;
double p2, tp;
if(!t || !y)
return ERROR_PTR;
if(n < 1)
return ERROR_SIZE;
if(period < 0.0)
return ERROR_NEGATIVE;
p2 = period*0.5;
for(k = 0; k < n; k++)
{
tp = dmod(t[k] - dt + p2, period) - p2;
y[k] = amp * tp;
}
return RES_OK;
}

Wyświetl plik

@ -105,7 +105,9 @@ p_randu randu ;
p_ratcompos ratcompos ;
p_re2cmplx re2cmplx ;
p_signal_pimp signal_pimp ;
p_signal_saw signal_saw ;
p_sin_cmplx sin_cmplx ;
p_sinc sinc ;
p_sqrt_cmplx sqrt_cmplx ;
p_trapint trapint ;
p_trapint_cmplx trapint_cmplx ;
@ -235,7 +237,9 @@ void* dspl_load()
LOAD_FUNC(ratcompos);
LOAD_FUNC(re2cmplx);
LOAD_FUNC(signal_pimp);
LOAD_FUNC(signal_saw);
LOAD_FUNC(sin_cmplx);
LOAD_FUNC(sinc);
LOAD_FUNC(sqrt_cmplx);
LOAD_FUNC(trapint);
LOAD_FUNC(trapint_cmplx);
@ -284,6 +288,3 @@ void dspl_free(void* handle)
}

Wyświetl plik

@ -593,10 +593,21 @@ DECLARE_FUNC(int, signal_pimp, double*
COMMA double
COMMA double*);
//------------------------------------------------------------------------------
DECLARE_FUNC(int, signal_saw, double* t
COMMA size_t n
COMMA double amp
COMMA double dt
COMMA double period
COMMA double* y);
//------------------------------------------------------------------------------
DECLARE_FUNC(int, sin_cmplx, complex_t*
COMMA int
COMMA complex_t*);
//------------------------------------------------------------------------------
DECLARE_FUNC(int, sinc, double* x
COMMA int n
COMMA double* y);
//------------------------------------------------------------------------------
DECLARE_FUNC(int, sqrt_cmplx, complex_t*
COMMA int
COMMA complex_t*);

Wyświetl plik

@ -105,7 +105,9 @@ p_randu randu ;
p_ratcompos ratcompos ;
p_re2cmplx re2cmplx ;
p_signal_pimp signal_pimp ;
p_signal_saw signal_saw ;
p_sin_cmplx sin_cmplx ;
p_sinc sinc ;
p_sqrt_cmplx sqrt_cmplx ;
p_trapint trapint ;
p_trapint_cmplx trapint_cmplx ;
@ -235,7 +237,9 @@ void* dspl_load()
LOAD_FUNC(ratcompos);
LOAD_FUNC(re2cmplx);
LOAD_FUNC(signal_pimp);
LOAD_FUNC(signal_saw);
LOAD_FUNC(sin_cmplx);
LOAD_FUNC(sinc);
LOAD_FUNC(sqrt_cmplx);
LOAD_FUNC(trapint);
LOAD_FUNC(trapint_cmplx);
@ -284,6 +288,3 @@ void dspl_free(void* handle)
}

Wyświetl plik

@ -593,10 +593,21 @@ DECLARE_FUNC(int, signal_pimp, double*
COMMA double
COMMA double*);
//------------------------------------------------------------------------------
DECLARE_FUNC(int, signal_saw, double* t
COMMA size_t n
COMMA double amp
COMMA double dt
COMMA double period
COMMA double* y);
//------------------------------------------------------------------------------
DECLARE_FUNC(int, sin_cmplx, complex_t*
COMMA int
COMMA complex_t*);
//------------------------------------------------------------------------------
DECLARE_FUNC(int, sinc, double* x
COMMA int n
COMMA double* y);
//------------------------------------------------------------------------------
DECLARE_FUNC(int, sqrt_cmplx, complex_t*
COMMA int
COMMA complex_t*);