\hypertarget{structgymbo_1_1SymProb}{}\doxysection{gymbo\+::Sym\+Prob Struct Reference}
\label{structgymbo_1_1SymProb}\index{gymbo::SymProb@{gymbo::SymProb}}


Represents a symbolic probability with a numerator and denominator.  




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



Collaboration diagram for gymbo\+::Sym\+Prob\+:\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=210pt]{structgymbo_1_1SymProb__coll__graph}
\end{center}
\end{figure}
\doxysubsection*{Public Member Functions}
\begin{DoxyCompactItemize}
\item 
\mbox{\hyperlink{structgymbo_1_1SymProb_a45348e2eb1ce07b74f98205d439675a6}{Sym\+Prob}} ()
\begin{DoxyCompactList}\small\item\em Default constructor for \mbox{\hyperlink{structgymbo_1_1SymProb}{Sym\+Prob}}. \end{DoxyCompactList}\item 
\mbox{\hyperlink{structgymbo_1_1SymProb_acd885552667a868ffd283d4e06580c6b}{Sym\+Prob}} (\mbox{\hyperlink{structgymbo_1_1Sym}{Sym}} $\ast$\mbox{\hyperlink{structgymbo_1_1SymProb_aa976d7a8bdc34ec4dc3d14e2c8cd2f13}{numerator}}, \mbox{\hyperlink{structgymbo_1_1Sym}{Sym}} $\ast$\mbox{\hyperlink{structgymbo_1_1SymProb_aa103d656a1c912733a5b26b9cbf494b2}{denominator}})
\begin{DoxyCompactList}\small\item\em Parameterized constructor for \mbox{\hyperlink{structgymbo_1_1SymProb}{Sym\+Prob}}. \end{DoxyCompactList}\item 
std\+::string \mbox{\hyperlink{structgymbo_1_1SymProb_a3bacfa903804b63ec4a4892e9d091c7a}{to\+String}} ()
\begin{DoxyCompactList}\small\item\em Converts \mbox{\hyperlink{structgymbo_1_1SymProb}{Sym\+Prob}} to a string. \end{DoxyCompactList}\item 
\mbox{\hyperlink{structgymbo_1_1SymProb}{Sym\+Prob}} \mbox{\hyperlink{structgymbo_1_1SymProb_a0c79b2dc21deed032ff94afc3a94cb43}{operator$\ast$}} (\mbox{\hyperlink{structgymbo_1_1SymProb}{Sym\+Prob}} other)
\begin{DoxyCompactList}\small\item\em Multiplies two \mbox{\hyperlink{structgymbo_1_1SymProb}{Sym\+Prob}} instances. \end{DoxyCompactList}\item 
\mbox{\hyperlink{structgymbo_1_1SymProb}{Sym\+Prob}} $\ast$ \mbox{\hyperlink{structgymbo_1_1SymProb_a58b2cd3749634974dacf34fbb5267a27}{pmul}} (\mbox{\hyperlink{structgymbo_1_1SymProb}{Sym\+Prob}} $\ast$other)
\begin{DoxyCompactList}\small\item\em Multiplies two \mbox{\hyperlink{structgymbo_1_1SymProb}{Sym\+Prob}} instances. \end{DoxyCompactList}\item 
std\+::pair$<$ \mbox{\hyperlink{structgymbo_1_1Sym}{Sym}} $\ast$, \mbox{\hyperlink{structgymbo_1_1Sym}{Sym}} $\ast$ $>$ \mbox{\hyperlink{structgymbo_1_1SymProb_a2f31b482f6a558a3f3a463f16ef9a936}{marginalize}} (std\+::unordered\+\_\+map$<$ int, \mbox{\hyperlink{structgymbo_1_1DiscreteDist}{Discrete\+Dist}} $>$ \&var2dist, std\+::vector$<$ std\+::vector$<$ int $>$$>$ \&D)
\begin{DoxyCompactList}\small\item\em Marginalizes the \mbox{\hyperlink{structgymbo_1_1SymProb}{Sym\+Prob}} over given variable assignments. \end{DoxyCompactList}\item 
float \mbox{\hyperlink{structgymbo_1_1SymProb_af35f871a03f51d2ebff3d87e83d7596c}{eval}} (std\+::unordered\+\_\+map$<$ int, float $>$ \&params, float eps, std\+::unordered\+\_\+map$<$ int, \mbox{\hyperlink{structgymbo_1_1DiscreteDist}{Discrete\+Dist}} $>$ \&var2dist, std\+::vector$<$ std\+::vector$<$ int $>$$>$ \&D)
\begin{DoxyCompactList}\small\item\em Evaluates the \mbox{\hyperlink{structgymbo_1_1SymProb}{Sym\+Prob}} for given parameters, epsilon, variable assignments, and distributions. \end{DoxyCompactList}\item 
\mbox{\hyperlink{structgymbo_1_1Sym}{Sym}} \mbox{\hyperlink{structgymbo_1_1SymProb_abd515bce0315739636795c3c28ebcf8c}{query}} (\mbox{\hyperlink{namespacegymbo_a4524c130985b8982d2787f9bafe27225}{Sym\+Type}} symtype, \mbox{\hyperlink{structgymbo_1_1Sym}{Sym}} \&other, std\+::unordered\+\_\+map$<$ int, \mbox{\hyperlink{structgymbo_1_1DiscreteDist}{Discrete\+Dist}} $>$ \&var2dist, std\+::vector$<$ std\+::vector$<$ int $>$$>$ \&D)
\begin{DoxyCompactList}\small\item\em Queries the \mbox{\hyperlink{structgymbo_1_1SymProb}{Sym\+Prob}} with a given symbolic type, another symbolic expression, and variable assignments. \end{DoxyCompactList}\end{DoxyCompactItemize}
\doxysubsection*{Public Attributes}
\begin{DoxyCompactItemize}
\item 
\mbox{\hyperlink{structgymbo_1_1Sym}{Sym}} $\ast$ \mbox{\hyperlink{structgymbo_1_1SymProb_aa976d7a8bdc34ec4dc3d14e2c8cd2f13}{numerator}}
\item 
\mbox{\hyperlink{structgymbo_1_1Sym}{Sym}} $\ast$ \mbox{\hyperlink{structgymbo_1_1SymProb_aa103d656a1c912733a5b26b9cbf494b2}{denominator}}
\end{DoxyCompactItemize}


