\doxysection{include/osmocom/dsp/cxvec\+\_\+math.h File Reference} \label{cxvec__math_8h}\index{include/osmocom/dsp/cxvec\_math.h@{include/osmocom/dsp/cxvec\_math.h}} Osmocom Complex vectors math header. \doxysubsection*{Enumerations} \begin{DoxyCompactItemize} \item enum \textbf{ osmo\+\_\+cxvec\+\_\+conv\+\_\+type} \{ \textbf{ CONV\+\_\+\+FULL\+\_\+\+SPAN} , \textbf{ CONV\+\_\+\+OVERLAP\+\_\+\+ONLY} , \textbf{ CONV\+\_\+\+NO\+\_\+\+DELAY} \} \begin{DoxyCompactList}\small\item\em Various possible types of convolution span. \end{DoxyCompactList}\item enum \textbf{ osmo\+\_\+cxvec\+\_\+peak\+\_\+alg} \{ \textbf{ PEAK\+\_\+\+WEIGH\+\_\+\+WIN} , \textbf{ PEAK\+\_\+\+WEIGH\+\_\+\+WIN\+\_\+\+CENTER} , \textbf{ PEAK\+\_\+\+EARLY\+\_\+\+LATE} \} \begin{DoxyCompactList}\small\item\em Various possible peak finding algorithms. \end{DoxyCompactList}\end{DoxyCompactItemize} \doxysubsection*{Functions} \begin{DoxyCompactItemize} \item static float \textbf{ osmo\+\_\+sinc} (float x) \begin{DoxyCompactList}\small\item\em Unnormalized sinc function. \end{DoxyCompactList}\item static float \textbf{ osmo\+\_\+normsqf} (float complex c) \begin{DoxyCompactList}\small\item\em Squared norm of a given complex. \end{DoxyCompactList}\item struct \textbf{ osmo\+\_\+cxvec} $\ast$ \textbf{ osmo\+\_\+cxvec\+\_\+scale} (const struct \textbf{ osmo\+\_\+cxvec} $\ast$in, float complex scale, struct \textbf{ osmo\+\_\+cxvec} $\ast$out) \begin{DoxyCompactList}\small\item\em Scale a complex vector (multiply by a constant) \end{DoxyCompactList}\item struct \textbf{ osmo\+\_\+cxvec} $\ast$ \textbf{ osmo\+\_\+cxvec\+\_\+rotate} (const struct \textbf{ osmo\+\_\+cxvec} $\ast$in, float rps, struct \textbf{ osmo\+\_\+cxvec} $\ast$out) \begin{DoxyCompactList}\small\item\em Rotate a complex vector (frequency shift) \end{DoxyCompactList}\item struct \textbf{ osmo\+\_\+cxvec} $\ast$ \textbf{ osmo\+\_\+cxvec\+\_\+delay} (const struct \textbf{ osmo\+\_\+cxvec} $\ast$in, float delay, struct \textbf{ osmo\+\_\+cxvec} $\ast$out) \begin{DoxyCompactList}\small\item\em Fractionally delay a vector while maintaining its length. \end{DoxyCompactList}\item struct \textbf{ osmo\+\_\+cxvec} $\ast$ \textbf{ osmo\+\_\+cxvec\+\_\+convolve} (const struct \textbf{ osmo\+\_\+cxvec} $\ast$f, const struct \textbf{ osmo\+\_\+cxvec} $\ast$g, enum \textbf{ osmo\+\_\+cxvec\+\_\+conv\+\_\+type} type, struct \textbf{ osmo\+\_\+cxvec} $\ast$out) \begin{DoxyCompactList}\small\item\em Convolve two complex vectors. \end{DoxyCompactList}\item struct \textbf{ osmo\+\_\+cxvec} $\ast$ \textbf{ osmo\+\_\+cxvec\+\_\+correlate} (const struct \textbf{ osmo\+\_\+cxvec} $\ast$f, const struct \textbf{ osmo\+\_\+cxvec} $\ast$g, int g\+\_\+corr\+\_\+step, struct \textbf{ osmo\+\_\+cxvec} $\ast$out) \begin{DoxyCompactList}\small\item\em Cross-\/correlate two complex vectors. \end{DoxyCompactList}\item float complex \textbf{ osmo\+\_\+cxvec\+\_\+interpolate\+\_\+point} (const struct \textbf{ osmo\+\_\+cxvec} $\ast$cv, float pos) \begin{DoxyCompactList}\small\item\em Interpolate any fractional position in a vector using sinc filtering. \end{DoxyCompactList}\item int \textbf{ osmo\+\_\+cxvec\+\_\+peaks\+\_\+scan} (const struct \textbf{ osmo\+\_\+cxvec} $\ast$cv, int $\ast$peaks\+\_\+idx, int N) \begin{DoxyCompactList}\small\item\em Find the index of the N highest energy ( $|x|^2$) peaks. \end{DoxyCompactList}\item float \textbf{ osmo\+\_\+cxvec\+\_\+peak\+\_\+energy\+\_\+find} (const struct \textbf{ osmo\+\_\+cxvec} $\ast$cv, int win\+\_\+size, enum \textbf{ osmo\+\_\+cxvec\+\_\+peak\+\_\+alg} alg, float complex $\ast$peak\+\_\+val\+\_\+p) \begin{DoxyCompactList}\small\item\em Find the maximum energy ( $|x|^2$) peak in a sequence. \end{DoxyCompactList}\item struct \textbf{ osmo\+\_\+cxvec} $\ast$ \textbf{ osmo\+\_\+cxvec\+\_\+sig\+\_\+normalize} (const struct \textbf{ osmo\+\_\+cxvec} $\ast$sig, int decim, float freq\+\_\+shift, struct \textbf{ osmo\+\_\+cxvec} $\ast$out) \begin{DoxyCompactList}\small\item\em \textquotesingle{}Normalize\textquotesingle{} an IQ signal and apply decimation/frequency shift \end{DoxyCompactList}\end{DoxyCompactItemize} \doxysubsection{Detailed Description} Osmocom Complex vectors math header.