diff --git a/dox/doxy_stylesheet.css b/dox/doxy_stylesheet.css new file mode 100644 index 0000000..4f1ab91 --- /dev/null +++ b/dox/doxy_stylesheet.css @@ -0,0 +1,1596 @@ +/* The standard CSS for doxygen 1.8.13 */ + +body, table, div, p, dl { + font: 400 14px/22px Roboto,sans-serif; +} + +p.reference, p.definition { + font: 400 14px/22px Roboto,sans-serif; +} + +/* @group Heading Levels */ + +h1.groupheader { + font-size: 150%; +} + +.title { + font: 400 14px/28px Roboto,sans-serif; + font-size: 150%; + font-weight: bold; + margin: 10px 2px; +} + +h2.groupheader { + border-bottom: 1px solid #879ECB; + color: #354C7B; + font-size: 150%; + font-weight: normal; + margin-top: 1.75em; + padding-top: 8px; + padding-bottom: 4px; + width: 100%; +} + +h3.groupheader { + font-size: 100%; +} + +h1, h2, h3, h4, h5, h6 { + -webkit-transition: text-shadow 0.5s linear; + -moz-transition: text-shadow 0.5s linear; + -ms-transition: text-shadow 0.5s linear; + -o-transition: text-shadow 0.5s linear; + transition: text-shadow 0.5s linear; + margin-right: 15px; +} + +h1.glow, h2.glow, h3.glow, h4.glow, h5.glow, h6.glow { + text-shadow: 0 0 15px cyan; +} + +dt { + font-weight: bold; +} + +div.multicol { + -moz-column-gap: 1em; + -webkit-column-gap: 1em; + -moz-column-count: 3; + -webkit-column-count: 3; +} + +p.startli, p.startdd { + margin-top: 2px; +} + +p.starttd { + margin-top: 0px; +} + +p.endli { + margin-bottom: 0px; +} + +p.enddd { + margin-bottom: 4px; +} + +p.endtd { + margin-bottom: 2px; +} + +/* @end */ + +caption { + font-weight: bold; +} + +span.legend { + font-size: 70%; + text-align: center; +} + +h3.version { + font-size: 90%; + text-align: center; +} + +div.qindex, div.navtab{ + background-color: #EBEFF6; + border: 1px solid #A3B4D7; + text-align: center; +} + +div.qindex, div.navpath { + width: 100%; + line-height: 140%; +} + +div.navtab { + margin-right: 15px; +} + +/* @group Link Styling */ + +a { + color: #3D578C; + font-weight: normal; + text-decoration: none; +} + +.contents a:visited { + color: #4665A2; +} + +a:hover { + text-decoration: underline; +} + +a.qindex { + font-weight: bold; +} + +a.qindexHL { + font-weight: bold; + background-color: #9CAFD4; + color: #ffffff; + border: 1px double #869DCA; +} + +.contents a.qindexHL:visited { + color: #ffffff; +} + +a.el { + font-weight: bold; +} + +a.elRef { +} + +a.code, a.code:visited, a.line, a.line:visited { + color: #4665A2; +} + +a.codeRef, a.codeRef:visited, a.lineRef, a.lineRef:visited { + color: #4665A2; +} + +/* @end */ + +dl.el { + margin-left: -1cm; +} + +pre.fragment { + border: 1px solid #C4CFE5; + background-color: #FBFCFD; + padding: 4px 6px; + margin: 4px 8px 4px 2px; + overflow: auto; + word-wrap: break-word; + font-size: 9pt; + line-height: 125%; + font-family: monospace, fixed; + font-size: 105%; +} + +div.fragment { + padding: 0px; + margin: 4px 8px 4px 2px; + background-color: #FBFCFD; + border: 1px solid #C4CFE5; +} + +div.line { + font-family: monospace, fixed; + font-size: 13px; + min-height: 13px; + line-height: 1.0; + text-wrap: unrestricted; + white-space: -moz-pre-wrap; /* Moz */ + white-space: -pre-wrap; /* Opera 4-6 */ + white-space: -o-pre-wrap; /* Opera 7 */ + white-space: pre-wrap; /* CSS3 */ + word-wrap: break-word; /* IE 5.5+ */ + text-indent: -53px; + padding-left: 53px; + padding-bottom: 0px; + margin: 0px; + -webkit-transition-property: background-color, box-shadow; + -webkit-transition-duration: 0.5s; + -moz-transition-property: background-color, box-shadow; + -moz-transition-duration: 0.5s; + -ms-transition-property: background-color, box-shadow; + -ms-transition-duration: 0.5s; + -o-transition-property: background-color, box-shadow; + -o-transition-duration: 0.5s; + transition-property: background-color, box-shadow; + transition-duration: 0.5s; +} + +div.line:after { + content:"\000A"; + white-space: pre; +} + +div.line.glow { + background-color: cyan; + box-shadow: 0 0 10px cyan; +} + + +span.lineno { + padding-right: 4px; + text-align: right; + border-right: 2px solid #0F0; + background-color: #E8E8E8; + white-space: pre; +} +span.lineno a { + background-color: #D8D8D8; +} + +span.lineno a:hover { + background-color: #C8C8C8; +} + +.lineno { + -webkit-touch-callout: none; + -webkit-user-select: none; + -khtml-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; +} + +div.ah, span.ah { + background-color: black; + font-weight: bold; + color: #ffffff; + margin-bottom: 3px; + margin-top: 3px; + padding: 0.2em; + border: solid thin #333; + border-radius: 0.5em; + -webkit-border-radius: .5em; + -moz-border-radius: .5em; + box-shadow: 2px 2px 3px #999; + -webkit-box-shadow: 2px 2px 3px #999; + -moz-box-shadow: rgba(0, 0, 0, 0.15) 2px 2px 2px; + background-image: -webkit-gradient(linear, left top, left bottom, from(#eee), to(#000),color-stop(0.3, #444)); + background-image: -moz-linear-gradient(center top, #eee 0%, #444 40%, #000 110%); +} + +div.classindex ul { + list-style: none; + padding-left: 0; +} + +div.classindex span.ai { + display: inline-block; +} + +div.groupHeader { + margin-left: 16px; + margin-top: 12px; + font-weight: bold; +} + +div.groupText { + margin-left: 16px; + font-style: italic; +} + +body { + background-color: white; + color: black; + margin: 0; +} + +div.contents { + margin-top: 10px; + margin-left: 12px; + margin-right: 8px; +} + +td.indexkey { + background-color: #EBEFF6; + font-weight: bold; + border: 1px solid #C4CFE5; + margin: 2px 0px 2px 0; + padding: 2px 10px; + white-space: nowrap; + vertical-align: top; +} + +td.indexvalue { + background-color: #EBEFF6; + border: 1px solid #C4CFE5; + padding: 2px 10px; + margin: 2px 0px; +} + +tr.memlist { + background-color: #EEF1F7; +} + +p.formulaDsp { + text-align: center; +} + +img.formulaDsp { + +} + +img.formulaInl { + vertical-align: middle; +} + +div.center { + text-align: center; + margin-top: 0px; + margin-bottom: 0px; + padding: 0px; +} + +div.center img { + border: 0px; +} + +address.footer { + text-align: right; + padding-right: 12px; +} + +img.footer { + border: 0px; + vertical-align: middle; +} + +/* @group Code Colorization */ + +span.keyword { + color: #008000 +} + +span.keywordtype { + color: #604020 +} + +span.keywordflow { + color: #e08000 +} + +span.comment { + color: #800000 +} + +span.preprocessor { + color: #806020 +} + +span.stringliteral { + color: #002080 +} + +span.charliteral { + color: #008080 +} + +span.vhdldigit { + color: #ff00ff +} + +span.vhdlchar { + color: #000000 +} + +span.vhdlkeyword { + color: #700070 +} + +span.vhdllogic { + color: #ff0000 +} + +blockquote { + background-color: #F7F8FB; + border-left: 2px solid #9CAFD4; + margin: 0 24px 0 4px; + padding: 0 12px 0 16px; +} + +/* @end */ + +/* +.search { + color: #003399; + font-weight: bold; +} + +form.search { + margin-bottom: 0px; + margin-top: 0px; +} + +input.search { + font-size: 75%; + color: #000080; + font-weight: normal; + background-color: #e8eef2; +} +*/ + +td.tiny { + font-size: 75%; +} + +.dirtab { + padding: 4px; + border-collapse: collapse; + border: 1px solid #A3B4D7; +} + +th.dirtab { + background: #EBEFF6; + font-weight: bold; +} + +hr { + height: 0px; + border: none; + border-top: 1px solid #4A6AAA; +} + +hr.footer { + height: 1px; +} + +/* @group Member Descriptions */ + +table.memberdecls { + border-spacing: 0px; + padding: 0px; +} + +.memberdecls td, .fieldtable tr { + -webkit-transition-property: background-color, box-shadow; + -webkit-transition-duration: 0.5s; + -moz-transition-property: background-color, box-shadow; + -moz-transition-duration: 0.5s; + -ms-transition-property: background-color, box-shadow; + -ms-transition-duration: 0.5s; + -o-transition-property: background-color, box-shadow; + -o-transition-duration: 0.5s; + transition-property: background-color, box-shadow; + transition-duration: 0.5s; +} + +.memberdecls td.glow, .fieldtable tr.glow { + background-color: cyan; + box-shadow: 0 0 15px cyan; +} + +.mdescLeft, .mdescRight, +.memItemLeft, .memItemRight, +.memTemplItemLeft, .memTemplItemRight, .memTemplParams { + background-color: #F9FAFC; + border: none; + margin: 4px; + padding: 1px 0 0 8px; +} + +.mdescLeft, .mdescRight { + padding: 0px 8px 4px 8px; + color: #555; +} + +.memSeparator { + border-bottom: 1px solid #DEE4F0; + line-height: 1px; + margin: 0px; + padding: 0px; +} + +.memItemLeft, .memTemplItemLeft { + white-space: nowrap; +} + +.memItemRight { + width: 100%; +} + +.memTemplParams { + color: #4665A2; + white-space: nowrap; + font-size: 80%; +} + +/* @end */ + +/* @group Member Details */ + +/* Styles for detailed member documentation */ + +.memtitle { + padding: 8px; + border-top: 1px solid #A8B8D9; + border-left: 1px solid #A8B8D9; + border-right: 1px solid #A8B8D9; + border-top-right-radius: 4px; + border-top-left-radius: 4px; + margin-bottom: -1px; + background-image: url('nav_f.png'); + background-repeat: repeat-x; + background-color: #E2E8F2; + line-height: 1.25; + font-weight: 300; + float:left; +} + +.permalink +{ + font-size: 65%; + display: inline-block; + vertical-align: middle; +} + +.memtemplate { + font-size: 80%; + color: #4665A2; + font-weight: normal; + margin-left: 9px; +} + +.memnav { + background-color: #EBEFF6; + border: 1px solid #A3B4D7; + text-align: center; + margin: 2px; + margin-right: 15px; + padding: 2px; +} + +.mempage { + width: 100%; +} + +.memitem { + padding: 0; + margin-bottom: 10px; + margin-right: 5px; + -webkit-transition: box-shadow 0.5s linear; + -moz-transition: box-shadow 0.5s linear; + -ms-transition: box-shadow 0.5s linear; + -o-transition: box-shadow 0.5s linear; + transition: box-shadow 0.5s linear; + display: table !important; + width: 100%; +} + +.memitem.glow { + box-shadow: 0 0 15px cyan; +} + +.memname { + font-weight: 400; + margin-left: 6px; +} + +.memname td { + vertical-align: bottom; +} + +.memproto, dl.reflist dt { + border-top: 1px solid #A8B8D9; + border-left: 1px solid #A8B8D9; + border-right: 1px solid #A8B8D9; + padding: 6px 0px 6px 0px; + color: #253555; + font-weight: bold; + text-shadow: 0px 1px 1px rgba(255, 255, 255, 0.9); + background-color: #DFE5F1; + /* opera specific markup */ + box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15); + border-top-right-radius: 4px; + /* firefox specific markup */ + -moz-box-shadow: rgba(0, 0, 0, 0.15) 5px 5px 5px; + -moz-border-radius-topright: 4px; + /* webkit specific markup */ + -webkit-box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15); + -webkit-border-top-right-radius: 4px; + +} + +.overload { + font-family: "courier new",courier,monospace; + font-size: 65%; +} + +.memdoc, dl.reflist dd { + border-bottom: 1px solid #A8B8D9; + border-left: 1px solid #A8B8D9; + border-right: 1px solid #A8B8D9; + padding: 6px 10px 2px 10px; + background-color: #FBFCFD; + border-top-width: 0; + background-image:url('nav_g.png'); + background-repeat:repeat-x; + background-color: #FFFFFF; + /* opera specific markup */ + border-bottom-left-radius: 4px; + border-bottom-right-radius: 4px; + box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15); + /* firefox specific markup */ + -moz-border-radius-bottomleft: 4px; + -moz-border-radius-bottomright: 4px; + -moz-box-shadow: rgba(0, 0, 0, 0.15) 5px 5px 5px; + /* webkit specific markup */ + -webkit-border-bottom-left-radius: 4px; + -webkit-border-bottom-right-radius: 4px; + -webkit-box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15); +} + +dl.reflist dt { + padding: 5px; +} + +dl.reflist dd { + margin: 0px 0px 10px 0px; + padding: 5px; +} + +.paramkey { + text-align: right; +} + +.paramtype { + white-space: nowrap; +} + +.paramname { + color: #602020; + white-space: nowrap; +} +.paramname em { + font-style: normal; +} +.paramname code { + line-height: 14px; +} + +.params, .retval, .exception, .tparams { + margin-left: 0px; + padding-left: 0px; +} + +.params .paramname, .retval .paramname { + font-weight: bold; + vertical-align: top; +} + +.params .paramtype { + font-style: italic; + vertical-align: top; +} + +.params .paramdir { + font-family: "courier new",courier,monospace; + vertical-align: top; +} + +table.mlabels { + border-spacing: 0px; +} + +td.mlabels-left { + width: 100%; + padding: 0px; +} + +td.mlabels-right { + vertical-align: bottom; + padding: 0px; + white-space: nowrap; +} + +span.mlabels { + margin-left: 8px; +} + +span.mlabel { + background-color: #728DC1; + border-top:1px solid #5373B4; + border-left:1px solid #5373B4; + border-right:1px solid #C4CFE5; + border-bottom:1px solid #C4CFE5; + text-shadow: none; + color: white; + margin-right: 4px; + padding: 2px 3px; + border-radius: 3px; + font-size: 7pt; + white-space: nowrap; + vertical-align: middle; +} + + + +/* @end */ + +/* these are for tree view inside a (index) page */ + +div.directory { + margin: 10px 0px; + border-top: 1px solid #9CAFD4; + border-bottom: 1px solid #9CAFD4; + width: 100%; +} + +.directory table { + border-collapse:collapse; +} + +.directory td { + margin: 0px; + padding: 0px; + vertical-align: top; +} + +.directory td.entry { + white-space: nowrap; + padding-right: 6px; + padding-top: 3px; +} + +.directory td.entry a { + outline:none; +} + +.directory td.entry a img { + border: none; +} + +.directory td.desc { + width: 100%; + padding-left: 6px; + padding-right: 6px; + padding-top: 3px; + border-left: 1px solid rgba(0,0,0,0.05); +} + +.directory tr.even { + padding-left: 6px; + background-color: #F7F8FB; +} + +.directory img { + vertical-align: -30%; +} + +.directory .levels { + white-space: nowrap; + width: 100%; + text-align: right; + font-size: 9pt; +} + +.directory .levels span { + cursor: pointer; + padding-left: 2px; + padding-right: 2px; + color: #3D578C; +} + +.arrow { + color: #9CAFD4; + -webkit-user-select: none; + -khtml-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; + cursor: pointer; + font-size: 80%; + display: inline-block; + width: 16px; + height: 22px; +} + +.icon { + font-family: Arial, Helvetica; + font-weight: bold; + font-size: 12px; + height: 14px; + width: 16px; + display: inline-block; + background-color: #728DC1; + color: white; + text-align: center; + border-radius: 4px; + margin-left: 2px; + margin-right: 2px; +} + +.icona { + width: 24px; + height: 22px; + display: inline-block; +} + +.iconfopen { + width: 24px; + height: 18px; + margin-bottom: 4px; + background-image:url('folderopen.png'); + background-position: 0px -4px; + background-repeat: repeat-y; + vertical-align:top; + display: inline-block; +} + +.iconfclosed { + width: 24px; + height: 18px; + margin-bottom: 4px; + background-image:url('folderclosed.png'); + background-position: 0px -4px; + background-repeat: repeat-y; + vertical-align:top; + display: inline-block; +} + +.icondoc { + width: 24px; + height: 18px; + margin-bottom: 4px; + background-image:url('doc.png'); + background-position: 0px -4px; + background-repeat: repeat-y; + vertical-align:top; + display: inline-block; +} + +table.directory { + font: 400 14px Roboto,sans-serif; +} + +/* @end */ + +div.dynheader { + margin-top: 8px; + -webkit-touch-callout: none; + -webkit-user-select: none; + -khtml-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; +} + +address { + font-style: normal; + color: #2A3D61; +} + +table.doxtable caption { + caption-side: top; +} + +table.doxtable { + border-collapse:collapse; + margin-top: 4px; + margin-bottom: 4px; +} + +table.doxtable td, table.doxtable th { + border: 1px solid #2D4068; + padding: 3px 7px 2px; +} + +table.doxtable th { + background-color: #374F7F; + color: #FFFFFF; + font-size: 110%; + padding-bottom: 4px; + padding-top: 5px; +} + +table.fieldtable { + /*width: 100%;*/ + margin-bottom: 10px; + border: 1px solid #A8B8D9; + border-spacing: 0px; + -moz-border-radius: 4px; + -webkit-border-radius: 4px; + border-radius: 4px; + -moz-box-shadow: rgba(0, 0, 0, 0.15) 2px 2px 2px; + -webkit-box-shadow: 2px 2px 2px rgba(0, 0, 0, 0.15); + box-shadow: 2px 2px 2px rgba(0, 0, 0, 0.15); +} + +.fieldtable td, .fieldtable th { + padding: 3px 7px 2px; +} + +.fieldtable td.fieldtype, .fieldtable td.fieldname { + white-space: nowrap; + border-right: 1px solid #A8B8D9; + border-bottom: 1px solid #A8B8D9; + vertical-align: top; +} + +.fieldtable td.fieldname { + padding-top: 3px; +} + +.fieldtable td.fielddoc { + border-bottom: 1px solid #A8B8D9; + /*width: 100%;*/ +} + +.fieldtable td.fielddoc p:first-child { + margin-top: 0px; +} + +.fieldtable td.fielddoc p:last-child { + margin-bottom: 2px; +} + +.fieldtable tr:last-child td { + border-bottom: none; +} + +.fieldtable th { + background-image:url('nav_f.png'); + background-repeat:repeat-x; + background-color: #E2E8F2; + font-size: 90%; + color: #253555; + padding-bottom: 4px; + padding-top: 5px; + text-align:left; + font-weight: 400; + -moz-border-radius-topleft: 4px; + -moz-border-radius-topright: 4px; + -webkit-border-top-left-radius: 4px; + -webkit-border-top-right-radius: 4px; + border-top-left-radius: 4px; + border-top-right-radius: 4px; + border-bottom: 1px solid #A8B8D9; +} + + +.tabsearch { + top: 0px; + left: 10px; + height: 36px; + background-image: url('tab_b.png'); + z-index: 101; + overflow: hidden; + font-size: 13px; +} + +.navpath ul +{ + font-size: 11px; + background-image:url('tab_b.png'); + background-repeat:repeat-x; + background-position: 0 -5px; + height:30px; + line-height:30px; + color:#8AA0CC; + border:solid 1px #C2CDE4; + overflow:hidden; + margin:0px; + padding:0px; +} + +.navpath li +{ + list-style-type:none; + float:left; + padding-left:10px; + padding-right:15px; + background-image:url('bc_s.png'); + background-repeat:no-repeat; + background-position:right; + color:#364D7C; +} + +.navpath li.navelem a +{ + height:32px; + display:block; + text-decoration: none; + outline: none; + color: #283A5D; + font-family: 'Lucida Grande',Geneva,Helvetica,Arial,sans-serif; + text-shadow: 0px 1px 1px rgba(255, 255, 255, 0.9); + text-decoration: none; +} + +.navpath li.navelem a:hover +{ + color:#6884BD; +} + +.navpath li.footer +{ + list-style-type:none; + float:right; + padding-left:10px; + padding-right:15px; + background-image:none; + background-repeat:no-repeat; + background-position:right; + color:#364D7C; + font-size: 8pt; +} + + +div.summary +{ + float: right; + font-size: 8pt; + padding-right: 5px; + width: 50%; + text-align: right; +} + +div.summary a +{ + white-space: nowrap; +} + +table.classindex +{ + margin: 10px; + white-space: nowrap; + margin-left: 3%; + margin-right: 3%; + width: 94%; + border: 0; + border-spacing: 0; + padding: 0; +} + +div.ingroups +{ + font-size: 8pt; + width: 50%; + text-align: left; +} + +div.ingroups a +{ + white-space: nowrap; +} + +div.header +{ + background-image:url('nav_h.png'); + background-repeat:repeat-x; + background-color: #F9FAFC; + margin: 0px; + border-bottom: 1px solid #C4CFE5; +} + +div.headertitle +{ + padding: 5px 5px 5px 10px; +} + +dl +{ + padding: 0 0 0 10px; +} + +/* dl.note, dl.warning, dl.attention, dl.pre, dl.post, dl.invariant, dl.deprecated, dl.todo, dl.test, dl.bug */ +dl.section +{ + margin-left: 0px; + padding-left: 0px; +} + +dl.note +{ + margin-left:-7px; + padding-left: 3px; + border-left:4px solid; + border-color: #D0C000; +} + +dl.warning, dl.attention +{ + margin-left:-7px; + padding-left: 3px; + border-left:4px solid; + border-color: #FF0000; +} + +dl.pre, dl.post, dl.invariant +{ + margin-left:-7px; + padding-left: 3px; + border-left:4px solid; + border-color: #00D000; +} + +dl.deprecated +{ + margin-left:-7px; + padding-left: 3px; + border-left:4px solid; + border-color: #505050; +} + +dl.todo +{ + margin-left:-7px; + padding-left: 3px; + border-left:4px solid; + border-color: #00C0E0; +} + +dl.test +{ + margin-left:-7px; + padding-left: 3px; + border-left:4px solid; + border-color: #3030E0; +} + +dl.bug +{ + margin-left:-7px; + padding-left: 3px; + border-left:4px solid; + border-color: #C08050; +} + +dl.section dd { + margin-bottom: 6px; +} + + +#projectlogo +{ + text-align: center; + vertical-align: bottom; + border-collapse: separate; +} + +#projectlogo img +{ + border: 0px none; +} + +#projectalign +{ + vertical-align: middle; +} + +#projectname +{ + font: 300% Tahoma, Arial,sans-serif; + margin: 0px; + padding: 2px 0px; +} + +#projectbrief +{ + font: 120% Tahoma, Arial,sans-serif; + margin: 0px; + padding: 0px; +} + +#projectnumber +{ + font: 50% Tahoma, Arial,sans-serif; + margin: 0px; + padding: 0px; +} + +#titlearea +{ + padding: 0px; + margin: 0px; + width: 100%; + border-bottom: 1px solid #5373B4; +} + +.image +{ + text-align: center; +} + +.dotgraph +{ + text-align: center; +} + +.mscgraph +{ + text-align: center; +} + +.plantumlgraph +{ + text-align: center; +} + +.diagraph +{ + text-align: center; +} + +.caption +{ + font-weight: bold; +} + +div.zoom +{ + border: 1px solid #90A5CE; +} + +dl.citelist { + margin-bottom:50px; +} + +dl.citelist dt { + color:#334975; + float:left; + font-weight:bold; + margin-right:10px; + padding:5px; +} + +dl.citelist dd { + margin:2px 0; + padding:5px 0; +} + +div.toc { + padding: 14px 25px; + background-color: #F4F6FA; + border: 1px solid #D8DFEE; + border-radius: 7px 7px 7px 7px; + float: right; + height: auto; + margin: 0 8px 10px 10px; + width: 200px; +} + +div.toc li { + background: url("bdwn.png") no-repeat scroll 0 5px transparent; + font: 10px/1.2 Verdana,DejaVu Sans,Geneva,sans-serif; + margin-top: 5px; + padding-left: 10px; + padding-top: 2px; +} + +div.toc h3 { + font: bold 12px/1.2 Arial,FreeSans,sans-serif; + color: #4665A2; + border-bottom: 0 none; + margin: 0; +} + +div.toc ul { + list-style: none outside none; + border: medium none; + padding: 0px; +} + +div.toc li.level1 { + margin-left: 0px; +} + +div.toc li.level2 { + margin-left: 15px; +} + +div.toc li.level3 { + margin-left: 30px; +} + +div.toc li.level4 { + margin-left: 45px; +} + +.inherit_header { + font-weight: bold; + color: gray; + cursor: pointer; + -webkit-touch-callout: none; + -webkit-user-select: none; + -khtml-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; +} + +.inherit_header td { + padding: 6px 0px 2px 5px; +} + +.inherit { + display: none; +} + +tr.heading h2 { + margin-top: 12px; + margin-bottom: 4px; +} + +/* tooltip related style info */ + +.ttc { + position: absolute; + display: none; +} + +#powerTip { + cursor: default; + white-space: nowrap; + background-color: white; + border: 1px solid gray; + border-radius: 4px 4px 4px 4px; + box-shadow: 1px 1px 7px gray; + display: none; + font-size: smaller; + max-width: 80%; + opacity: 0.9; + padding: 1ex 1em 1em; + position: absolute; + z-index: 2147483647; +} + +#powerTip div.ttdoc { + color: grey; + font-style: italic; +} + +#powerTip div.ttname a { + font-weight: bold; +} + +#powerTip div.ttname { + font-weight: bold; +} + +#powerTip div.ttdeci { + color: #006318; +} + +#powerTip div { + margin: 0px; + padding: 0px; + font: 12px/16px Roboto,sans-serif; +} + +#powerTip:before, #powerTip:after { + content: ""; + position: absolute; + margin: 0px; +} + +#powerTip.n:after, #powerTip.n:before, +#powerTip.s:after, #powerTip.s:before, +#powerTip.w:after, #powerTip.w:before, +#powerTip.e:after, #powerTip.e:before, +#powerTip.ne:after, #powerTip.ne:before, +#powerTip.se:after, #powerTip.se:before, +#powerTip.nw:after, #powerTip.nw:before, +#powerTip.sw:after, #powerTip.sw:before { + border: solid transparent; + content: " "; + height: 0; + width: 0; + position: absolute; +} + +#powerTip.n:after, #powerTip.s:after, +#powerTip.w:after, #powerTip.e:after, +#powerTip.nw:after, #powerTip.ne:after, +#powerTip.sw:after, #powerTip.se:after { + border-color: rgba(255, 255, 255, 0); +} + +#powerTip.n:before, #powerTip.s:before, +#powerTip.w:before, #powerTip.e:before, +#powerTip.nw:before, #powerTip.ne:before, +#powerTip.sw:before, #powerTip.se:before { + border-color: rgba(128, 128, 128, 0); +} + +#powerTip.n:after, #powerTip.n:before, +#powerTip.ne:after, #powerTip.ne:before, +#powerTip.nw:after, #powerTip.nw:before { + top: 100%; +} + +#powerTip.n:after, #powerTip.ne:after, #powerTip.nw:after { + border-top-color: #ffffff; + border-width: 10px; + margin: 0px -10px; +} +#powerTip.n:before { + border-top-color: #808080; + border-width: 11px; + margin: 0px -11px; +} +#powerTip.n:after, #powerTip.n:before { + left: 50%; +} + +#powerTip.nw:after, #powerTip.nw:before { + right: 14px; +} + +#powerTip.ne:after, #powerTip.ne:before { + left: 14px; +} + +#powerTip.s:after, #powerTip.s:before, +#powerTip.se:after, #powerTip.se:before, +#powerTip.sw:after, #powerTip.sw:before { + bottom: 100%; +} + +#powerTip.s:after, #powerTip.se:after, #powerTip.sw:after { + border-bottom-color: #ffffff; + border-width: 10px; + margin: 0px -10px; +} + +#powerTip.s:before, #powerTip.se:before, #powerTip.sw:before { + border-bottom-color: #808080; + border-width: 11px; + margin: 0px -11px; +} + +#powerTip.s:after, #powerTip.s:before { + left: 50%; +} + +#powerTip.sw:after, #powerTip.sw:before { + right: 14px; +} + +#powerTip.se:after, #powerTip.se:before { + left: 14px; +} + +#powerTip.e:after, #powerTip.e:before { + left: 100%; +} +#powerTip.e:after { + border-left-color: #ffffff; + border-width: 10px; + top: 50%; + margin-top: -10px; +} +#powerTip.e:before { + border-left-color: #808080; + border-width: 11px; + top: 50%; + margin-top: -11px; +} + +#powerTip.w:after, #powerTip.w:before { + right: 100%; +} +#powerTip.w:after { + border-right-color: #ffffff; + border-width: 10px; + top: 50%; + margin-top: -10px; +} +#powerTip.w:before { + border-right-color: #808080; + border-width: 11px; + top: 50%; + margin-top: -11px; +} + +@media print +{ + #top { display: none; } + #side-nav { display: none; } + #nav-path { display: none; } + body { overflow:visible; } + h1, h2, h3, h4, h5, h6 { page-break-after: avoid; } + .summary { display: none; } + .memitem { page-break-inside: avoid; } + #doc-content + { + margin-left:0 !important; + height:auto !important; + width:auto !important; + overflow:inherit; + display:inline; + } +} + +/* @group Markdown */ + +/* +table.markdownTable { + border-collapse:collapse; + margin-top: 4px; + margin-bottom: 4px; +} + +table.markdownTable td, table.markdownTable th { + border: 1px solid #2D4068; + padding: 3px 7px 2px; +} + +table.markdownTableHead tr { +} + +table.markdownTableBodyLeft td, table.markdownTable th { + border: 1px solid #2D4068; + padding: 3px 7px 2px; +} + +th.markdownTableHeadLeft th.markdownTableHeadRight th.markdownTableHeadCenter th.markdownTableHeadNone { + background-color: #374F7F; + color: #FFFFFF; + font-size: 110%; + padding-bottom: 4px; + padding-top: 5px; +} + +th.markdownTableHeadLeft { + text-align: left +} + +th.markdownTableHeadRight { + text-align: right +} + +th.markdownTableHeadCenter { + text-align: center +} +*/ + +table.markdownTable { + border-collapse:collapse; + margin-top: 4px; + margin-bottom: 4px; +} + +table.markdownTable td, table.markdownTable th { + border: 1px solid #2D4068; + padding: 3px 7px 2px; +} + +table.markdownTable tr { +} + +th.markdownTableHeadLeft, th.markdownTableHeadRight, th.markdownTableHeadCenter, th.markdownTableHeadNone { + background-color: #374F7F; + color: #FFFFFF; + font-size: 110%; + padding-bottom: 4px; + padding-top: 5px; +} + +th.markdownTableHeadLeft, td.markdownTableBodyLeft { + text-align: left +} + +th.markdownTableHeadRight, td.markdownTableBodyRight { + text-align: right +} + +th.markdownTableHeadCenter, td.markdownTableBodyCenter { + text-align: center +} + + +/* @end */ diff --git a/dox/doxyfile_ru b/dox/doxyfile_ru index 03a421b..4c5dce5 100755 --- a/dox/doxyfile_ru +++ b/dox/doxyfile_ru @@ -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. diff --git a/dox/footer.html b/dox/footer.html new file mode 100644 index 0000000..998c9ce --- /dev/null +++ b/dox/footer.html @@ -0,0 +1,46 @@ + + + + + + + + + + + + + + + + + + + + + diff --git a/dox/header.html b/dox/header.html new file mode 100644 index 0000000..a3ea01f --- /dev/null +++ b/dox/header.html @@ -0,0 +1,134 @@ + + + + + + + + +$projectname: $title +$title + + + +$treeview +$search +$mathjax + +$extrastylesheet + + + + + + + + + + + + + + + + + +
+
+ +
+
+ + + +
+
+ + +
+ +
+ + + + + + +
+ +
+ + + +
+ + +
+ + + + + + + + + + + + + + + + + + + + + +
+
$projectname +  $projectnumber +
+
$projectbrief
+
+
$projectbrief
+
$searchbox
+
+ + diff --git a/dspl/src/fft.c b/dspl/src/fft.c index 8da7f39..f9a5a63 100755 --- a/dspl/src/fft.c +++ b/dspl/src/fft.c @@ -3,7 +3,7 @@ * Digital Signal Processing Library [http://dsplib.org] * * This file is part of libdspl-2.0. -* +* * is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or @@ -26,7 +26,7 @@ int fft_bit_reverse(complex_t* x, complex_t* y, int n, int p2); int fft_dit(fft_t *pfft, int n, complex_t* y); -void fft_dit_krn( complex_t *x0, complex_t *x1, complex_t *w, int n, +void fft_dit_krn( complex_t *x0, complex_t *x1, complex_t *w, int n, complex_t *y0, complex_t *y1); int fft_p2(int n); @@ -42,33 +42,33 @@ int DSPL_API ifft_cmplx(complex_t *x, int n, fft_t* pfft, complex_t* y) { int err, k; double norm; - + if(!x || !pfft || !y) return ERROR_PTR; if(n<1) return ERROR_SIZE; - - + + err = fft_create(pfft, n); if(err != RES_OK) return err; - + memcpy(pfft->t1, x, n*sizeof(complex_t)); for(k = 0; k < n; k++) IM(pfft->t1[k]) = -IM(pfft->t1[k]); - + err = fft_dit(pfft, n, y); - + if(err!=RES_OK) return err; - + norm = 1.0 / (double)n; for(k = 0; k < n; k++) { RE(y[k]) = RE(y[k])*norm; IM(y[k]) = -IM(y[k])*norm; } - return RES_OK; + return RES_OK; } @@ -83,19 +83,19 @@ Real vector FFT int DSPL_API fft(double *x, int n, fft_t* pfft, complex_t* y) { int err; - + if(!x || !pfft || !y) return ERROR_PTR; if(n<1) return ERROR_SIZE; - - + + err = fft_create(pfft, n); if(err != RES_OK) return err; - + re2cmplx(x, n, pfft->t1); - + return fft_dit(pfft, n, y); } @@ -118,7 +118,7 @@ int DSPL_API fft_cmplx(complex_t *x, int n, fft_t* pfft, complex_t* y) err = fft_create(pfft, n); if(err != RES_OK) return err; - + memcpy(pfft->t1, x, n*sizeof(complex_t)); return fft_dit(pfft, n, y); @@ -131,39 +131,39 @@ FFT bit reverse *******************************************************************************/ int fft_bit_reverse(complex_t* x, complex_t* y, int n, int p2) { - static unsigned char rb_table[256] = + static unsigned char rb_table[256] = { - 0x00, 0x80, 0x40, 0xC0, 0x20, 0xA0, 0x60, 0xE0, - 0x10, 0x90, 0x50, 0xD0, 0x30, 0xB0, 0x70, 0xF0, + 0x00, 0x80, 0x40, 0xC0, 0x20, 0xA0, 0x60, 0xE0, + 0x10, 0x90, 0x50, 0xD0, 0x30, 0xB0, 0x70, 0xF0, 0x08, 0x88, 0x48, 0xC8, 0x28, 0xA8, 0x68, 0xE8, - 0x18, 0x98, 0x58, 0xD8, 0x38, 0xB8, 0x78, 0xF8, - 0x04, 0x84, 0x44, 0xC4, 0x24, 0xA4, 0x64, 0xE4, - 0x14, 0x94, 0x54, 0xD4, 0x34, 0xB4, 0x74, 0xF4, - 0x0C, 0x8C, 0x4C, 0xCC, 0x2C, 0xAC, 0x6C, 0xEC, - 0x1C, 0x9C, 0x5C, 0xDC, 0x3C, 0xBC, 0x7C, 0xFC, - 0x02, 0x82, 0x42, 0xC2, 0x22, 0xA2, 0x62, 0xE2, - 0x12, 0x92, 0x52, 0xD2, 0x32, 0xB2, 0x72, 0xF2, - 0x0A, 0x8A, 0x4A, 0xCA, 0x2A, 0xAA, 0x6A, 0xEA, + 0x18, 0x98, 0x58, 0xD8, 0x38, 0xB8, 0x78, 0xF8, + 0x04, 0x84, 0x44, 0xC4, 0x24, 0xA4, 0x64, 0xE4, + 0x14, 0x94, 0x54, 0xD4, 0x34, 0xB4, 0x74, 0xF4, + 0x0C, 0x8C, 0x4C, 0xCC, 0x2C, 0xAC, 0x6C, 0xEC, + 0x1C, 0x9C, 0x5C, 0xDC, 0x3C, 0xBC, 0x7C, 0xFC, + 0x02, 0x82, 0x42, 0xC2, 0x22, 0xA2, 0x62, 0xE2, + 0x12, 0x92, 0x52, 0xD2, 0x32, 0xB2, 0x72, 0xF2, + 0x0A, 0x8A, 0x4A, 0xCA, 0x2A, 0xAA, 0x6A, 0xEA, 0x1A, 0x9A, 0x5A, 0xDA, 0x3A, 0xBA, 0x7A, 0xFA, - 0x06, 0x86, 0x46, 0xC6, 0x26, 0xA6, 0x66, 0xE6, - 0x16, 0x96, 0x56, 0xD6, 0x36, 0xB6, 0x76, 0xF6, - 0x0E, 0x8E, 0x4E, 0xCE, 0x2E, 0xAE, 0x6E, 0xEE, + 0x06, 0x86, 0x46, 0xC6, 0x26, 0xA6, 0x66, 0xE6, + 0x16, 0x96, 0x56, 0xD6, 0x36, 0xB6, 0x76, 0xF6, + 0x0E, 0x8E, 0x4E, 0xCE, 0x2E, 0xAE, 0x6E, 0xEE, 0x1E, 0x9E, 0x5E, 0xDE, 0x3E, 0xBE, 0x7E, 0xFE, - 0x01, 0x81, 0x41, 0xC1, 0x21, 0xA1, 0x61, 0xE1, + 0x01, 0x81, 0x41, 0xC1, 0x21, 0xA1, 0x61, 0xE1, 0x11, 0x91, 0x51, 0xD1, 0x31, 0xB1, 0x71, 0xF1, - 0x09, 0x89, 0x49, 0xC9, 0x29, 0xA9, 0x69, 0xE9, - 0x19, 0x99, 0x59, 0xD9, 0x39, 0xB9, 0x79, 0xF9, + 0x09, 0x89, 0x49, 0xC9, 0x29, 0xA9, 0x69, 0xE9, + 0x19, 0x99, 0x59, 0xD9, 0x39, 0xB9, 0x79, 0xF9, 0x05, 0x85, 0x45, 0xC5, 0x25, 0xA5, 0x65, 0xE5, 0x15, 0x95, 0x55, 0xD5, 0x35, 0xB5, 0x75, 0xF5, - 0x0D, 0x8D, 0x4D, 0xCD, 0x2D, 0xAD, 0x6D, 0xED, + 0x0D, 0x8D, 0x4D, 0xCD, 0x2D, 0xAD, 0x6D, 0xED, 0x1D, 0x9D, 0x5D, 0xDD, 0x3D, 0xBD, 0x7D, 0xFD, - 0x03, 0x83, 0x43, 0xC3, 0x23, 0xA3, 0x63, 0xE3, - 0x13, 0x93, 0x53, 0xD3, 0x33, 0xB3, 0x73, 0xF3, - 0x0B, 0x8B, 0x4B, 0xCB, 0x2B, 0xAB, 0x6B, 0xEB, + 0x03, 0x83, 0x43, 0xC3, 0x23, 0xA3, 0x63, 0xE3, + 0x13, 0x93, 0x53, 0xD3, 0x33, 0xB3, 0x73, 0xF3, + 0x0B, 0x8B, 0x4B, 0xCB, 0x2B, 0xAB, 0x6B, 0xEB, 0x1B, 0x9B, 0x5B, 0xDB, 0x3B, 0xBB, 0x7B, 0xFB, - 0x07, 0x87, 0x47, 0xC7, 0x27, 0xA7, 0x67, 0xE7, - 0x17, 0x97, 0x57, 0xD7, 0x37, 0xB7, 0x77, 0xF7, - 0x0F, 0x8F, 0x4F, 0xCF, 0x2F, 0xAF, 0x6F, 0xEF, + 0x07, 0x87, 0x47, 0xC7, 0x27, 0xA7, 0x67, 0xE7, + 0x17, 0x97, 0x57, 0xD7, 0x37, 0xB7, 0x77, 0xF7, + 0x0F, 0x8F, 0x4F, 0xCF, 0x2F, 0xAF, 0x6F, 0xEF, 0x1F, 0x9F, 0x5F, 0xDF, 0x3F, 0xBF, 0x7F, 0xFF }; @@ -171,20 +171,20 @@ int fft_bit_reverse(complex_t* x, complex_t* y, int n, int p2) return ERROR_PTR; if(n<1 || p2 < 1) return ERROR_SIZE; - + unsigned int v, c; - + for(v = 0; v < n; v++) { c = (unsigned int) ((rb_table[ v & 0xff] << 24) | - (rb_table[(v >> 8) & 0xff] << 16) | - (rb_table[(v >> 16) & 0xff] << 8) | + (rb_table[(v >> 8) & 0xff] << 16) | + (rb_table[(v >> 16) & 0xff] << 8) | (rb_table[(v >> 24) & 0xff])) >> (32 - p2); - + RE(y[c]) = RE(x[v]); IM(y[c]) = IM(x[v]); - } + } return RES_OK; } @@ -260,11 +260,11 @@ int fft_dit(fft_t *pfft, int n, complex_t* y) s = n>>1; m = 1; waddr = 0; - + err = fft_bit_reverse(t1, t0, n, p2); if(err!= RES_OK) return err; - + while(s) { dm = m<<1; @@ -284,9 +284,9 @@ int fft_dit(fft_t *pfft, int n, complex_t* y) { fft_dit_krn(t0, t0+m, w+waddr, m, y, y+m); } - s >>= 1; + s >>= 1; } - + return RES_OK; } @@ -298,7 +298,7 @@ int fft_dit(fft_t *pfft, int n, complex_t* y) /******************************************************************************* FFT decimation in time kernel *******************************************************************************/ -void fft_dit_krn(complex_t *x0, complex_t *x1, complex_t *w, int n, +void fft_dit_krn(complex_t *x0, complex_t *x1, complex_t *w, int n, complex_t *y0, complex_t *y1) { int k; @@ -310,11 +310,11 @@ void fft_dit_krn(complex_t *x0, complex_t *x1, complex_t *w, int n, RE(y0[k]) = RE(x0[k]) + RE(mul); IM(y0[k]) = IM(x0[k]) + IM(mul); - + RE(y1[k]) = RE(x0[k]) - RE(mul); IM(y1[k]) = IM(x0[k]) - IM(mul); - } - + } + } @@ -369,13 +369,13 @@ int DSPL_API fft_shift(double* x, int n, double* y) int k; double tmp; double *buf; - + if(!x || !y) return ERROR_PTR; if(n<1) return ERROR_SIZE; - + r = n%2; if(!r) { @@ -385,7 +385,7 @@ int DSPL_API fft_shift(double* x, int n, double* y) tmp = x[k]; y[k] = x[k+n2]; y[k+n2] = tmp; - } + } } else { @@ -395,28 +395,28 @@ int DSPL_API fft_shift(double* x, int n, double* y) memcpy(y, x+n2, (n2+1)*sizeof(double)); memcpy(y+n2+1, buf, n2*sizeof(double)); free(buf); - } + } return RES_OK; } -/************************************************************************************************** +/******************************************************************************* FFT shifting for complex vector -***************************************************************************************************/ +*******************************************************************************/ int DSPL_API fft_shift_cmplx(complex_t* x, int n, complex_t* y) { int n2, r; int k; complex_t tmp; complex_t *buf; - + if(!x || !y) return ERROR_PTR; if(n<1) return ERROR_SIZE; - + r = n%2; if(!r) { @@ -425,13 +425,13 @@ int DSPL_API fft_shift_cmplx(complex_t* x, int n, complex_t* y) { RE(tmp) = RE(x[k]); IM(tmp) = IM(x[k]); - + RE(y[k]) = RE(x[k+n2]); IM(y[k]) = IM(x[k+n2]); - + RE(y[k+n2]) = RE(tmp); IM(y[k+n2]) = IM(tmp); - } + } } else { @@ -441,14 +441,7 @@ int DSPL_API fft_shift_cmplx(complex_t* x, int n, complex_t* y) memcpy(y, x+n2, (n2+1)*sizeof(complex_t)); memcpy(y+n2+1, buf, n2*sizeof(complex_t)); free(buf); - } + } return RES_OK; } - - - - - - - diff --git a/dspl/src/fillarray.c b/dspl/src/fillarray.c index 70d7195..0fa6baf 100755 --- a/dspl/src/fillarray.c +++ b/dspl/src/fillarray.c @@ -3,7 +3,7 @@ * Digital Signal Processing Library [http://dsplib.org] * * This file is part of libdspl-2.0. -* +* * is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or @@ -25,18 +25,18 @@ -/************************************************************************************************** +/******************************************************************************* Linspace array filling -***************************************************************************************************/ +*******************************************************************************/ int DSPL_API linspace(double x0, double x1, int n, int type, double* x) { double dx; int k; - + if(n < 2) return ERROR_SIZE; if(!x) - return ERROR_PTR; + return ERROR_PTR; switch (type) { @@ -54,22 +54,22 @@ int DSPL_API linspace(double x0, double x1, int n, int type, double* x) break; default: return ERROR_SYM_TYPE; - } - return RES_OK; + } + return RES_OK; } -/************************************************************************************************** +/******************************************************************************* Logspace array filling -***************************************************************************************************/ +*******************************************************************************/ int DSPL_API logspace(double x0, double x1, int n, int type, double* x) { double mx, a, b; int k; - + if(n < 2) return ERROR_SIZE; if(!x) @@ -77,7 +77,7 @@ int DSPL_API logspace(double x0, double x1, int n, int type, double* x) a = pow(10.0, x0); b = pow(10.0, x1); - + switch (type) { case DSPL_SYMMETRIC: @@ -94,12 +94,7 @@ int DSPL_API logspace(double x0, double x1, int n, int type, double* x) break; default: return ERROR_SYM_TYPE; - } - return RES_OK; + } + return RES_OK; } - - - - - diff --git a/dspl/src/fourier_series.c b/dspl/src/fourier_series.c index 9c9b87f..bc77207 100755 --- a/dspl/src/fourier_series.c +++ b/dspl/src/fourier_series.c @@ -3,7 +3,7 @@ * Digital Signal Processing Library [http://dsplib.org] * * This file is part of libdspl-2.0. -* +* * is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or @@ -19,8 +19,8 @@ */ -#include -#include +#include +#include #include #include "dspl.h" @@ -29,9 +29,9 @@ int DSPL_API fourier_series_dec(double* t, double* s, int nt, double period, int nw, double* w, complex_t* y) { int k, m; - double dw = M_2PI / period; + double dw = M_2PI / period; complex_t e[2]; - + if(!t || !s || !w || !y) return ERROR_PTR; if(nt<1 || nw < 1) @@ -43,22 +43,22 @@ int DSPL_API fourier_series_dec(double* t, double* s, int nt, double period, int for(k = 0; k < nw; k++) { - w[k] = (k - nw/2) * dw; + w[k] = (k - nw/2) * dw; RE(e[1]) = s[0] * cos(w[k] * t[0]); - IM(e[1]) = -s[0] * sin(w[k] * t[0]); + IM(e[1]) = -s[0] * sin(w[k] * t[0]); for(m = 1; m < nt; m++) { RE(e[0]) = RE(e[1]); - IM(e[0]) = IM(e[1]); + IM(e[0]) = IM(e[1]); RE(e[1]) = s[m] * cos(w[k] * t[m]); IM(e[1]) = - s[m] * sin(w[k] * t[m]); RE(y[k]) += 0.5 * (RE(e[0]) + RE(e[1])) * (t[m] - t[m-1]); IM(y[k]) += 0.5 * (IM(e[0]) + IM(e[1])) * (t[m] - t[m-1]); - } + } RE(y[k]) /= period; IM(y[k]) /= period; - } - + } + if(!(nw%2)) RE(y[0]) = RE(y[1]) = 0.0; @@ -72,29 +72,29 @@ int DSPL_API fourier_series_dec(double* t, double* s, int nt, double period, int int DSPL_API fourier_series_rec(double* w, complex_t* s, int nw, double *t, int nt, complex_t* y) { - int k, m; - complex_t e; - + int k, m; + complex_t e; + if(!t || !s || !w || !y) return ERROR_PTR; if(nt<1 || nw < 1) return ERROR_SIZE; memset(y, 0, nt*sizeof(complex_t)); - - + + 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); - } + } } - return RES_OK; + return RES_OK; } diff --git a/dspl/src/math.c b/dspl/src/math.c index e814b02..ef1e13d 100755 --- a/dspl/src/math.c +++ b/dspl/src/math.c @@ -3,7 +3,7 @@ * Digital Signal Processing Library [http://dsplib.org] * * This file is part of DSPL. -* +* * is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or @@ -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; + + +} + diff --git a/dspl/src/signals.c b/dspl/src/signals.c index e3e352d..5da7094 100755 --- a/dspl/src/signals.c +++ b/dspl/src/signals.c @@ -3,7 +3,7 @@ * Digital Signal Processing Library [http://dsplib.org] * * This file is part of libdspl-2.0. -* +* * is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or @@ -20,8 +20,8 @@ -#include -#include +#include +#include #include #include "dspl.h" @@ -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; - - if(!t || !y) - return ERROR_PTR; - if(n < 1) - return ERROR_SIZE; - if(tau < 0.0 || period < 0.0) - return ERROR_NEGATIVE; - + int k; + double ll, lr, p2, tp; - 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; - } + if(!t || !y) + return ERROR_PTR; + if(n < 1) + return ERROR_SIZE; + if(tau < 0.0 || period < 0.0) + return ERROR_NEGATIVE; - 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; +} + diff --git a/include/dspl.c b/include/dspl.c index 81e0328..ae002ef 100755 --- a/include/dspl.c +++ b/include/dspl.c @@ -3,7 +3,7 @@ * Digital Signal Processing Library [http://dsplib.org] * * This file is part of libdspl-2.0. -* +* * is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or @@ -73,11 +73,11 @@ p_dspl_info dspl_info ; p_farrow_lagrange farrow_lagrange ; p_farrow_spline farrow_spline ; p_filter_iir filter_iir ; -p_filter_zp2ab filter_zp2ab ; +p_filter_zp2ab filter_zp2ab ; p_fft fft ; -p_fft_cmplx fft_cmplx ; -p_fft_create fft_create ; -p_fft_free fft_free ; +p_fft_cmplx fft_cmplx ; +p_fft_create fft_create ; +p_fft_free fft_free ; p_fft_shift fft_shift ; p_fft_shift_cmplx fft_shift_cmplx ; p_flipip flipip ; @@ -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 ; @@ -143,14 +145,14 @@ void* dspl_load() { char* fname; #ifdef WIN_OS - HINSTANCE handle; + HINSTANCE handle; handle = LoadLibrary(TEXT("libdspl.dll")); if (!handle) { printf("libdspl.dll loading ERROR!\n"); return NULL; } - #endif //WIN_OS + #endif //WIN_OS #ifdef LINUX_OS @@ -158,7 +160,7 @@ void* dspl_load() void *handle; // open the *.so handle = dlopen ("./libdspl.so", RTLD_LAZY); - if (!handle) + if (!handle) { printf("libdspl.so loading ERROR!\n"); return NULL; @@ -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); @@ -244,26 +248,26 @@ void* dspl_load() LOAD_FUNC(writetxt); LOAD_FUNC(writetxt_3d); LOAD_FUNC(writetxt_3dline); - - + + #ifdef WIN_OS return (void*)handle; exit_label: printf("function %s loading ERROR!\n", fname); if(handle) FreeLibrary(handle); - return NULL; + return NULL; #endif //WIN_OS #ifdef LINUX_OS - return handle; + return handle; exit_label: printf("function %s loading ERROR!\n", fname); if(handle) dlclose(handle); - return NULL; - #endif //LINUX_OS + return NULL; + #endif //LINUX_OS } @@ -277,13 +281,10 @@ void dspl_free(void* handle) #ifdef WIN_OS FreeLibrary((HINSTANCE)handle); #endif //WIN_OS - + #ifdef LINUX_OS dlclose(handle); - #endif //LINUX_OS - + #endif //LINUX_OS + } - - - diff --git a/include/dspl.h b/include/dspl.h index 66e3db1..71e3e21 100755 --- a/include/dspl.h +++ b/include/dspl.h @@ -3,7 +3,7 @@ * Digital Signal Processing Library [http://dsplib.org] * * This file is part of libdspl-2.0. -* +* * is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or @@ -25,7 +25,7 @@ #include - + /* math const definition */ #ifndef M_PI @@ -34,10 +34,10 @@ #ifndef M_2PI #define M_2PI 6.283185307179586476925286766559 #endif - -typedef double complex_t[2]; + +typedef double complex_t[2]; @@ -54,10 +54,10 @@ typedef struct #define RE(x) (x[0]) -#define IM(x) (x[1]) +#define IM(x) (x[1]) -#define SQR(x) ((x) * (x)) +#define SQR(x) ((x) * (x)) #define ABSSQR(x) ((SQR(RE(x))) + (SQR(IM(x)))) #define ABS(x) sqrt((ABSSQR(x))) @@ -65,7 +65,7 @@ typedef struct #define CMIM(a,b) ((RE(a)) * (IM(b)) + (IM(a)) * (RE(b))) #define CMCONJRE(a, b) ((RE(a)) * (RE(b)) + (IM(a)) * (IM(b))) -#define CMCONJIM(a, b) ((IM(a)) * (RE(b)) - (RE(a)) * (IM(b))) +#define CMCONJIM(a, b) ((IM(a)) * (RE(b)) - (RE(a)) * (IM(b))) @@ -198,7 +198,7 @@ extern "C" { #endif - + //------------------------------------------------------------------------------ DECLARE_FUNC(int, acos_cmplx, complex_t* COMMA int @@ -208,9 +208,9 @@ DECLARE_FUNC(int, asin_cmplx, complex_t* COMMA int COMMA complex_t*); //------------------------------------------------------------------------------ -DECLARE_FUNC(int, butter_ap, double +DECLARE_FUNC(int, butter_ap, double COMMA int - COMMA double* + COMMA double* COMMA double*); //------------------------------------------------------------------------------ DECLARE_FUNC(int, butter_ap_zp, int @@ -235,11 +235,11 @@ DECLARE_FUNC(int, cheby1_ap, double COMMA double* COMMA double*); //------------------------------------------------------------------------------ -DECLARE_FUNC(int, cheby1_ap_zp, int - COMMA double - COMMA complex_t* - COMMA int* - COMMA complex_t* +DECLARE_FUNC(int, cheby1_ap_zp, int + COMMA double + COMMA complex_t* + COMMA int* + COMMA complex_t* COMMA int*); //------------------------------------------------------------------------------ DECLARE_FUNC(int, cheby2_ap, double rs @@ -249,54 +249,54 @@ DECLARE_FUNC(int, cheby2_ap, double rs //------------------------------------------------------------------------------ DECLARE_FUNC(int, cheby2_ap_zp, int COMMA double - COMMA complex_t* - COMMA int* - COMMA complex_t* + COMMA complex_t* + COMMA int* + COMMA complex_t* COMMA int*); //------------------------------------------------------------------------------ DECLARE_FUNC(int, cmplx2re, complex_t* COMMA int - COMMA double* + COMMA double* COMMA double*); //------------------------------------------------------------------------------ DECLARE_FUNC(int, concat, void* COMMA size_t - COMMA void* - COMMA size_t + COMMA void* + COMMA size_t COMMA void*); //------------------------------------------------------------------------------ -DECLARE_FUNC(int, conv, double* - COMMA int - COMMA double* - COMMA int +DECLARE_FUNC(int, conv, double* + COMMA int + COMMA double* + COMMA int COMMA double*); //------------------------------------------------------------------------------ -DECLARE_FUNC(int, conv_cmplx, complex_t* - COMMA int - COMMA complex_t* - COMMA int +DECLARE_FUNC(int, conv_cmplx, complex_t* + COMMA int + COMMA complex_t* + COMMA int COMMA complex_t*); //------------------------------------------------------------------------------ DECLARE_FUNC(int, conv_fft_cmplx, complex_t* a COMMA int na COMMA complex_t* b - COMMA int nb + COMMA int nb COMMA fft_t* pfft COMMA complex_t* c); //------------------------------------------------------------------------------ -DECLARE_FUNC(int, cos_cmplx, complex_t* - COMMA int +DECLARE_FUNC(int, cos_cmplx, complex_t* + COMMA int COMMA complex_t*); //------------------------------------------------------------------------------ -DECLARE_FUNC(int, dft, double* - COMMA int +DECLARE_FUNC(int, dft, double* + COMMA int COMMA complex_t*); //------------------------------------------------------------------------------ -DECLARE_FUNC(int, dft_cmplx, complex_t* - COMMA int +DECLARE_FUNC(int, dft_cmplx, complex_t* + COMMA int COMMA complex_t*); //------------------------------------------------------------------------------ -DECLARE_FUNC(double, dmod, double +DECLARE_FUNC(double, dmod, double COMMA double); //------------------------------------------------------------------------------ DECLARE_FUNC(void, dspl_info, void); @@ -319,7 +319,7 @@ DECLARE_FUNC(int, ellip_ap, double rp //------------------------------------------------------------------------------ DECLARE_FUNC(int, ellip_ap_zp, int ord COMMA double rp - COMMA double rs + COMMA double rs COMMA complex_t* z COMMA int* nz COMMA complex_t* p @@ -376,57 +376,57 @@ DECLARE_FUNC(int, idft_cmplx, complex_t* //------------------------------------------------------------------------------ DECLARE_FUNC(int, ifft_cmplx, complex_t* COMMA int - COMMA fft_t* + COMMA fft_t* COMMA complex_t* ); //------------------------------------------------------------------------------ -DECLARE_FUNC(int, farrow_lagrange, double* - COMMA int - COMMA double - COMMA double - COMMA double - COMMA double** +DECLARE_FUNC(int, farrow_lagrange, double* + COMMA int + COMMA double + COMMA double + COMMA double + COMMA double** COMMA int*); //------------------------------------------------------------------------------ -DECLARE_FUNC(int, farrow_spline, double* - COMMA int - COMMA double - COMMA double - COMMA double - COMMA double** +DECLARE_FUNC(int, farrow_spline, double* + COMMA int + COMMA double + COMMA double + COMMA double + COMMA double** COMMA int*); //------------------------------------------------------------------------------ -DECLARE_FUNC(int, filter_iir, double* - COMMA double* - COMMA int - COMMA double* - COMMA int +DECLARE_FUNC(int, filter_iir, double* + COMMA double* + COMMA int + COMMA double* + COMMA int COMMA double*); //------------------------------------------------------------------------------ -DECLARE_FUNC(int, filter_zp2ab, complex_t* - COMMA int - COMMA complex_t* - COMMA int - COMMA int - COMMA double* +DECLARE_FUNC(int, filter_zp2ab, complex_t* + COMMA int + COMMA complex_t* + COMMA int + COMMA int + COMMA double* COMMA double*); //------------------------------------------------------------------------------ DECLARE_FUNC(int, fft, double* - COMMA int - COMMA fft_t* - COMMA complex_t* ); -//------------------------------------------------------------------------------ -DECLARE_FUNC(int, fft_cmplx, complex_t* COMMA int - COMMA fft_t* + COMMA fft_t* COMMA complex_t* ); //------------------------------------------------------------------------------ -DECLARE_FUNC(int, fft_create, fft_t* +DECLARE_FUNC(int, fft_cmplx, complex_t* + COMMA int + COMMA fft_t* + COMMA complex_t* ); +//------------------------------------------------------------------------------ +DECLARE_FUNC(int, fft_create, fft_t* COMMA int); //------------------------------------------------------------------------------ DECLARE_FUNC(void, fft_free, fft_t*); //------------------------------------------------------------------------------ -DECLARE_FUNC(int, fft_shift, double* - COMMA int n +DECLARE_FUNC(int, fft_shift, double* + COMMA int n COMMA double*); //------------------------------------------------------------------------------ DECLARE_FUNC(int, fft_shift_cmplx, complex_t* @@ -439,43 +439,43 @@ DECLARE_FUNC(int, flipip, double* DECLARE_FUNC(int, flipip_cmplx, complex_t* COMMA int); //------------------------------------------------------------------------------ -DECLARE_FUNC(int, fourier_series_dec, double* - COMMA double* - COMMA int - COMMA double - COMMA int - COMMA double* +DECLARE_FUNC(int, fourier_series_dec, double* + COMMA double* + COMMA int + COMMA double + COMMA int + COMMA double* COMMA complex_t*); //------------------------------------------------------------------------------ DECLARE_FUNC(int, fourier_series_rec, double* - COMMA complex_t* - COMMA int - COMMA double* - COMMA int + COMMA complex_t* + COMMA int + COMMA double* + COMMA int COMMA complex_t*); //------------------------------------------------------------------------------ -DECLARE_FUNC(int, freqs, double* - COMMA double* - COMMA int - COMMA double* - COMMA int +DECLARE_FUNC(int, freqs, double* + COMMA double* + COMMA int + COMMA double* + COMMA int COMMA complex_t*); //------------------------------------------------------------------------------ DECLARE_FUNC(int, freqs_cmplx, double* b COMMA double* a - COMMA int ord + COMMA int ord COMMA complex_t* s COMMA int n COMMA complex_t* h); //------------------------------------------------------------------------------ DECLARE_FUNC(int, freqs_resp, double* - COMMA double* - COMMA int - COMMA double* - COMMA int - COMMA int - COMMA double* - COMMA double* + COMMA double* + COMMA int + COMMA double* + COMMA int + COMMA int + COMMA double* + COMMA double* COMMA double*); //------------------------------------------------------------------------------ DECLARE_FUNC(int, freqs2time, double* @@ -487,11 +487,11 @@ DECLARE_FUNC(int, freqs2time, double* COMMA double* COMMA double*); //------------------------------------------------------------------------------ -DECLARE_FUNC(int, freqz, double* - COMMA double* - COMMA int - COMMA double* - COMMA int +DECLARE_FUNC(int, freqz, double* + COMMA double* + COMMA int + COMMA double* + COMMA int COMMA complex_t*); //------------------------------------------------------------------------------ DECLARE_FUNC(int, goertzel, double* @@ -502,14 +502,14 @@ DECLARE_FUNC(int, goertzel, double* //------------------------------------------------------------------------------ DECLARE_FUNC(int, goertzel_cmplx, complex_t* COMMA int - COMMA int* - COMMA int + COMMA int* + COMMA int COMMA complex_t*); //------------------------------------------------------------------------------ DECLARE_FUNC(int, linspace, double COMMA double - COMMA int - COMMA int + COMMA int + COMMA int COMMA double*); //------------------------------------------------------------------------------ DECLARE_FUNC(int, log_cmplx, complex_t* @@ -524,7 +524,7 @@ DECLARE_FUNC(int, logspace, double //------------------------------------------------------------------------------ DECLARE_FUNC(int, low2bp, double* b COMMA double* a - COMMA int ord + COMMA int ord COMMA double w0 COMMA double wpl COMMA double wph @@ -547,41 +547,41 @@ DECLARE_FUNC(int, low2low, double* b COMMA double* beta COMMA double* alpha); //------------------------------------------------------------------------------ -DECLARE_FUNC(int, poly_z2a_cmplx, complex_t* - COMMA int - COMMA int +DECLARE_FUNC(int, poly_z2a_cmplx, complex_t* + COMMA int + COMMA int COMMA complex_t*); //------------------------------------------------------------------------------ DECLARE_FUNC(int, polyval, double* COMMA int COMMA double* - COMMA int + COMMA int COMMA double*); //------------------------------------------------------------------------------ DECLARE_FUNC(int, polyval_cmplx, complex_t* COMMA int COMMA complex_t* - COMMA int + COMMA int COMMA complex_t*); //------------------------------------------------------------------------------ -DECLARE_FUNC(int, randn, double* - COMMA int - COMMA double +DECLARE_FUNC(int, randn, double* + COMMA int + COMMA double COMMA double); //------------------------------------------------------------------------------ -DECLARE_FUNC(int, randu, double* +DECLARE_FUNC(int, randu, double* COMMA int); //------------------------------------------------------------------------------ DECLARE_FUNC(int, ratcompos, double* b COMMA double* a - COMMA int n + COMMA int n COMMA double* c COMMA double* d - COMMA int p + COMMA int p COMMA double* beta COMMA double* alpha); //------------------------------------------------------------------------------ -DECLARE_FUNC(int, re2cmplx, double* +DECLARE_FUNC(int, re2cmplx, double* COMMA int COMMA complex_t*); //------------------------------------------------------------------------------ @@ -593,43 +593,54 @@ DECLARE_FUNC(int, signal_pimp, double* COMMA double COMMA double*); //------------------------------------------------------------------------------ -DECLARE_FUNC(int, sin_cmplx, complex_t* - COMMA int +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, sqrt_cmplx, complex_t* - COMMA int +DECLARE_FUNC(int, sinc, double* x + COMMA int n + COMMA double* y); +//------------------------------------------------------------------------------ +DECLARE_FUNC(int, sqrt_cmplx, complex_t* + COMMA int COMMA complex_t*); //------------------------------------------------------------------------------ -DECLARE_FUNC(int, trapint, double* - COMMA double* - COMMA int +DECLARE_FUNC(int, trapint, double* + COMMA double* + COMMA int COMMA double*); //------------------------------------------------------------------------------ -DECLARE_FUNC(int, trapint_cmplx, double* +DECLARE_FUNC(int, trapint_cmplx, double* COMMA complex_t* - COMMA int + COMMA int COMMA complex_t*); //------------------------------------------------------------------------------ DECLARE_FUNC(int, unwrap, double* COMMA int - COMMA double + COMMA double COMMA double); //------------------------------------------------------------------------------ DECLARE_FUNC(int, writebin, void* - COMMA int - COMMA int + COMMA int + COMMA int COMMA char*); //------------------------------------------------------------------------------ -DECLARE_FUNC(int, writetxt, double* - COMMA double* - COMMA int +DECLARE_FUNC(int, writetxt, double* + COMMA double* + COMMA int COMMA char*); //------------------------------------------------------------------------------ DECLARE_FUNC(int, writetxt_3d, double* x COMMA int nx COMMA double* y - COMMA int ny + COMMA int ny COMMA double* z COMMA char* fn); //------------------------------------------------------------------------------ diff --git a/release/include/dspl.c b/release/include/dspl.c index 81e0328..ae002ef 100755 --- a/release/include/dspl.c +++ b/release/include/dspl.c @@ -3,7 +3,7 @@ * Digital Signal Processing Library [http://dsplib.org] * * This file is part of libdspl-2.0. -* +* * is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or @@ -73,11 +73,11 @@ p_dspl_info dspl_info ; p_farrow_lagrange farrow_lagrange ; p_farrow_spline farrow_spline ; p_filter_iir filter_iir ; -p_filter_zp2ab filter_zp2ab ; +p_filter_zp2ab filter_zp2ab ; p_fft fft ; -p_fft_cmplx fft_cmplx ; -p_fft_create fft_create ; -p_fft_free fft_free ; +p_fft_cmplx fft_cmplx ; +p_fft_create fft_create ; +p_fft_free fft_free ; p_fft_shift fft_shift ; p_fft_shift_cmplx fft_shift_cmplx ; p_flipip flipip ; @@ -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 ; @@ -143,14 +145,14 @@ void* dspl_load() { char* fname; #ifdef WIN_OS - HINSTANCE handle; + HINSTANCE handle; handle = LoadLibrary(TEXT("libdspl.dll")); if (!handle) { printf("libdspl.dll loading ERROR!\n"); return NULL; } - #endif //WIN_OS + #endif //WIN_OS #ifdef LINUX_OS @@ -158,7 +160,7 @@ void* dspl_load() void *handle; // open the *.so handle = dlopen ("./libdspl.so", RTLD_LAZY); - if (!handle) + if (!handle) { printf("libdspl.so loading ERROR!\n"); return NULL; @@ -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); @@ -244,26 +248,26 @@ void* dspl_load() LOAD_FUNC(writetxt); LOAD_FUNC(writetxt_3d); LOAD_FUNC(writetxt_3dline); - - + + #ifdef WIN_OS return (void*)handle; exit_label: printf("function %s loading ERROR!\n", fname); if(handle) FreeLibrary(handle); - return NULL; + return NULL; #endif //WIN_OS #ifdef LINUX_OS - return handle; + return handle; exit_label: printf("function %s loading ERROR!\n", fname); if(handle) dlclose(handle); - return NULL; - #endif //LINUX_OS + return NULL; + #endif //LINUX_OS } @@ -277,13 +281,10 @@ void dspl_free(void* handle) #ifdef WIN_OS FreeLibrary((HINSTANCE)handle); #endif //WIN_OS - + #ifdef LINUX_OS dlclose(handle); - #endif //LINUX_OS - + #endif //LINUX_OS + } - - - diff --git a/release/include/dspl.h b/release/include/dspl.h index 66e3db1..71e3e21 100755 --- a/release/include/dspl.h +++ b/release/include/dspl.h @@ -3,7 +3,7 @@ * Digital Signal Processing Library [http://dsplib.org] * * This file is part of libdspl-2.0. -* +* * is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or @@ -25,7 +25,7 @@ #include - + /* math const definition */ #ifndef M_PI @@ -34,10 +34,10 @@ #ifndef M_2PI #define M_2PI 6.283185307179586476925286766559 #endif - -typedef double complex_t[2]; + +typedef double complex_t[2]; @@ -54,10 +54,10 @@ typedef struct #define RE(x) (x[0]) -#define IM(x) (x[1]) +#define IM(x) (x[1]) -#define SQR(x) ((x) * (x)) +#define SQR(x) ((x) * (x)) #define ABSSQR(x) ((SQR(RE(x))) + (SQR(IM(x)))) #define ABS(x) sqrt((ABSSQR(x))) @@ -65,7 +65,7 @@ typedef struct #define CMIM(a,b) ((RE(a)) * (IM(b)) + (IM(a)) * (RE(b))) #define CMCONJRE(a, b) ((RE(a)) * (RE(b)) + (IM(a)) * (IM(b))) -#define CMCONJIM(a, b) ((IM(a)) * (RE(b)) - (RE(a)) * (IM(b))) +#define CMCONJIM(a, b) ((IM(a)) * (RE(b)) - (RE(a)) * (IM(b))) @@ -198,7 +198,7 @@ extern "C" { #endif - + //------------------------------------------------------------------------------ DECLARE_FUNC(int, acos_cmplx, complex_t* COMMA int @@ -208,9 +208,9 @@ DECLARE_FUNC(int, asin_cmplx, complex_t* COMMA int COMMA complex_t*); //------------------------------------------------------------------------------ -DECLARE_FUNC(int, butter_ap, double +DECLARE_FUNC(int, butter_ap, double COMMA int - COMMA double* + COMMA double* COMMA double*); //------------------------------------------------------------------------------ DECLARE_FUNC(int, butter_ap_zp, int @@ -235,11 +235,11 @@ DECLARE_FUNC(int, cheby1_ap, double COMMA double* COMMA double*); //------------------------------------------------------------------------------ -DECLARE_FUNC(int, cheby1_ap_zp, int - COMMA double - COMMA complex_t* - COMMA int* - COMMA complex_t* +DECLARE_FUNC(int, cheby1_ap_zp, int + COMMA double + COMMA complex_t* + COMMA int* + COMMA complex_t* COMMA int*); //------------------------------------------------------------------------------ DECLARE_FUNC(int, cheby2_ap, double rs @@ -249,54 +249,54 @@ DECLARE_FUNC(int, cheby2_ap, double rs //------------------------------------------------------------------------------ DECLARE_FUNC(int, cheby2_ap_zp, int COMMA double - COMMA complex_t* - COMMA int* - COMMA complex_t* + COMMA complex_t* + COMMA int* + COMMA complex_t* COMMA int*); //------------------------------------------------------------------------------ DECLARE_FUNC(int, cmplx2re, complex_t* COMMA int - COMMA double* + COMMA double* COMMA double*); //------------------------------------------------------------------------------ DECLARE_FUNC(int, concat, void* COMMA size_t - COMMA void* - COMMA size_t + COMMA void* + COMMA size_t COMMA void*); //------------------------------------------------------------------------------ -DECLARE_FUNC(int, conv, double* - COMMA int - COMMA double* - COMMA int +DECLARE_FUNC(int, conv, double* + COMMA int + COMMA double* + COMMA int COMMA double*); //------------------------------------------------------------------------------ -DECLARE_FUNC(int, conv_cmplx, complex_t* - COMMA int - COMMA complex_t* - COMMA int +DECLARE_FUNC(int, conv_cmplx, complex_t* + COMMA int + COMMA complex_t* + COMMA int COMMA complex_t*); //------------------------------------------------------------------------------ DECLARE_FUNC(int, conv_fft_cmplx, complex_t* a COMMA int na COMMA complex_t* b - COMMA int nb + COMMA int nb COMMA fft_t* pfft COMMA complex_t* c); //------------------------------------------------------------------------------ -DECLARE_FUNC(int, cos_cmplx, complex_t* - COMMA int +DECLARE_FUNC(int, cos_cmplx, complex_t* + COMMA int COMMA complex_t*); //------------------------------------------------------------------------------ -DECLARE_FUNC(int, dft, double* - COMMA int +DECLARE_FUNC(int, dft, double* + COMMA int COMMA complex_t*); //------------------------------------------------------------------------------ -DECLARE_FUNC(int, dft_cmplx, complex_t* - COMMA int +DECLARE_FUNC(int, dft_cmplx, complex_t* + COMMA int COMMA complex_t*); //------------------------------------------------------------------------------ -DECLARE_FUNC(double, dmod, double +DECLARE_FUNC(double, dmod, double COMMA double); //------------------------------------------------------------------------------ DECLARE_FUNC(void, dspl_info, void); @@ -319,7 +319,7 @@ DECLARE_FUNC(int, ellip_ap, double rp //------------------------------------------------------------------------------ DECLARE_FUNC(int, ellip_ap_zp, int ord COMMA double rp - COMMA double rs + COMMA double rs COMMA complex_t* z COMMA int* nz COMMA complex_t* p @@ -376,57 +376,57 @@ DECLARE_FUNC(int, idft_cmplx, complex_t* //------------------------------------------------------------------------------ DECLARE_FUNC(int, ifft_cmplx, complex_t* COMMA int - COMMA fft_t* + COMMA fft_t* COMMA complex_t* ); //------------------------------------------------------------------------------ -DECLARE_FUNC(int, farrow_lagrange, double* - COMMA int - COMMA double - COMMA double - COMMA double - COMMA double** +DECLARE_FUNC(int, farrow_lagrange, double* + COMMA int + COMMA double + COMMA double + COMMA double + COMMA double** COMMA int*); //------------------------------------------------------------------------------ -DECLARE_FUNC(int, farrow_spline, double* - COMMA int - COMMA double - COMMA double - COMMA double - COMMA double** +DECLARE_FUNC(int, farrow_spline, double* + COMMA int + COMMA double + COMMA double + COMMA double + COMMA double** COMMA int*); //------------------------------------------------------------------------------ -DECLARE_FUNC(int, filter_iir, double* - COMMA double* - COMMA int - COMMA double* - COMMA int +DECLARE_FUNC(int, filter_iir, double* + COMMA double* + COMMA int + COMMA double* + COMMA int COMMA double*); //------------------------------------------------------------------------------ -DECLARE_FUNC(int, filter_zp2ab, complex_t* - COMMA int - COMMA complex_t* - COMMA int - COMMA int - COMMA double* +DECLARE_FUNC(int, filter_zp2ab, complex_t* + COMMA int + COMMA complex_t* + COMMA int + COMMA int + COMMA double* COMMA double*); //------------------------------------------------------------------------------ DECLARE_FUNC(int, fft, double* - COMMA int - COMMA fft_t* - COMMA complex_t* ); -//------------------------------------------------------------------------------ -DECLARE_FUNC(int, fft_cmplx, complex_t* COMMA int - COMMA fft_t* + COMMA fft_t* COMMA complex_t* ); //------------------------------------------------------------------------------ -DECLARE_FUNC(int, fft_create, fft_t* +DECLARE_FUNC(int, fft_cmplx, complex_t* + COMMA int + COMMA fft_t* + COMMA complex_t* ); +//------------------------------------------------------------------------------ +DECLARE_FUNC(int, fft_create, fft_t* COMMA int); //------------------------------------------------------------------------------ DECLARE_FUNC(void, fft_free, fft_t*); //------------------------------------------------------------------------------ -DECLARE_FUNC(int, fft_shift, double* - COMMA int n +DECLARE_FUNC(int, fft_shift, double* + COMMA int n COMMA double*); //------------------------------------------------------------------------------ DECLARE_FUNC(int, fft_shift_cmplx, complex_t* @@ -439,43 +439,43 @@ DECLARE_FUNC(int, flipip, double* DECLARE_FUNC(int, flipip_cmplx, complex_t* COMMA int); //------------------------------------------------------------------------------ -DECLARE_FUNC(int, fourier_series_dec, double* - COMMA double* - COMMA int - COMMA double - COMMA int - COMMA double* +DECLARE_FUNC(int, fourier_series_dec, double* + COMMA double* + COMMA int + COMMA double + COMMA int + COMMA double* COMMA complex_t*); //------------------------------------------------------------------------------ DECLARE_FUNC(int, fourier_series_rec, double* - COMMA complex_t* - COMMA int - COMMA double* - COMMA int + COMMA complex_t* + COMMA int + COMMA double* + COMMA int COMMA complex_t*); //------------------------------------------------------------------------------ -DECLARE_FUNC(int, freqs, double* - COMMA double* - COMMA int - COMMA double* - COMMA int +DECLARE_FUNC(int, freqs, double* + COMMA double* + COMMA int + COMMA double* + COMMA int COMMA complex_t*); //------------------------------------------------------------------------------ DECLARE_FUNC(int, freqs_cmplx, double* b COMMA double* a - COMMA int ord + COMMA int ord COMMA complex_t* s COMMA int n COMMA complex_t* h); //------------------------------------------------------------------------------ DECLARE_FUNC(int, freqs_resp, double* - COMMA double* - COMMA int - COMMA double* - COMMA int - COMMA int - COMMA double* - COMMA double* + COMMA double* + COMMA int + COMMA double* + COMMA int + COMMA int + COMMA double* + COMMA double* COMMA double*); //------------------------------------------------------------------------------ DECLARE_FUNC(int, freqs2time, double* @@ -487,11 +487,11 @@ DECLARE_FUNC(int, freqs2time, double* COMMA double* COMMA double*); //------------------------------------------------------------------------------ -DECLARE_FUNC(int, freqz, double* - COMMA double* - COMMA int - COMMA double* - COMMA int +DECLARE_FUNC(int, freqz, double* + COMMA double* + COMMA int + COMMA double* + COMMA int COMMA complex_t*); //------------------------------------------------------------------------------ DECLARE_FUNC(int, goertzel, double* @@ -502,14 +502,14 @@ DECLARE_FUNC(int, goertzel, double* //------------------------------------------------------------------------------ DECLARE_FUNC(int, goertzel_cmplx, complex_t* COMMA int - COMMA int* - COMMA int + COMMA int* + COMMA int COMMA complex_t*); //------------------------------------------------------------------------------ DECLARE_FUNC(int, linspace, double COMMA double - COMMA int - COMMA int + COMMA int + COMMA int COMMA double*); //------------------------------------------------------------------------------ DECLARE_FUNC(int, log_cmplx, complex_t* @@ -524,7 +524,7 @@ DECLARE_FUNC(int, logspace, double //------------------------------------------------------------------------------ DECLARE_FUNC(int, low2bp, double* b COMMA double* a - COMMA int ord + COMMA int ord COMMA double w0 COMMA double wpl COMMA double wph @@ -547,41 +547,41 @@ DECLARE_FUNC(int, low2low, double* b COMMA double* beta COMMA double* alpha); //------------------------------------------------------------------------------ -DECLARE_FUNC(int, poly_z2a_cmplx, complex_t* - COMMA int - COMMA int +DECLARE_FUNC(int, poly_z2a_cmplx, complex_t* + COMMA int + COMMA int COMMA complex_t*); //------------------------------------------------------------------------------ DECLARE_FUNC(int, polyval, double* COMMA int COMMA double* - COMMA int + COMMA int COMMA double*); //------------------------------------------------------------------------------ DECLARE_FUNC(int, polyval_cmplx, complex_t* COMMA int COMMA complex_t* - COMMA int + COMMA int COMMA complex_t*); //------------------------------------------------------------------------------ -DECLARE_FUNC(int, randn, double* - COMMA int - COMMA double +DECLARE_FUNC(int, randn, double* + COMMA int + COMMA double COMMA double); //------------------------------------------------------------------------------ -DECLARE_FUNC(int, randu, double* +DECLARE_FUNC(int, randu, double* COMMA int); //------------------------------------------------------------------------------ DECLARE_FUNC(int, ratcompos, double* b COMMA double* a - COMMA int n + COMMA int n COMMA double* c COMMA double* d - COMMA int p + COMMA int p COMMA double* beta COMMA double* alpha); //------------------------------------------------------------------------------ -DECLARE_FUNC(int, re2cmplx, double* +DECLARE_FUNC(int, re2cmplx, double* COMMA int COMMA complex_t*); //------------------------------------------------------------------------------ @@ -593,43 +593,54 @@ DECLARE_FUNC(int, signal_pimp, double* COMMA double COMMA double*); //------------------------------------------------------------------------------ -DECLARE_FUNC(int, sin_cmplx, complex_t* - COMMA int +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, sqrt_cmplx, complex_t* - COMMA int +DECLARE_FUNC(int, sinc, double* x + COMMA int n + COMMA double* y); +//------------------------------------------------------------------------------ +DECLARE_FUNC(int, sqrt_cmplx, complex_t* + COMMA int COMMA complex_t*); //------------------------------------------------------------------------------ -DECLARE_FUNC(int, trapint, double* - COMMA double* - COMMA int +DECLARE_FUNC(int, trapint, double* + COMMA double* + COMMA int COMMA double*); //------------------------------------------------------------------------------ -DECLARE_FUNC(int, trapint_cmplx, double* +DECLARE_FUNC(int, trapint_cmplx, double* COMMA complex_t* - COMMA int + COMMA int COMMA complex_t*); //------------------------------------------------------------------------------ DECLARE_FUNC(int, unwrap, double* COMMA int - COMMA double + COMMA double COMMA double); //------------------------------------------------------------------------------ DECLARE_FUNC(int, writebin, void* - COMMA int - COMMA int + COMMA int + COMMA int COMMA char*); //------------------------------------------------------------------------------ -DECLARE_FUNC(int, writetxt, double* - COMMA double* - COMMA int +DECLARE_FUNC(int, writetxt, double* + COMMA double* + COMMA int COMMA char*); //------------------------------------------------------------------------------ DECLARE_FUNC(int, writetxt_3d, double* x COMMA int nx COMMA double* y - COMMA int ny + COMMA int ny COMMA double* z COMMA char* fn); //------------------------------------------------------------------------------