\doxysubsection{Detailed Description}
Represents a symbolic probability with a numerator and denominator. 

The \mbox{\hyperlink{structgymbo_1_1SymProb}{Sym\+Prob}} struct is designed to handle symbolic probabilities using symbolic expressions. 

\doxysubsection{Constructor \& Destructor Documentation}
\mbox{\Hypertarget{structgymbo_1_1SymProb_a45348e2eb1ce07b74f98205d439675a6}\label{structgymbo_1_1SymProb_a45348e2eb1ce07b74f98205d439675a6}} 
\index{gymbo::SymProb@{gymbo::SymProb}!SymProb@{SymProb}}
\index{SymProb@{SymProb}!gymbo::SymProb@{gymbo::SymProb}}
\doxysubsubsection{\texorpdfstring{SymProb()}{SymProb()}\hspace{0.1cm}{\footnotesize\ttfamily [1/2]}}
{\footnotesize\ttfamily gymbo\+::\+Sym\+Prob\+::\+Sym\+Prob (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [inline]}}



Default constructor for \mbox{\hyperlink{structgymbo_1_1SymProb}{Sym\+Prob}}. 

Initializes the numerator and denominator with constant symbolic expressions representing 1.\+0. \mbox{\Hypertarget{structgymbo_1_1SymProb_acd885552667a868ffd283d4e06580c6b}\label{structgymbo_1_1SymProb_acd885552667a868ffd283d4e06580c6b}} 
\index{gymbo::SymProb@{gymbo::SymProb}!SymProb@{SymProb}}
\index{SymProb@{SymProb}!gymbo::SymProb@{gymbo::SymProb}}
\doxysubsubsection{\texorpdfstring{SymProb()}{SymProb()}\hspace{0.1cm}{\footnotesize\ttfamily [2/2]}}
{\footnotesize\ttfamily gymbo\+::\+Sym\+Prob\+::\+Sym\+Prob (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{structgymbo_1_1Sym}{Sym}} $\ast$}]{numerator,  }\item[{\mbox{\hyperlink{structgymbo_1_1Sym}{Sym}} $\ast$}]{denominator }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [inline]}}



