\hypertarget{structgymbo_1_1Grad}{}\doxysection{gymbo\+::Grad Struct Reference}
\label{structgymbo_1_1Grad}\index{gymbo::Grad@{gymbo::Grad}}


Struct representing the gradient of a symbolic expression.  




{\ttfamily \#include $<$type.\+h$>$}

\doxysubsection*{Public Member Functions}
\begin{DoxyCompactItemize}
\item 
\mbox{\hyperlink{structgymbo_1_1Grad_a987813a5c6bc104b120ad2541639af1f}{Grad}} (std\+::unordered\+\_\+map$<$ int, float $>$ \mbox{\hyperlink{structgymbo_1_1Grad_a630feb208125b40d88176890f31d2b50}{val}})
\begin{DoxyCompactList}\small\item\em Constructor for the gradient. \end{DoxyCompactList}\item 
\mbox{\hyperlink{structgymbo_1_1Grad}{Grad}} \mbox{\hyperlink{structgymbo_1_1Grad_ae29038cc1a276a7b3b4d3343216092f2}{operator+}} (const \mbox{\hyperlink{structgymbo_1_1Grad}{Grad}} \&other)
\begin{DoxyCompactList}\small\item\em Overloaded addition operator for adding two gradients. \end{DoxyCompactList}\item 
\mbox{\hyperlink{structgymbo_1_1Grad}{Grad}} \mbox{\hyperlink{structgymbo_1_1Grad_ab17ad2f9fdc7a1dfde187841114deff3}{operator+}} (float w)
\begin{DoxyCompactList}\small\item\em Overloaded addition operator for adding a constant to the gradient. \end{DoxyCompactList}\item 
\mbox{\hyperlink{structgymbo_1_1Grad}{Grad}} \mbox{\hyperlink{structgymbo_1_1Grad_a0d16b96d0512f5913931e0d2fd1a9150}{operator-\/}} (const \mbox{\hyperlink{structgymbo_1_1Grad}{Grad}} \&other)
\begin{DoxyCompactList}\small\item\em Overloaded subtraction operator for subtracting two gradients. \end{DoxyCompactList}\item 
\mbox{\hyperlink{structgymbo_1_1Grad}{Grad}} \mbox{\hyperlink{structgymbo_1_1Grad_a193c86f19a3f977475b6fa9fe55976f0}{operator$\ast$}} (float w)
\begin{DoxyCompactList}\small\item\em Overloaded multiplication operator for multiplying the gradient by a constant. \end{DoxyCompactList}\item 
\mbox{\hyperlink{structgymbo_1_1Grad}{Grad}} \mbox{\hyperlink{structgymbo_1_1Grad_a08ffacf1fdfb4662cf2aa1eb1314fc0d}{abs}} ()
\begin{DoxyCompactList}\small\item\em Compute the absolute values of the gradient. \end{DoxyCompactList}\end{DoxyCompactItemize}
\doxysubsection*{Public Attributes}
\begin{DoxyCompactItemize}
\item 
std\+::unordered\+\_\+map$<$ int, float $>$ \mbox{\hyperlink{structgymbo_1_1Grad_a630feb208125b40d88176890f31d2b50}{val}}
\end{DoxyCompactItemize}


\doxysubsection{Detailed Description}
Struct representing the gradient of a symbolic expression. 

\doxysubsection{Constructor \& Destructor Documentation}
\mbox{\Hypertarget{structgymbo_1_1Grad_a987813a5c6bc104b120ad2541639af1f}\label{structgymbo_1_1Grad_a987813a5c6bc104b120ad2541639af1f}} 
\index{gymbo::Grad@{gymbo::Grad}!Grad@{Grad}}
\index{Grad@{Grad}!gymbo::Grad@{gymbo::Grad}}
\doxysubsubsection{\texorpdfstring{Grad()}{Grad()}}
{\footnotesize\ttfamily gymbo\+::\+Grad\+::\+Grad (\begin{DoxyParamCaption}\item[{std\+::unordered\+\_\+map$<$ int, float $>$}]{val }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [inline]}}



Constructor for the gradient. 


\begin{DoxyParams}{Parameters}
{\em val} & Map of variable indices to gradient values. \\
\hline
\end{DoxyParams}


\doxysubsection{Member Function Documentation}
\mbox{\Hypertarget{structgymbo_1_1Grad_a08ffacf1fdfb4662cf2aa1eb1314fc0d}\label{structgymbo_1_1Grad_a08ffacf1fdfb4662cf2aa1eb1314fc0d}} 
\index{gymbo::Grad@{gymbo::Grad}!abs@{abs}}
\index{abs@{abs}!gymbo::Grad@{gymbo::Grad}}
\doxysubsubsection{\texorpdfstring{abs()}{abs()}}
{\footnotesize\ttfamily \mbox{\hyperlink{structgymbo_1_1Grad}{Grad}} gymbo\+::\+Grad\+::abs (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [inline]}}



Compute the absolute values of the gradient. 

\begin{DoxyReturn}{Returns}
The gradient with absolute values. 
\end{DoxyReturn}
\mbox{\Hypertarget{structgymbo_1_1Grad_a193c86f19a3f977475b6fa9fe55976f0}\label{structgymbo_1_1Grad_a193c86f19a3f977475b6fa9fe55976f0}} 
\index{gymbo::Grad@{gymbo::Grad}!operator$\ast$@{operator$\ast$}}
\index{operator$\ast$@{operator$\ast$}!gymbo::Grad@{gymbo::Grad}}
\doxysubsubsection{\texorpdfstring{operator$\ast$()}{operator*()}}
{\footnotesize\ttfamily \mbox{\hyperlink{structgymbo_1_1Grad}{Grad}} gymbo\+::\+Grad\+::operator$\ast$ (\begin{DoxyParamCaption}\item[{float}]{w }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [inline]}}



Overloaded multiplication operator for multiplying the gradient by a constant. 


\begin{DoxyParams}{Parameters}
{\em w} & The constant to multiply by. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
The result of multiplying the gradient by the constant. 
\end{DoxyReturn}
\mbox{\Hypertarget{structgymbo_1_1Grad_ae29038cc1a276a7b3b4d3343216092f2}\label{structgymbo_1_1Grad_ae29038cc1a276a7b3b4d3343216092f2}} 
\index{gymbo::Grad@{gymbo::Grad}!operator+@{operator+}}
\index{operator+@{operator+}!gymbo::Grad@{gymbo::Grad}}
\doxysubsubsection{\texorpdfstring{operator+()}{operator+()}\hspace{0.1cm}{\footnotesize\ttfamily [1/2]}}
{\footnotesize\ttfamily \mbox{\hyperlink{structgymbo_1_1Grad}{Grad}} gymbo\+::\+Grad\+::operator+ (\begin{DoxyParamCaption}\item[{const \mbox{\hyperlink{structgymbo_1_1Grad}{Grad}} \&}]{other }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [inline]}}



Overloaded addition operator for adding two gradients. 


\begin{DoxyParams}{Parameters}
{\em other} & The gradient to add. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
The sum of the two gradients. 
\end{DoxyReturn}
\mbox{\Hypertarget{structgymbo_1_1Grad_ab17ad2f9fdc7a1dfde187841114deff3}\label{structgymbo_1_1Grad_ab17ad2f9fdc7a1dfde187841114deff3}} 
\index{gymbo::Grad@{gymbo::Grad}!operator+@{operator+}}
\index{operator+@{operator+}!gymbo::Grad@{gymbo::Grad}}
\doxysubsubsection{\texorpdfstring{operator+()}{operator+()}\hspace{0.1cm}{\footnotesize\ttfamily [2/2]}}
{\footnotesize\ttfamily \mbox{\hyperlink{structgymbo_1_1Grad}{Grad}} gymbo\+::\+Grad\+::operator+ (\begin{DoxyParamCaption}\item[{float}]{w }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [inline]}}



Overloaded addition operator for adding a constant to the gradient. 


\begin{DoxyParams}{Parameters}
{\em w} & The constant to add. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
The sum of the gradient and the constant. 
\end{DoxyReturn}
\mbox{\Hypertarget{structgymbo_1_1Grad_a0d16b96d0512f5913931e0d2fd1a9150}\label{structgymbo_1_1Grad_a0d16b96d0512f5913931e0d2fd1a9150}} 
\index{gymbo::Grad@{gymbo::Grad}!operator-\/@{operator-\/}}
\index{operator-\/@{operator-\/}!gymbo::Grad@{gymbo::Grad}}
\doxysubsubsection{\texorpdfstring{operator-\/()}{operator-()}}
{\footnotesize\ttfamily \mbox{\hyperlink{structgymbo_1_1Grad}{Grad}} gymbo\+::\+Grad\+::operator-\/ (\begin{DoxyParamCaption}\item[{const \mbox{\hyperlink{structgymbo_1_1Grad}{Grad}} \&}]{other }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [inline]}}



Overloaded subtraction operator for subtracting two gradients. 


\begin{DoxyParams}{Parameters}
{\em other} & The gradient to subtract. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
The result of subtracting the second gradient from the first. 
\end{DoxyReturn}


\doxysubsection{Member Data Documentation}
\mbox{\Hypertarget{structgymbo_1_1Grad_a630feb208125b40d88176890f31d2b50}\label{structgymbo_1_1Grad_a630feb208125b40d88176890f31d2b50}} 
\index{gymbo::Grad@{gymbo::Grad}!val@{val}}
\index{val@{val}!gymbo::Grad@{gymbo::Grad}}
\doxysubsubsection{\texorpdfstring{val}{val}}
{\footnotesize\ttfamily std\+::unordered\+\_\+map$<$int, float$>$ gymbo\+::\+Grad\+::val}

Map of variable indices to gradient values. 

The documentation for this struct was generated from the following file\+:\begin{DoxyCompactItemize}
\item 
libgymbo/\mbox{\hyperlink{type_8h}{type.\+h}}\end{DoxyCompactItemize}
