\hypertarget{binary__trees_8h}{}\doxysection{/home/steaky/git/\+CRS/src/\+Polynomials/binary\+\_\+trees.h File Reference}
\label{binary__trees_8h}\index{/home/steaky/git/CRS/src/Polynomials/binary\_trees.h@{/home/steaky/git/CRS/src/Polynomials/binary\_trees.h}}
{\ttfamily \#include $<$gmp.\+h$>$}\newline
{\ttfamily \#include $<$flint/fmpz.\+h$>$}\newline
{\ttfamily \#include $<$flint/fq.\+h$>$}\newline
{\ttfamily \#include $<$flint/fq\+\_\+poly.\+h$>$}\newline
\doxysubsection*{Classes}
\begin{DoxyCompactItemize}
\item 
struct \mbox{\hyperlink{structfq__poly__bcell__t}{fq\+\_\+poly\+\_\+bcell\+\_\+t}}
\item 
struct \mbox{\hyperlink{structfq__poly__btree__t}{fq\+\_\+poly\+\_\+btree\+\_\+t}}
\end{DoxyCompactItemize}
\doxysubsection*{Typedefs}
\begin{DoxyCompactItemize}
\item 
typedef struct \mbox{\hyperlink{structfq__poly__bcell__t}{fq\+\_\+poly\+\_\+bcell\+\_\+t}} \mbox{\hyperlink{binary__trees_8h_ae75a586c98a189f3687913f1f20ef194}{fq\+\_\+poly\+\_\+bcell\+\_\+t}}
\item 
typedef struct \mbox{\hyperlink{structfq__poly__btree__t}{fq\+\_\+poly\+\_\+btree\+\_\+t}} \mbox{\hyperlink{binary__trees_8h_aa6dffffb56a9116df27894c7390170f3}{fq\+\_\+poly\+\_\+btree\+\_\+t}}
\end{DoxyCompactItemize}
\doxysubsection*{Functions}
\begin{DoxyCompactItemize}
\item 
void \mbox{\hyperlink{binary__trees_8h_a4e5d1867ea409ed1e34a4a299ee34141}{fq\+\_\+poly\+\_\+bcell\+\_\+init}} (\mbox{\hyperlink{structfq__poly__bcell__t}{fq\+\_\+poly\+\_\+bcell\+\_\+t}} $\ast$, const fq\+\_\+ctx\+\_\+t $\ast$)
\item 
void \mbox{\hyperlink{binary__trees_8h_ae247e88d41cbb2f660c2fbf7b48de15c}{fq\+\_\+poly\+\_\+bcell\+\_\+set}} (\mbox{\hyperlink{structfq__poly__bcell__t}{fq\+\_\+poly\+\_\+bcell\+\_\+t}} $\ast$, fq\+\_\+poly\+\_\+t)
\item 
void \mbox{\hyperlink{binary__trees_8h_a0b7281007d79b0511910f7ed8f86c986}{fq\+\_\+poly\+\_\+bcell\+\_\+set\+\_\+}} (\mbox{\hyperlink{structfq__poly__bcell__t}{fq\+\_\+poly\+\_\+bcell\+\_\+t}} $\ast$, \mbox{\hyperlink{structfq__poly__bcell__t}{fq\+\_\+poly\+\_\+bcell\+\_\+t}} $\ast$, \mbox{\hyperlink{structfq__poly__bcell__t}{fq\+\_\+poly\+\_\+bcell\+\_\+t}} $\ast$, fq\+\_\+poly\+\_\+t)
\item 
int \mbox{\hyperlink{binary__trees_8h_ac73d4bb393bcd261e7309d8d5e83a696}{fq\+\_\+poly\+\_\+bcell\+\_\+set\+\_\+right}} (\mbox{\hyperlink{structfq__poly__bcell__t}{fq\+\_\+poly\+\_\+bcell\+\_\+t}} $\ast$, \mbox{\hyperlink{structfq__poly__bcell__t}{fq\+\_\+poly\+\_\+bcell\+\_\+t}} $\ast$)
\item 
int \mbox{\hyperlink{binary__trees_8h_a32ce1cdd3712aea854e541d01ee6ac36}{fq\+\_\+poly\+\_\+bcell\+\_\+set\+\_\+left}} (\mbox{\hyperlink{structfq__poly__bcell__t}{fq\+\_\+poly\+\_\+bcell\+\_\+t}} $\ast$, \mbox{\hyperlink{structfq__poly__bcell__t}{fq\+\_\+poly\+\_\+bcell\+\_\+t}} $\ast$)
\item 
void \mbox{\hyperlink{binary__trees_8h_a1f77a311cca885ec1cf98b495ee8e87f}{fq\+\_\+poly\+\_\+bcell\+\_\+clear}} (\mbox{\hyperlink{structfq__poly__bcell__t}{fq\+\_\+poly\+\_\+bcell\+\_\+t}} $\ast$)
\item 
void \mbox{\hyperlink{binary__trees_8h_a3e794b69bd0cf14ddc000daed4c29dd8}{fq\+\_\+poly\+\_\+btree\+\_\+init}} (\mbox{\hyperlink{structfq__poly__btree__t}{fq\+\_\+poly\+\_\+btree\+\_\+t}} $\ast$, const fq\+\_\+ctx\+\_\+t $\ast$)
\item 
void \mbox{\hyperlink{binary__trees_8h_a9a8917c8e2a16d64afe8c487f6eb365c}{fq\+\_\+poly\+\_\+btree\+\_\+set}} (\mbox{\hyperlink{structfq__poly__btree__t}{fq\+\_\+poly\+\_\+btree\+\_\+t}} $\ast$, \mbox{\hyperlink{structfq__poly__bcell__t}{fq\+\_\+poly\+\_\+bcell\+\_\+t}} $\ast$)
\item 
void \mbox{\hyperlink{binary__trees_8h_a2f2af1f102f06a345f4701f4f1a598a5}{fq\+\_\+poly\+\_\+btree\+\_\+clear}} (\mbox{\hyperlink{structfq__poly__btree__t}{fq\+\_\+poly\+\_\+btree\+\_\+t}} $\ast$)
\end{DoxyCompactItemize}


\doxysubsection{Typedef Documentation}
\mbox{\Hypertarget{binary__trees_8h_ae75a586c98a189f3687913f1f20ef194}\label{binary__trees_8h_ae75a586c98a189f3687913f1f20ef194}} 
\index{binary\_trees.h@{binary\_trees.h}!fq\_poly\_bcell\_t@{fq\_poly\_bcell\_t}}
\index{fq\_poly\_bcell\_t@{fq\_poly\_bcell\_t}!binary\_trees.h@{binary\_trees.h}}
\doxysubsubsection{\texorpdfstring{fq\_poly\_bcell\_t}{fq\_poly\_bcell\_t}}
{\footnotesize\ttfamily typedef struct \mbox{\hyperlink{structfq__poly__bcell__t}{fq\+\_\+poly\+\_\+bcell\+\_\+t}} \mbox{\hyperlink{structfq__poly__bcell__t}{fq\+\_\+poly\+\_\+bcell\+\_\+t}}}

Representation of binary links with fq\+\_\+poly as nodes. \mbox{\Hypertarget{binary__trees_8h_aa6dffffb56a9116df27894c7390170f3}\label{binary__trees_8h_aa6dffffb56a9116df27894c7390170f3}} 
\index{binary\_trees.h@{binary\_trees.h}!fq\_poly\_btree\_t@{fq\_poly\_btree\_t}}
\index{fq\_poly\_btree\_t@{fq\_poly\_btree\_t}!binary\_trees.h@{binary\_trees.h}}
\doxysubsubsection{\texorpdfstring{fq\_poly\_btree\_t}{fq\_poly\_btree\_t}}
{\footnotesize\ttfamily typedef struct \mbox{\hyperlink{structfq__poly__btree__t}{fq\+\_\+poly\+\_\+btree\+\_\+t}} \mbox{\hyperlink{structfq__poly__btree__t}{fq\+\_\+poly\+\_\+btree\+\_\+t}}}

Representation of binary tree with \mbox{\hyperlink{structfq__poly__bcell__t}{fq\+\_\+poly\+\_\+bcell\+\_\+t}} nodes. 

\doxysubsection{Function Documentation}
\mbox{\Hypertarget{binary__trees_8h_a1f77a311cca885ec1cf98b495ee8e87f}\label{binary__trees_8h_a1f77a311cca885ec1cf98b495ee8e87f}} 
\index{binary\_trees.h@{binary\_trees.h}!fq\_poly\_bcell\_clear@{fq\_poly\_bcell\_clear}}
\index{fq\_poly\_bcell\_clear@{fq\_poly\_bcell\_clear}!binary\_trees.h@{binary\_trees.h}}
\doxysubsubsection{\texorpdfstring{fq\_poly\_bcell\_clear()}{fq\_poly\_bcell\_clear()}}
{\footnotesize\ttfamily void fq\+\_\+poly\+\_\+bcell\+\_\+clear (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{structfq__poly__bcell__t}{fq\+\_\+poly\+\_\+bcell\+\_\+t}} $\ast$}]{b }\end{DoxyParamCaption})}

Recursively clears the given bcell, releasing any memory used. It must be reinitialised in order to be used again. \mbox{\Hypertarget{binary__trees_8h_a4e5d1867ea409ed1e34a4a299ee34141}\label{binary__trees_8h_a4e5d1867ea409ed1e34a4a299ee34141}} 
\index{binary\_trees.h@{binary\_trees.h}!fq\_poly\_bcell\_init@{fq\_poly\_bcell\_init}}
\index{fq\_poly\_bcell\_init@{fq\_poly\_bcell\_init}!binary\_trees.h@{binary\_trees.h}}
\doxysubsubsection{\texorpdfstring{fq\_poly\_bcell\_init()}{fq\_poly\_bcell\_init()}}
{\footnotesize\ttfamily void fq\+\_\+poly\+\_\+bcell\+\_\+init (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{structfq__poly__bcell__t}{fq\+\_\+poly\+\_\+bcell\+\_\+t}} $\ast$}]{b,  }\item[{const fq\+\_\+ctx\+\_\+t $\ast$}]{F }\end{DoxyParamCaption})}