Parameterized constructor for \mbox{\hyperlink{structgymbo_1_1SymProb}{Sym\+Prob}}. 


\begin{DoxyParams}{Parameters}
{\em numerator} & Pointer to the symbolic expression representing the numerator. \\
\hline
{\em denominator} & Pointer to the symbolic expression representing the denominator. \\
\hline
\end{DoxyParams}


\doxysubsection{Member Function Documentation}
\mbox{\Hypertarget{structgymbo_1_1SymProb_af35f871a03f51d2ebff3d87e83d7596c}\label{structgymbo_1_1SymProb_af35f871a03f51d2ebff3d87e83d7596c}} 
\index{gymbo::SymProb@{gymbo::SymProb}!eval@{eval}}
\index{eval@{eval}!gymbo::SymProb@{gymbo::SymProb}}
\doxysubsubsection{\texorpdfstring{eval()}{eval()}}
{\footnotesize\ttfamily float gymbo\+::\+Sym\+Prob\+::eval (\begin{DoxyParamCaption}\item[{std\+::unordered\+\_\+map$<$ int, float $>$ \&}]{params,  }\item[{float}]{eps,  }\item[{std\+::unordered\+\_\+map$<$ int, \mbox{\hyperlink{structgymbo_1_1DiscreteDist}{Discrete\+Dist}} $>$ \&}]{var2dist,  }\item[{std\+::vector$<$ std\+::vector$<$ int $>$$>$ \&}]{D }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [inline]}}



Evaluates the \mbox{\hyperlink{structgymbo_1_1SymProb}{Sym\+Prob}} for given parameters, epsilon, variable assignments, and distributions. 


\begin{DoxyParams}{Parameters}
{\em params} & Map of variable index to parameter values. \\
\hline
{\em eps} & Epsilon value for numerical stability. \\
\hline
{\em var2dist} & Map of variable index to \mbox{\hyperlink{structgymbo_1_1DiscreteDist}{Discrete\+Dist}}. \\
\hline
{\em D} & Vector of variable assignments. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
The evaluated probability as a float. 
\end{DoxyReturn}
\mbox{\Hypertarget{structgymbo_1_1SymProb_a2f31b482f6a558a3f3a463f16ef9a936}\label{structgymbo_1_1SymProb_a2f31b482f6a558a3f3a463f16ef9a936}} 
\index{gymbo::SymProb@{gymbo::SymProb}!marginalize@{marginalize}}
\index{marginalize@{marginalize}!gymbo::SymProb@{gymbo::SymProb}}
\doxysubsubsection{\texorpdfstring{marginalize()}{marginalize()}}
{\footnotesize\ttfamily std\+::pair$<$\mbox{\hyperlink{structgymbo_1_1Sym}{Sym}} $\ast$, \mbox{\hyperlink{structgymbo_1_1Sym}{Sym}} $\ast$$>$ gymbo\+::\+Sym\+Prob\+::marginalize (\begin{DoxyParamCaption}\item[{std\+::unordered\+\_\+map$<$ int, \mbox{\hyperlink{structgymbo_1_1DiscreteDist}{Discrete\+Dist}} $>$ \&}]{var2dist,  }\item[{std\+::vector$<$ std\+::vector$<$ int $>$$>$ \&}]{D }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [inline]}}



