\hypertarget{_mat_8c}{\section{Core/\-Math/\-Mat.c File Reference}
\label{_mat_8c}\index{Core/\-Math/\-Mat.\-c@{Core/\-Math/\-Mat.\-c}}
}
{\ttfamily \#include $<$Core/\-Math/\-Mat.\-h$>$}\\*
{\ttfamily \#include $<$stdio.\-h$>$}\\*
\subsection*{Macros}
\begin{DoxyCompactItemize}
\item 
\#define \hyperlink{_mat_8c_aa6e7032f5dccdc69d2946c33a916b323}{Abs}(x)~((x)$<$0?-\/(x)\-:(x))
\item 
\#define \hyperlink{_mat_8c_a56957c78144b268fbcdbf7d9fb5acafe}{Max}(x, y)~((x)$<$(y)?(y)\-:(x))
\item 
\#define \hyperlink{_mat_8c_aaea63618df7e25b4e9ed2a84f444dbe7}{S\-W\-I\-T\-C\-H\-\_\-\-R\-O\-W\-S}(m, r1, r2)
\item 
\#define \hyperlink{_mat_8c_a9306a196310d941f6342fef566e0481b}{S\-U\-B\-\_\-\-R\-O\-W\-S}(m, r1, r2, mul)
\end{DoxyCompactItemize}
\subsection*{Functions}
\begin{DoxyCompactItemize}
\item 
void \hyperlink{_mat_8c_ac821f16e0794983d3994c6f86b6799a1}{min\-\_\-norm\-\_\-least\-\_\-sq\-\_\-3} (double $\ast$A\mbox{[}3\mbox{]}, double $\ast$b, double $\ast$x, double $\ast$bprime, int size)
\item 
void \hyperlink{_mat_8c_a5359c9f17597fe1fc6037175cefe63f4}{matsolve3by3} (double mat\mbox{[}3\mbox{]}\mbox{[}3\mbox{]}, double rhs\mbox{[}3\mbox{]})
\item 
void \hyperlink{_mat_8c_aa1d7144f2cb54b0aaed8385b90c243ff}{matsolve3by3\-\_\-cond} (double mat\mbox{[}3\mbox{]}\mbox{[}3\mbox{]}, double rhs\mbox{[}3\mbox{]}, double $\ast$rcond)
\end{DoxyCompactItemize}


\subsection{Macro Definition Documentation}
\hypertarget{_mat_8c_aa6e7032f5dccdc69d2946c33a916b323}{\index{Mat.\-c@{Mat.\-c}!Abs@{Abs}}
\index{Abs@{Abs}!Mat.c@{Mat.\-c}}
\subsubsection[{Abs}]{\setlength{\rightskip}{0pt plus 5cm}\#define Abs(
\begin{DoxyParamCaption}
\item[{}]{x}
\end{DoxyParamCaption}
)~((x)$<$0?-\/(x)\-:(x))}}\label{_mat_8c_aa6e7032f5dccdc69d2946c33a916b323}
\hypertarget{_mat_8c_a56957c78144b268fbcdbf7d9fb5acafe}{\index{Mat.\-c@{Mat.\-c}!Max@{Max}}
\index{Max@{Max}!Mat.c@{Mat.\-c}}
\subsubsection[{Max}]{\setlength{\rightskip}{0pt plus 5cm}\#define Max(
\begin{DoxyParamCaption}
\item[{}]{x, }
\item[{}]{y}
\end{DoxyParamCaption}
)~((x)$<$(y)?(y)\-:(x))}}\label{_mat_8c_a56957c78144b268fbcdbf7d9fb5acafe}
\hypertarget{_mat_8c_a9306a196310d941f6342fef566e0481b}{\index{Mat.\-c@{Mat.\-c}!S\-U\-B\-\_\-\-R\-O\-W\-S@{S\-U\-B\-\_\-\-R\-O\-W\-S}}
\index{S\-U\-B\-\_\-\-R\-O\-W\-S@{S\-U\-B\-\_\-\-R\-O\-W\-S}!Mat.c@{Mat.\-c}}
\subsubsection[{S\-U\-B\-\_\-\-R\-O\-W\-S}]{\setlength{\rightskip}{0pt plus 5cm}\#define S\-U\-B\-\_\-\-R\-O\-W\-S(
\begin{DoxyParamCaption}
\item[{}]{m, }
\item[{}]{r1, }
\item[{}]{r2, }
\item[{}]{mul}
\end{DoxyParamCaption}
)}}\label{_mat_8c_a9306a196310d941f6342fef566e0481b}
{\bfseries Value\-:}
\begin{DoxyCode}
\textcolor{keywordflow}{for}(k=0;k<3;k++)\{ \(\backslash\)
        m[r1][k] -= m[r2][k]*mul; \(\backslash\)
    \}