Initializes b for use, with context F, and setting its childs to NULL. A corresponding call to \mbox{\hyperlink{binary__trees_8c_a429a740be5fa4442e79ff1194bc744cd}{fq\+\_\+poly\+\_\+bcell\+\_\+clear()}} must be made after finishing with the \mbox{\hyperlink{structfq__poly__bcell__t}{fq\+\_\+poly\+\_\+bcell\+\_\+t}} to free the memory used by the cell. \mbox{\Hypertarget{binary__trees_8h_ae247e88d41cbb2f660c2fbf7b48de15c}\label{binary__trees_8h_ae247e88d41cbb2f660c2fbf7b48de15c}} 
\index{binary\_trees.h@{binary\_trees.h}!fq\_poly\_bcell\_set@{fq\_poly\_bcell\_set}}
\index{fq\_poly\_bcell\_set@{fq\_poly\_bcell\_set}!binary\_trees.h@{binary\_trees.h}}
\doxysubsubsection{\texorpdfstring{fq\_poly\_bcell\_set()}{fq\_poly\_bcell\_set()}}
{\footnotesize\ttfamily void fq\+\_\+poly\+\_\+bcell\+\_\+set (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{structfq__poly__bcell__t}{fq\+\_\+poly\+\_\+bcell\+\_\+t}} $\ast$}]{b,  }\item[{fq\+\_\+poly\+\_\+t}]{p }\end{DoxyParamCaption})}

