\hypertarget{mymath_8h}{}\doxysection{inc/mymath.h File Reference}
\label{mymath_8h}\index{inc/mymath.h@{inc/mymath.h}}
{\ttfamily \#include \char`\"{}myarr.\+h\char`\"{}}\newline
{\ttfamily \#include $<$stddef.\+h$>$}\newline
Include dependency graph for mymath.\+h\+:\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=176pt]{mymath_8h__incl}
\end{center}
\end{figure}
This graph shows which files directly or indirectly include this file\+:\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=350pt]{mymath_8h__dep__incl}
\end{center}
\end{figure}
\doxysubsection*{Functions}
\begin{DoxyCompactItemize}
\item 
void \mbox{\hyperlink{group__mymath_ga227eaade4011887dce2896bb79d155bc}{transpone}} (double $\ast$arr, unsigned int Nrows, unsigned int Ncols)
\begin{DoxyCompactList}\small\item\em Transposes a matrix in-\/place. \end{DoxyCompactList}\item 
void \mbox{\hyperlink{group__mymath_ga20b46b1a784a88425c75346675dd5a9f}{invert}} (double $\ast$arr, unsigned int Nrows, unsigned int Ncols)
\begin{DoxyCompactList}\small\item\em Inverts a square matrix in-\/place. \end{DoxyCompactList}\item 
double $\ast$ \mbox{\hyperlink{group__mymath_gaa416e7200d138f4658d7e0957f99b1f7}{mulmat}} (const double $\ast$matrix0, unsigned int Nrows, unsigned int Ncols, const double $\ast$matrix1, unsigned int Mrows, unsigned int Mcols)
\begin{DoxyCompactList}\small\item\em Multiplies two matrices and returns the result as a new matrix. \end{DoxyCompactList}\item 
void \mbox{\hyperlink{group__mymath_gab2f9dd27878a8e05a6aba5b499b178de}{matlinreg}} (double coeffs\mbox{[}2\mbox{]}, const double $\ast$xmat, unsigned int Nrows, unsigned int Ncols, double $\ast$vec, const double $\ast$weight)
\begin{DoxyCompactList}\small\item\em Performs linear regression on a dataset with optional weighting. \end{DoxyCompactList}\item 
void \mbox{\hyperlink{group__mymath_ga796beb5c24876db27ada7a5e2466330d}{fit\+Npeaks}} (double $\ast$intercept, double $\ast$slope, unsigned int cur\+Pos, const struct \mbox{\hyperlink{structmyarr}{myarr}} $\ast$maxvals, const struct \mbox{\hyperlink{structmyarr}{myarr}} $\ast$maxes, const struct \mbox{\hyperlink{structmyarr}{myarr}} $\ast$subpos, unsigned int npeaks, double SDthreshold)
\begin{DoxyCompactList}\small\item\em Fits a line to N peaks in the data, with outlier rejection. \end{DoxyCompactList}\item 
void \mbox{\hyperlink{group__mymath_ga7ed6eb4d3afa19567d734e84c0e23ba4}{fastlinreg}} (double coeffs\mbox{[}2\mbox{]}, const double $\ast$xmat, unsigned int Npoints, const double $\ast$vec, const double $\ast$weight\+Arr)
\begin{DoxyCompactList}\small\item\em Performs fast weighted linear regression. \end{DoxyCompactList}\item 
size\+\_\+t \mbox{\hyperlink{group__mymath_gad6fc91777cf096e8b0b1cf14109ddbd3}{getmaxpos}} (const int $\ast$array, size\+\_\+t Array\+Length)
\begin{DoxyCompactList}\small\item\em Returns the index of the maximum value in an integer array. \end{DoxyCompactList}\item 
void \mbox{\hyperlink{group__mymath_ga239201d57c9b2822f69d5ccb3005cc0f}{linreg}} (const double $\ast$xarr, const double $\ast$yarr, size\+\_\+t Array\+Length, double $\ast$intercept, double $\ast$slope, double $\ast$stdev)
\begin{DoxyCompactList}\small\item\em Performs simple linear regression on two arrays. \end{DoxyCompactList}\item 
int \mbox{\hyperlink{group__mymath_ga185afbbfacdb1ebd2fb8bc9f8c7ce458}{shift\+Half}} (size\+\_\+t value, size\+\_\+t Array\+Length)
\begin{DoxyCompactList}\small\item\em Shifts a value by half the array length, wrapping around. \end{DoxyCompactList}\end{DoxyCompactItemize}