\end{DoxyCode}
\hypertarget{_mat_8c_aaea63618df7e25b4e9ed2a84f444dbe7}{\index{Mat.\-c@{Mat.\-c}!S\-W\-I\-T\-C\-H\-\_\-\-R\-O\-W\-S@{S\-W\-I\-T\-C\-H\-\_\-\-R\-O\-W\-S}}
\index{S\-W\-I\-T\-C\-H\-\_\-\-R\-O\-W\-S@{S\-W\-I\-T\-C\-H\-\_\-\-R\-O\-W\-S}!Mat.c@{Mat.\-c}}
\subsubsection[{S\-W\-I\-T\-C\-H\-\_\-\-R\-O\-W\-S}]{\setlength{\rightskip}{0pt plus 5cm}\#define S\-W\-I\-T\-C\-H\-\_\-\-R\-O\-W\-S(
\begin{DoxyParamCaption}
\item[{}]{m, }
\item[{}]{r1, }
\item[{}]{r2}
\end{DoxyParamCaption}
)}}\label{_mat_8c_aaea63618df7e25b4e9ed2a84f444dbe7}
{\bfseries Value\-:}
\begin{DoxyCode}
\textcolor{keywordflow}{for}(k=0;k<3;k++)\{ \(\backslash\)
        double tmp=m[r1][k]; \(\backslash\)
        m[r1][k]=m[r2][k]; \(\backslash\)
        m[r2][k]=tmp; \(\backslash\)
    \}
\end{DoxyCode}


\subsection{Function Documentation}
\hypertarget{_mat_8c_a5359c9f17597fe1fc6037175cefe63f4}{\index{Mat.\-c@{Mat.\-c}!matsolve3by3@{matsolve3by3}}
\index{matsolve3by3@{matsolve3by3}!Mat.c@{Mat.\-c}}
\subsubsection[{matsolve3by3}]{\setlength{\rightskip}{0pt plus 5cm}void matsolve3by3 (
\begin{DoxyParamCaption}
\item[{double}]{mat\mbox{[}3\mbox{]}\mbox{[}3\mbox{]}, }
\item[{double}]{rhs\mbox{[}3\mbox{]}}
\end{DoxyParamCaption}
)}}\label{_mat_8c_a5359c9f17597fe1fc6037175cefe63f4}
\hypertarget{_mat_8c_aa1d7144f2cb54b0aaed8385b90c243ff}{\index{Mat.\-c@{Mat.\-c}!matsolve3by3\-\_\-cond@{matsolve3by3\-\_\-cond}}
\index{matsolve3by3\-\_\-cond@{matsolve3by3\-\_\-cond}!Mat.c@{Mat.\-c}}
\subsubsection[{matsolve3by3\-\_\-cond}]{\setlength{\rightskip}{0pt plus 5cm}void matsolve3by3\-\_\-cond (
\begin{DoxyParamCaption}
\item[{double}]{mat\mbox{[}3\mbox{]}\mbox{[}3\mbox{]}, }
\item[{double}]{rhs\mbox{[}3\mbox{]}, }
\item[{double $\ast$}]{rcond}
\end{DoxyParamCaption}
)}}\label{_mat_8c_aa1d7144f2cb54b0aaed8385b90c243ff}
\hypertarget{_mat_8c_ac821f16e0794983d3994c6f86b6799a1}{\index{Mat.\-c@{Mat.\-c}!min\-\_\-norm\-\_\-least\-\_\-sq\-\_\-3@{min\-\_\-norm\-\_\-least\-\_\-sq\-\_\-3}}
\index{min\-\_\-norm\-\_\-least\-\_\-sq\-\_\-3@{min\-\_\-norm\-\_\-least\-\_\-sq\-\_\-3}!Mat.c@{Mat.\-c}}
\subsubsection[{min\-\_\-norm\-\_\-least\-\_\-sq\-\_\-3}]{\setlength{\rightskip}{0pt plus 5cm}void min\-\_\-norm\-\_\-least\-\_\-sq\-\_\-3 (
\begin{DoxyParamCaption}
\item[{double $\ast$}]{A\mbox{[}3\mbox{]}, }
\item[{double $\ast$}]{b, }
\item[{double $\ast$}]{x, }
\item[{double $\ast$}]{bprime, }
\item[{int}]{size}
\end{DoxyParamCaption}
)}}\label{_mat_8c_ac821f16e0794983d3994c6f86b6799a1}