Sets b to bcell with data p. \mbox{\Hypertarget{binary__trees_8h_a0b7281007d79b0511910f7ed8f86c986}\label{binary__trees_8h_a0b7281007d79b0511910f7ed8f86c986}} 
\index{binary\_trees.h@{binary\_trees.h}!fq\_poly\_bcell\_set\_@{fq\_poly\_bcell\_set\_}}
\index{fq\_poly\_bcell\_set\_@{fq\_poly\_bcell\_set\_}!binary\_trees.h@{binary\_trees.h}}
\doxysubsubsection{\texorpdfstring{fq\_poly\_bcell\_set\_()}{fq\_poly\_bcell\_set\_()}}
{\footnotesize\ttfamily void fq\+\_\+poly\+\_\+bcell\+\_\+set\+\_\+ (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{structfq__poly__bcell__t}{fq\+\_\+poly\+\_\+bcell\+\_\+t}} $\ast$}]{b,  }\item[{\mbox{\hyperlink{structfq__poly__bcell__t}{fq\+\_\+poly\+\_\+bcell\+\_\+t}} $\ast$}]{left,  }\item[{\mbox{\hyperlink{structfq__poly__bcell__t}{fq\+\_\+poly\+\_\+bcell\+\_\+t}} $\ast$}]{right,  }\item[{fq\+\_\+poly\+\_\+t}]{p }\end{DoxyParamCaption})}

Sets b to bcell with data p and childs left/right. \mbox{\Hypertarget{binary__trees_8h_a32ce1cdd3712aea854e541d01ee6ac36}\label{binary__trees_8h_a32ce1cdd3712aea854e541d01ee6ac36}} 
\index{binary\_trees.h@{binary\_trees.h}!fq\_poly\_bcell\_set\_left@{fq\_poly\_bcell\_set\_left}}
\index{fq\_poly\_bcell\_set\_left@{fq\_poly\_bcell\_set\_left}!binary\_trees.h@{binary\_trees.h}}
\doxysubsubsection{\texorpdfstring{fq\_poly\_bcell\_set\_left()}{fq\_poly\_bcell\_set\_left()}}
{\footnotesize\ttfamily int fq\+\_\+poly\+\_\+bcell\+\_\+set\+\_\+left (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{structfq__poly__bcell__t}{fq\+\_\+poly\+\_\+bcell\+\_\+t}} $\ast$}]{b1,  }\item[{\mbox{\hyperlink{structfq__poly__bcell__t}{fq\+\_\+poly\+\_\+bcell\+\_\+t}} $\ast$}]{b2 }\end{DoxyParamCaption})}