Marginalizes the \mbox{\hyperlink{structgymbo_1_1SymProb}{Sym\+Prob}} over given variable assignments. 


\begin{DoxyParams}{Parameters}
{\em var2dist} & Map of variable index to \mbox{\hyperlink{structgymbo_1_1DiscreteDist}{Discrete\+Dist}}. \\
\hline
{\em D} & Vector of variable assignments. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
Pair of \mbox{\hyperlink{structgymbo_1_1Sym}{Sym}} pointers representing the marginalized numerator and denominator. 
\end{DoxyReturn}
\mbox{\Hypertarget{structgymbo_1_1SymProb_a0c79b2dc21deed032ff94afc3a94cb43}\label{structgymbo_1_1SymProb_a0c79b2dc21deed032ff94afc3a94cb43}} 
\index{gymbo::SymProb@{gymbo::SymProb}!operator$\ast$@{operator$\ast$}}
\index{operator$\ast$@{operator$\ast$}!gymbo::SymProb@{gymbo::SymProb}}
\doxysubsubsection{\texorpdfstring{operator$\ast$()}{operator*()}}
{\footnotesize\ttfamily \mbox{\hyperlink{structgymbo_1_1SymProb}{Sym\+Prob}} gymbo\+::\+Sym\+Prob\+::operator$\ast$ (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{structgymbo_1_1SymProb}{Sym\+Prob}}}]{other }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [inline]}}



Multiplies two \mbox{\hyperlink{structgymbo_1_1SymProb}{Sym\+Prob}} instances. 


\begin{DoxyParams}{Parameters}
{\em other} & The \mbox{\hyperlink{structgymbo_1_1SymProb}{Sym\+Prob}} to multiply with. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
Result of the multiplication operation as a new \mbox{\hyperlink{structgymbo_1_1SymProb}{Sym\+Prob}} instance. 
\end{DoxyReturn}
\mbox{\Hypertarget{structgymbo_1_1SymProb_a58b2cd3749634974dacf34fbb5267a27}\label{structgymbo_1_1SymProb_a58b2cd3749634974dacf34fbb5267a27}} 
\index{gymbo::SymProb@{gymbo::SymProb}!pmul@{pmul}}
\index{pmul@{pmul}!gymbo::SymProb@{gymbo::SymProb}}
\doxysubsubsection{\texorpdfstring{pmul()}{pmul()}}
{\footnotesize\ttfamily \mbox{\hyperlink{structgymbo_1_1SymProb}{Sym\+Prob}}$\ast$ gymbo\+::\+Sym\+Prob\+::pmul (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{structgymbo_1_1SymProb}{Sym\+Prob}} $\ast$}]{other }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [inline]}}



Multiplies two \mbox{\hyperlink{structgymbo_1_1SymProb}{Sym\+Prob}} instances. 


\begin{DoxyParams}{Parameters}
{\em other} & The \mbox{\hyperlink{structgymbo_1_1SymProb}{Sym\+Prob}} to multiply with. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
Result of the multiplication operation as a new \mbox{\hyperlink{structgymbo_1_1SymProb}{Sym\+Prob}} instance. 
\end{DoxyReturn}
\mbox{\Hypertarget{structgymbo_1_1SymProb_abd515bce0315739636795c3c28ebcf8c}\label{structgymbo_1_1SymProb_abd515bce0315739636795c3c28ebcf8c}} 
\index{gymbo::SymProb@{gymbo::SymProb}!query@{query}}
\index{query@{query}!gymbo::SymProb@{gymbo::SymProb}}
\doxysubsubsection{\texorpdfstring{query()}{query()}}
{\footnotesize\ttfamily \mbox{\hyperlink{structgymbo_1_1Sym}{Sym}} gymbo\+::\+Sym\+Prob\+::query (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{namespacegymbo_a4524c130985b8982d2787f9bafe27225}{Sym\+Type}}}]{symtype,  }\item[{\mbox{\hyperlink{structgymbo_1_1Sym}{Sym}} \&}]{other,  }\item[{std\+::unordered\+\_\+map$<$ int, \mbox{\hyperlink{structgymbo_1_1DiscreteDist}{Discrete\+Dist}} $>$ \&}]{var2dist,  }\item[{std\+::vector$<$ std\+::vector$<$ int $>$$>$ \&}]{D }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [inline]}}



