\section{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.  


\subsection*{Enumerations}
\begin{DoxyCompactItemize}
\item 
enum \textbf{ osmo\+\_\+cxvec\+\_\+conv\+\_\+type} \{ \textbf{ C\+O\+N\+V\+\_\+\+F\+U\+L\+L\+\_\+\+S\+P\+AN}, 
\textbf{ C\+O\+N\+V\+\_\+\+O\+V\+E\+R\+L\+A\+P\+\_\+\+O\+N\+LY}, 
\textbf{ C\+O\+N\+V\+\_\+\+N\+O\+\_\+\+D\+E\+L\+AY}
 \}\begin{DoxyCompactList}\small\item\em Various possible types of convolution span. \end{DoxyCompactList}
\item 
enum \textbf{ osmo\+\_\+cxvec\+\_\+peak\+\_\+alg} \{ \textbf{ P\+E\+A\+K\+\_\+\+W\+E\+I\+G\+H\+\_\+\+W\+IN}, 
\textbf{ P\+E\+A\+K\+\_\+\+W\+E\+I\+G\+H\+\_\+\+W\+I\+N\+\_\+\+C\+E\+N\+T\+ER}, 
\textbf{ P\+E\+A\+K\+\_\+\+E\+A\+R\+L\+Y\+\_\+\+L\+A\+TE}
 \}\begin{DoxyCompactList}\small\item\em Various possible peak finding algorithms. \end{DoxyCompactList}
\end{DoxyCompactItemize}
\subsection*{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}


\subsection{Detailed Description}
Osmocom Complex vectors math header. 