Sets left child of b1 to b2. Returns -\/1 if b1 already has a left child. \mbox{\Hypertarget{binary__trees_8h_ac73d4bb393bcd261e7309d8d5e83a696}\label{binary__trees_8h_ac73d4bb393bcd261e7309d8d5e83a696}} 
\index{binary\_trees.h@{binary\_trees.h}!fq\_poly\_bcell\_set\_right@{fq\_poly\_bcell\_set\_right}}
\index{fq\_poly\_bcell\_set\_right@{fq\_poly\_bcell\_set\_right}!binary\_trees.h@{binary\_trees.h}}
\doxysubsubsection{\texorpdfstring{fq\_poly\_bcell\_set\_right()}{fq\_poly\_bcell\_set\_right()}}
{\footnotesize\ttfamily int fq\+\_\+poly\+\_\+bcell\+\_\+set\+\_\+right (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{structfq__poly__bcell__t}{fq\+\_\+poly\+\_\+bcell\+\_\+t}} $\ast$}]{b1,  }\item[{\mbox{\hyperlink{structfq__poly__bcell__t}{fq\+\_\+poly\+\_\+bcell\+\_\+t}} $\ast$}]{b2 }\end{DoxyParamCaption})}

Sets right child of b1 to b2. Returns -\/1 if b1 already has a right child. \mbox{\Hypertarget{binary__trees_8h_a2f2af1f102f06a345f4701f4f1a598a5}\label{binary__trees_8h_a2f2af1f102f06a345f4701f4f1a598a5}} 
\index{binary\_trees.h@{binary\_trees.h}!fq\_poly\_btree\_clear@{fq\_poly\_btree\_clear}}
\index{fq\_poly\_btree\_clear@{fq\_poly\_btree\_clear}!binary\_trees.h@{binary\_trees.h}}
\doxysubsubsection{\texorpdfstring{fq\_poly\_btree\_clear()}{fq\_poly\_btree\_clear()}}
{\footnotesize\ttfamily void fq\+\_\+poly\+\_\+btree\+\_\+clear (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{structfq__poly__btree__t}{fq\+\_\+poly\+\_\+btree\+\_\+t}} $\ast$}]{t }\end{DoxyParamCaption})}

Recursively clears the given tree and its bcells, releasing any memory used. It must be reinitialised in order to be used again. \mbox{\Hypertarget{binary__trees_8h_a3e794b69bd0cf14ddc000daed4c29dd8}\label{binary__trees_8h_a3e794b69bd0cf14ddc000daed4c29dd8}} 
\index{binary\_trees.h@{binary\_trees.h}!fq\_poly\_btree\_init@{fq\_poly\_btree\_init}}
\index{fq\_poly\_btree\_init@{fq\_poly\_btree\_init}!binary\_trees.h@{binary\_trees.h}}
\doxysubsubsection{\texorpdfstring{fq\_poly\_btree\_init()}{fq\_poly\_btree\_init()}}
{\footnotesize\ttfamily void fq\+\_\+poly\+\_\+btree\+\_\+init (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{structfq__poly__btree__t}{fq\+\_\+poly\+\_\+btree\+\_\+t}} $\ast$}]{t,  }\item[{const fq\+\_\+ctx\+\_\+t $\ast$}]{F }\end{DoxyParamCaption})}

Initializes t for use, with context F. A corresponding call to \mbox{\hyperlink{binary__trees_8c_ad4f461907c7a5161bd9198456fe678a6}{fq\+\_\+poly\+\_\+btree\+\_\+clear()}} must be made after finishing with the \mbox{\hyperlink{structfq__poly__btree__t}{fq\+\_\+poly\+\_\+btree\+\_\+t}} to free the memory used by the tree. \mbox{\Hypertarget{binary__trees_8h_a9a8917c8e2a16d64afe8c487f6eb365c}\label{binary__trees_8h_a9a8917c8e2a16d64afe8c487f6eb365c}} 
\index{binary\_trees.h@{binary\_trees.h}!fq\_poly\_btree\_set@{fq\_poly\_btree\_set}}
\index{fq\_poly\_btree\_set@{fq\_poly\_btree\_set}!binary\_trees.h@{binary\_trees.h}}
\doxysubsubsection{\texorpdfstring{fq\_poly\_btree\_set()}{fq\_poly\_btree\_set()}}
{\footnotesize\ttfamily void fq\+\_\+poly\+\_\+btree\+\_\+set (\begin{DoxyParamCaption}\item[{\mbox{\hyperlink{structfq__poly__btree__t}{fq\+\_\+poly\+\_\+btree\+\_\+t}} $\ast$}]{t,  }\item[{\mbox{\hyperlink{structfq__poly__bcell__t}{fq\+\_\+poly\+\_\+bcell\+\_\+t}} $\ast$}]{b }\end{DoxyParamCaption})}

Sets t to tree with head bcell b. TODO\+: check ctx 