Queries the \mbox{\hyperlink{structgymbo_1_1SymProb}{Sym\+Prob}} with a given symbolic type, another symbolic expression, and variable assignments. 


\begin{DoxyParams}{Parameters}
{\em symtype} & Symbolic type for the resulting \mbox{\hyperlink{structgymbo_1_1Sym}{Sym}}. \\
\hline
{\em other} & Another symbolic expression. \\
\hline
{\em var2dist} & Map of variable index to \mbox{\hyperlink{structgymbo_1_1DiscreteDist}{Discrete\+Dist}}. \\
\hline
{\em D} & Vector of variable assignments. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
Resulting \mbox{\hyperlink{structgymbo_1_1Sym}{Sym}} based on the query. 
\end{DoxyReturn}
\mbox{\Hypertarget{structgymbo_1_1SymProb_a3bacfa903804b63ec4a4892e9d091c7a}\label{structgymbo_1_1SymProb_a3bacfa903804b63ec4a4892e9d091c7a}} 
\index{gymbo::SymProb@{gymbo::SymProb}!toString@{toString}}
\index{toString@{toString}!gymbo::SymProb@{gymbo::SymProb}}
\doxysubsubsection{\texorpdfstring{toString()}{toString()}}
{\footnotesize\ttfamily std\+::string gymbo\+::\+Sym\+Prob\+::to\+String (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [inline]}}



Converts \mbox{\hyperlink{structgymbo_1_1SymProb}{Sym\+Prob}} to a string. 

\begin{DoxyReturn}{Returns}
A string representation of the \mbox{\hyperlink{structgymbo_1_1SymProb}{Sym\+Prob}}. 
\end{DoxyReturn}


\doxysubsection{Member Data Documentation}
\mbox{\Hypertarget{structgymbo_1_1SymProb_aa103d656a1c912733a5b26b9cbf494b2}\label{structgymbo_1_1SymProb_aa103d656a1c912733a5b26b9cbf494b2}} 
\index{gymbo::SymProb@{gymbo::SymProb}!denominator@{denominator}}
\index{denominator@{denominator}!gymbo::SymProb@{gymbo::SymProb}}
\doxysubsubsection{\texorpdfstring{denominator}{denominator}}
{\footnotesize\ttfamily \mbox{\hyperlink{structgymbo_1_1Sym}{Sym}}$\ast$ gymbo\+::\+Sym\+Prob\+::denominator}

Pointer to the symbolic expression representing the denominator. \mbox{\Hypertarget{structgymbo_1_1SymProb_aa976d7a8bdc34ec4dc3d14e2c8cd2f13}\label{structgymbo_1_1SymProb_aa976d7a8bdc34ec4dc3d14e2c8cd2f13}} 
\index{gymbo::SymProb@{gymbo::SymProb}!numerator@{numerator}}
\index{numerator@{numerator}!gymbo::SymProb@{gymbo::SymProb}}
\doxysubsubsection{\texorpdfstring{numerator}{numerator}}
{\footnotesize\ttfamily \mbox{\hyperlink{structgymbo_1_1Sym}{Sym}}$\ast$ gymbo\+::\+Sym\+Prob\+::numerator}

Pointer to the symbolic expression representing the numerator. 

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