NASFAQ/CRS_final/doc/latex/binary__trees_8c.tex
hoguchi live 541f86904e Init sync
2022-02-13 20:50:50 +01:00

82 lines
10 KiB
TeX

\hypertarget{binary__trees_8c}{}\doxysection{/home/steaky/git/\+CRS/src/\+Polynomials/binary\+\_\+trees.c File Reference}
\label{binary__trees_8c}\index{/home/steaky/git/CRS/src/Polynomials/binary\_trees.c@{/home/steaky/git/CRS/src/Polynomials/binary\_trees.c}}
{\ttfamily \#include \char`\"{}binary\+\_\+trees.\+h\char`\"{}}\newline
\doxysubsection*{Functions}
\begin{DoxyCompactItemize}
\item
void \mbox{\hyperlink{binary__trees_8c_acaf3b0057f2bf2fd482ef620b715b748}{fq\+\_\+poly\+\_\+bcell\+\_\+init}} (\mbox{\hyperlink{structfq__poly__bcell__t}{fq\+\_\+poly\+\_\+bcell\+\_\+t}} $\ast$b, const fq\+\_\+ctx\+\_\+t $\ast$F)
\item
void \mbox{\hyperlink{binary__trees_8c_a1d9ddf45a1c9803287161572112eb6fc}{fq\+\_\+poly\+\_\+bcell\+\_\+set}} (\mbox{\hyperlink{structfq__poly__bcell__t}{fq\+\_\+poly\+\_\+bcell\+\_\+t}} $\ast$b, fq\+\_\+poly\+\_\+t p)
\item
void \mbox{\hyperlink{binary__trees_8c_ada883f68fb9d296f8ff14f62c5204e0b}{fq\+\_\+poly\+\_\+bcell\+\_\+set\+\_\+}} (\mbox{\hyperlink{structfq__poly__bcell__t}{fq\+\_\+poly\+\_\+bcell\+\_\+t}} $\ast$b, \mbox{\hyperlink{structfq__poly__bcell__t}{fq\+\_\+poly\+\_\+bcell\+\_\+t}} $\ast$left, \mbox{\hyperlink{structfq__poly__bcell__t}{fq\+\_\+poly\+\_\+bcell\+\_\+t}} $\ast$right, fq\+\_\+poly\+\_\+t p)
\item
int \mbox{\hyperlink{binary__trees_8c_a0c7b40453a879330b6b3898fb9762faa}{fq\+\_\+poly\+\_\+bcell\+\_\+set\+\_\+right}} (\mbox{\hyperlink{structfq__poly__bcell__t}{fq\+\_\+poly\+\_\+bcell\+\_\+t}} $\ast$b1, \mbox{\hyperlink{structfq__poly__bcell__t}{fq\+\_\+poly\+\_\+bcell\+\_\+t}} $\ast$b2)
\item
int \mbox{\hyperlink{binary__trees_8c_ab720f3392d5501ff4b359f78af4c53f2}{fq\+\_\+poly\+\_\+bcell\+\_\+set\+\_\+left}} (\mbox{\hyperlink{structfq__poly__bcell__t}{fq\+\_\+poly\+\_\+bcell\+\_\+t}} $\ast$b1, \mbox{\hyperlink{structfq__poly__bcell__t}{fq\+\_\+poly\+\_\+bcell\+\_\+t}} $\ast$b2)
\item
void \mbox{\hyperlink{binary__trees_8c_a429a740be5fa4442e79ff1194bc744cd}{fq\+\_\+poly\+\_\+bcell\+\_\+clear}} (\mbox{\hyperlink{structfq__poly__bcell__t}{fq\+\_\+poly\+\_\+bcell\+\_\+t}} $\ast$b)
\item
void \mbox{\hyperlink{binary__trees_8c_a0299a1789753dc35c04faeed3435ed38}{fq\+\_\+poly\+\_\+btree\+\_\+init}} (\mbox{\hyperlink{structfq__poly__btree__t}{fq\+\_\+poly\+\_\+btree\+\_\+t}} $\ast$t, const fq\+\_\+ctx\+\_\+t $\ast$F)
\item
void \mbox{\hyperlink{binary__trees_8c_abca4b128c69fcb378bc00d671cbc5a18}{fq\+\_\+poly\+\_\+btree\+\_\+set}} (\mbox{\hyperlink{structfq__poly__btree__t}{fq\+\_\+poly\+\_\+btree\+\_\+t}} $\ast$t, \mbox{\hyperlink{structfq__poly__bcell__t}{fq\+\_\+poly\+\_\+bcell\+\_\+t}} $\ast$b)
\item
void \mbox{\hyperlink{binary__trees_8c_ad4f461907c7a5161bd9198456fe678a6}{fq\+\_\+poly\+\_\+btree\+\_\+clear}} (\mbox{\hyperlink{structfq__poly__btree__t}{fq\+\_\+poly\+\_\+btree\+\_\+t}} $\ast$t)
\end{DoxyCompactItemize}
\doxysubsection{Function Documentation}
\mbox{\Hypertarget{binary__trees_8c_a429a740be5fa4442e79ff1194bc744cd}\label{binary__trees_8c_a429a740be5fa4442e79ff1194bc744cd}}
\index{binary\_trees.c@{binary\_trees.c}!fq\_poly\_bcell\_clear@{fq\_poly\_bcell\_clear}}
\index{fq\_poly\_bcell\_clear@{fq\_poly\_bcell\_clear}!binary\_trees.c@{binary\_trees.c}}
\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_8c_acaf3b0057f2bf2fd482ef620b715b748}\label{binary__trees_8c_acaf3b0057f2bf2fd482ef620b715b748}}
\index{binary\_trees.c@{binary\_trees.c}!fq\_poly\_bcell\_init@{fq\_poly\_bcell\_init}}
\index{fq\_poly\_bcell\_init@{fq\_poly\_bcell\_init}!binary\_trees.c@{binary\_trees.c}}
\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_8c_a1d9ddf45a1c9803287161572112eb6fc}\label{binary__trees_8c_a1d9ddf45a1c9803287161572112eb6fc}}
\index{binary\_trees.c@{binary\_trees.c}!fq\_poly\_bcell\_set@{fq\_poly\_bcell\_set}}
\index{fq\_poly\_bcell\_set@{fq\_poly\_bcell\_set}!binary\_trees.c@{binary\_trees.c}}
\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_8c_ada883f68fb9d296f8ff14f62c5204e0b}\label{binary__trees_8c_ada883f68fb9d296f8ff14f62c5204e0b}}
\index{binary\_trees.c@{binary\_trees.c}!fq\_poly\_bcell\_set\_@{fq\_poly\_bcell\_set\_}}
\index{fq\_poly\_bcell\_set\_@{fq\_poly\_bcell\_set\_}!binary\_trees.c@{binary\_trees.c}}
\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_8c_ab720f3392d5501ff4b359f78af4c53f2}\label{binary__trees_8c_ab720f3392d5501ff4b359f78af4c53f2}}
\index{binary\_trees.c@{binary\_trees.c}!fq\_poly\_bcell\_set\_left@{fq\_poly\_bcell\_set\_left}}
\index{fq\_poly\_bcell\_set\_left@{fq\_poly\_bcell\_set\_left}!binary\_trees.c@{binary\_trees.c}}
\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_8c_a0c7b40453a879330b6b3898fb9762faa}\label{binary__trees_8c_a0c7b40453a879330b6b3898fb9762faa}}
\index{binary\_trees.c@{binary\_trees.c}!fq\_poly\_bcell\_set\_right@{fq\_poly\_bcell\_set\_right}}
\index{fq\_poly\_bcell\_set\_right@{fq\_poly\_bcell\_set\_right}!binary\_trees.c@{binary\_trees.c}}
\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_8c_ad4f461907c7a5161bd9198456fe678a6}\label{binary__trees_8c_ad4f461907c7a5161bd9198456fe678a6}}
\index{binary\_trees.c@{binary\_trees.c}!fq\_poly\_btree\_clear@{fq\_poly\_btree\_clear}}
\index{fq\_poly\_btree\_clear@{fq\_poly\_btree\_clear}!binary\_trees.c@{binary\_trees.c}}
\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_8c_a0299a1789753dc35c04faeed3435ed38}\label{binary__trees_8c_a0299a1789753dc35c04faeed3435ed38}}
\index{binary\_trees.c@{binary\_trees.c}!fq\_poly\_btree\_init@{fq\_poly\_btree\_init}}
\index{fq\_poly\_btree\_init@{fq\_poly\_btree\_init}!binary\_trees.c@{binary\_trees.c}}
\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_8c_abca4b128c69fcb378bc00d671cbc5a18}\label{binary__trees_8c_abca4b128c69fcb378bc00d671cbc5a18}}
\index{binary\_trees.c@{binary\_trees.c}!fq\_poly\_btree\_set@{fq\_poly\_btree\_set}}
\index{fq\_poly\_btree\_set@{fq\_poly\_btree\_set}!binary\_trees.c@{binary\_trees.c}}
\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