\hypertarget{classpoly}{}\doxysection{poly Class Reference}
\label{classpoly}\index{poly@{poly}}
\doxysubsection*{Public Member Functions}
\begin{DoxyCompactItemize}
\item 
\mbox{\Hypertarget{classpoly_a248765f11147bd540f25264f4735e0ef}\label{classpoly_a248765f11147bd540f25264f4735e0ef}} 
{\bfseries poly} (PHEAD int, WORD=-\/1, WORD=1)
\item 
\mbox{\Hypertarget{classpoly_aac65a882ba8ecca6b2cdf30c265716ea}\label{classpoly_aac65a882ba8ecca6b2cdf30c265716ea}} 
{\bfseries poly} (PHEAD const UWORD $\ast$, WORD, WORD=-\/1, WORD=1)
\item 
\mbox{\Hypertarget{classpoly_a1a4374036af91fd1ae7ce91ac76016be}\label{classpoly_a1a4374036af91fd1ae7ce91ac76016be}} 
{\bfseries poly} (const \mbox{\hyperlink{classpoly}{poly}} \&, WORD=-\/1, WORD=1)
\item 
\mbox{\Hypertarget{classpoly_ab3dbab60ffdcf4a1b2e904063c866cc4}\label{classpoly_ab3dbab60ffdcf4a1b2e904063c866cc4}} 
\mbox{\hyperlink{classpoly}{poly}} \& {\bfseries operator+=} (const \mbox{\hyperlink{classpoly}{poly}} \&)
\item 
\mbox{\Hypertarget{classpoly_ae02c5dd79c2822ca241228ce47b03355}\label{classpoly_ae02c5dd79c2822ca241228ce47b03355}} 
\mbox{\hyperlink{classpoly}{poly}} \& {\bfseries operator-\/=} (const \mbox{\hyperlink{classpoly}{poly}} \&)
\item 
\mbox{\Hypertarget{classpoly_a2fc8b159279f014e5ae8bf3b0b6810ae}\label{classpoly_a2fc8b159279f014e5ae8bf3b0b6810ae}} 
\mbox{\hyperlink{classpoly}{poly}} \& {\bfseries operator$\ast$=} (const \mbox{\hyperlink{classpoly}{poly}} \&)
\item 
\mbox{\Hypertarget{classpoly_ae37cadbf0dfd7ebda316fd530a89f57c}\label{classpoly_ae37cadbf0dfd7ebda316fd530a89f57c}} 
\mbox{\hyperlink{classpoly}{poly}} \& {\bfseries operator/=} (const \mbox{\hyperlink{classpoly}{poly}} \&)
\item 
\mbox{\Hypertarget{classpoly_abdd1b2af63a3b02a113153f9a7edd532}\label{classpoly_abdd1b2af63a3b02a113153f9a7edd532}} 
\mbox{\hyperlink{classpoly}{poly}} \& {\bfseries operator\%=} (const \mbox{\hyperlink{classpoly}{poly}} \&)
\item 
\mbox{\Hypertarget{classpoly_afc0c357a3b64b50add2476ab1c59563c}\label{classpoly_afc0c357a3b64b50add2476ab1c59563c}} 
const \mbox{\hyperlink{classpoly}{poly}} {\bfseries operator+} (const \mbox{\hyperlink{classpoly}{poly}} \&) const
\item 
\mbox{\Hypertarget{classpoly_a71dd99abb6d40f5e2bc55738c7c4484e}\label{classpoly_a71dd99abb6d40f5e2bc55738c7c4484e}} 
const \mbox{\hyperlink{classpoly}{poly}} {\bfseries operator-\/} (const \mbox{\hyperlink{classpoly}{poly}} \&) const
\item 
\mbox{\Hypertarget{classpoly_abd55555840896dfa90be32f6955bae2c}\label{classpoly_abd55555840896dfa90be32f6955bae2c}} 
const \mbox{\hyperlink{classpoly}{poly}} {\bfseries operator$\ast$} (const \mbox{\hyperlink{classpoly}{poly}} \&) const
\item 
\mbox{\Hypertarget{classpoly_aae4715bb104907f7cb7f46233b1c95c9}\label{classpoly_aae4715bb104907f7cb7f46233b1c95c9}} 
const \mbox{\hyperlink{classpoly}{poly}} {\bfseries operator/} (const \mbox{\hyperlink{classpoly}{poly}} \&) const
\item 
\mbox{\Hypertarget{classpoly_ab1314c111ec2b4e2704d0953544f5942}\label{classpoly_ab1314c111ec2b4e2704d0953544f5942}} 
const \mbox{\hyperlink{classpoly}{poly}} {\bfseries operator\%} (const \mbox{\hyperlink{classpoly}{poly}} \&) const
\item 
\mbox{\Hypertarget{classpoly_a58b3133305c93e0810d209a79674e764}\label{classpoly_a58b3133305c93e0810d209a79674e764}} 
bool {\bfseries operator==} (const \mbox{\hyperlink{classpoly}{poly}} \&) const
\item 
\mbox{\Hypertarget{classpoly_a4e301bba42d566c19ff0be893ad1d3d3}\label{classpoly_a4e301bba42d566c19ff0be893ad1d3d3}} 
bool {\bfseries operator!=} (const \mbox{\hyperlink{classpoly}{poly}} \&) const
\item 
\mbox{\Hypertarget{classpoly_a50fe2b50afd8dbf3c052d561c9953a16}\label{classpoly_a50fe2b50afd8dbf3c052d561c9953a16}} 
\mbox{\hyperlink{classpoly}{poly}} \& {\bfseries operator=} (const \mbox{\hyperlink{classpoly}{poly}} \&)
\item 
\mbox{\Hypertarget{classpoly_a04aefdac16be83a57fd30f2406665269}\label{classpoly_a04aefdac16be83a57fd30f2406665269}} 
WORD \& {\bfseries operator\mbox{[}$\,$\mbox{]}} (int)
\item 
\mbox{\Hypertarget{classpoly_a560555e5922b66f9a51d401c61f7a859}\label{classpoly_a560555e5922b66f9a51d401c61f7a859}} 
const WORD \& {\bfseries operator\mbox{[}$\,$\mbox{]}} (int) const
\item 
\mbox{\Hypertarget{classpoly_ad07c3592afad265fa45986fbe027b3c3}\label{classpoly_ad07c3592afad265fa45986fbe027b3c3}} 
void {\bfseries termscopy} (const WORD $\ast$, int, int)
\item 
\mbox{\Hypertarget{classpoly_a17a80397bc6bed3d62e11727393e0829}\label{classpoly_a17a80397bc6bed3d62e11727393e0829}} 
void {\bfseries check\+\_\+memory} (int)
\item 
\mbox{\Hypertarget{classpoly_a5a7d3d7bb2ecbcd4a352f26a5be9d3fa}\label{classpoly_a5a7d3d7bb2ecbcd4a352f26a5be9d3fa}} 
void {\bfseries expand\+\_\+memory} (int)
\item 
\mbox{\Hypertarget{classpoly_a8a238092426fc3f76fc716f5747a9a42}\label{classpoly_a8a238092426fc3f76fc716f5747a9a42}} 
bool {\bfseries is\+\_\+zero} () const
\item 
\mbox{\Hypertarget{classpoly_abafd516366bc07b4893867c327f7d62e}\label{classpoly_abafd516366bc07b4893867c327f7d62e}} 
bool {\bfseries is\+\_\+one} () const
\item 
\mbox{\Hypertarget{classpoly_a606541a0a88094cd9f180745f4fa1c63}\label{classpoly_a606541a0a88094cd9f180745f4fa1c63}} 
bool {\bfseries is\+\_\+integer} () const
\item 
\mbox{\Hypertarget{classpoly_a7f5e9b94407dbf1535488bfdc866f022}\label{classpoly_a7f5e9b94407dbf1535488bfdc866f022}} 
bool {\bfseries is\+\_\+monomial} () const
\item 
int \mbox{\hyperlink{classpoly_a115c36c7cb42135c7fcb31e1d4cc591f}{is\+\_\+dense\+\_\+univariate}} () const
\item 
\mbox{\Hypertarget{classpoly_ada26f33aa164d1e2f03c85be0449fb42}\label{classpoly_ada26f33aa164d1e2f03c85be0449fb42}} 
int {\bfseries sign} () const
\item 
\mbox{\Hypertarget{classpoly_af545046960caafab0b1214fa077d104b}\label{classpoly_af545046960caafab0b1214fa077d104b}} 
int {\bfseries degree} (int) const
\item 
\mbox{\Hypertarget{classpoly_a13a93c4bb8296415a0efcd6972de2c80}\label{classpoly_a13a93c4bb8296415a0efcd6972de2c80}} 
int {\bfseries total\+\_\+degree} () const
\item 
\mbox{\Hypertarget{classpoly_aa0db3ab3305b65e2edf5808cde31f420}\label{classpoly_aa0db3ab3305b65e2edf5808cde31f420}} 
int {\bfseries first\+\_\+variable} () const
\item 
\mbox{\Hypertarget{classpoly_afdb70acd26f6464eb4892ff0cfddbc3b}\label{classpoly_afdb70acd26f6464eb4892ff0cfddbc3b}} 
int {\bfseries number\+\_\+of\+\_\+terms} () const
\item 
\mbox{\Hypertarget{classpoly_ab2d3d611290155d0e41674d0543ca3f3}\label{classpoly_ab2d3d611290155d0e41674d0543ca3f3}} 
const std\+::vector$<$ int $>$ {\bfseries all\+\_\+variables} () const
\item 
\mbox{\Hypertarget{classpoly_ab1bc5497a4a97150e3d164b5f4bd4ded}\label{classpoly_ab1bc5497a4a97150e3d164b5f4bd4ded}} 
const \mbox{\hyperlink{classpoly}{poly}} {\bfseries integer\+\_\+lcoeff} () const
\item 
\mbox{\Hypertarget{classpoly_aa124b19f73ef40ba8c847f03dec57222}\label{classpoly_aa124b19f73ef40ba8c847f03dec57222}} 
const \mbox{\hyperlink{classpoly}{poly}} {\bfseries lcoeff\+\_\+univar} (int) const
\item 
\mbox{\Hypertarget{classpoly_a6438fd416b1e9a6e24afb1303aff0746}\label{classpoly_a6438fd416b1e9a6e24afb1303aff0746}} 
const \mbox{\hyperlink{classpoly}{poly}} {\bfseries lcoeff\+\_\+multivar} (int) const
\item 
\mbox{\Hypertarget{classpoly_abcfb549044fed82475a6fb3fc2c5f97a}\label{classpoly_abcfb549044fed82475a6fb3fc2c5f97a}} 
const \mbox{\hyperlink{classpoly}{poly}} {\bfseries coefficient} (int, int) const
\item 
\mbox{\Hypertarget{classpoly_a158492e7ead33728510f3b86886ceb23}\label{classpoly_a158492e7ead33728510f3b86886ceb23}} 
const \mbox{\hyperlink{classpoly}{poly}} {\bfseries derivative} (int) const
\item 
\mbox{\Hypertarget{classpoly_a4be35b22d90185173cd31ea244ca6bac}\label{classpoly_a4be35b22d90185173cd31ea244ca6bac}} 
void {\bfseries setmod} (WORD, WORD=1)
\item 
\mbox{\Hypertarget{classpoly_a91917f00348e4180e48e7035f4f8b8be}\label{classpoly_a91917f00348e4180e48e7035f4f8b8be}} 
void {\bfseries coefficients\+\_\+modulo} (UWORD $\ast$, WORD, bool)
\item 
\mbox{\Hypertarget{classpoly_ac57e6526876e154e815db53c5e29dada}\label{classpoly_ac57e6526876e154e815db53c5e29dada}} 
int {\bfseries size\+\_\+of\+\_\+form\+\_\+notation} () const
\item 
\mbox{\Hypertarget{classpoly_adb9e3fe2e14efa9d138f9e8868f8f1b3}\label{classpoly_adb9e3fe2e14efa9d138f9e8868f8f1b3}} 
int {\bfseries size\+\_\+of\+\_\+form\+\_\+notation\+\_\+with\+\_\+den} (WORD) const
\item 
\mbox{\Hypertarget{classpoly_a0e9cd9fc03b082c19957d44d4ecda65e}\label{classpoly_a0e9cd9fc03b082c19957d44d4ecda65e}} 
const \mbox{\hyperlink{classpoly}{poly}} \& {\bfseries normalize} ()
\item 
\mbox{\Hypertarget{classpoly_a98cd6e8107691d07a3a01b49a3d7276b}\label{classpoly_a98cd6e8107691d07a3a01b49a3d7276b}} 
const std\+::string {\bfseries to\+\_\+string} () const
\item 
\mbox{\Hypertarget{classpoly_a14b9294009437c07fc01ac95b66311ee}\label{classpoly_a14b9294009437c07fc01ac95b66311ee}} 
WORD {\bfseries last\+\_\+monomial\+\_\+index} () const
\item 
\mbox{\Hypertarget{classpoly_adad080582369ed6366f3db298859eec1}\label{classpoly_adad080582369ed6366f3db298859eec1}} 
WORD $\ast$ {\bfseries last\+\_\+monomial} () const
\item 
\mbox{\Hypertarget{classpoly_a74d5aa6fb856f7f4c5f1f66a5afb37a1}\label{classpoly_a74d5aa6fb856f7f4c5f1f66a5afb37a1}} 
int {\bfseries compare\+\_\+degree\+\_\+vector} (const \mbox{\hyperlink{classpoly}{poly}} \&) const
\item 
\mbox{\Hypertarget{classpoly_a2991f9bd6bbef42e4d407be67a3b207a}\label{classpoly_a2991f9bd6bbef42e4d407be67a3b207a}} 
std\+::vector$<$ int $>$ {\bfseries degree\+\_\+vector} () const
\item 
\mbox{\Hypertarget{classpoly_a020add657798647e9324b6a1298537c7}\label{classpoly_a020add657798647e9324b6a1298537c7}} 
int {\bfseries compare\+\_\+degree\+\_\+vector} (const std\+::vector$<$ int $>$ \&) const
\end{DoxyCompactItemize}
\doxysubsection*{Static Public Member Functions}
\begin{DoxyCompactItemize}
\item 
\mbox{\Hypertarget{classpoly_a1215390de139ccd076248154e30d80bf}\label{classpoly_a1215390de139ccd076248154e30d80bf}} 
static const \mbox{\hyperlink{classpoly}{poly}} {\bfseries simple\+\_\+poly} (PHEAD int, int=0, int=1, int=0, int=1)
\item 
\mbox{\Hypertarget{classpoly_a9447bb703f848acecce91ceb5000af7c}\label{classpoly_a9447bb703f848acecce91ceb5000af7c}} 
static const \mbox{\hyperlink{classpoly}{poly}} {\bfseries simple\+\_\+poly} (PHEAD int, const \mbox{\hyperlink{classpoly}{poly}} \&, int=1, int=0, int=1)
\item 
\mbox{\Hypertarget{classpoly_a5278de6cc8bcc63da4ce8661e8820ff3}\label{classpoly_a5278de6cc8bcc63da4ce8661e8820ff3}} 
static void {\bfseries get\+\_\+variables} (PHEAD std\+::vector$<$ WORD $\ast$ $>$, bool, bool)
\item 
\mbox{\Hypertarget{classpoly_a53b1bc2395880e0f84ca4ae30ae2ef01}\label{classpoly_a53b1bc2395880e0f84ca4ae30ae2ef01}} 
static const \mbox{\hyperlink{classpoly}{poly}} {\bfseries argument\+\_\+to\+\_\+poly} (PHEAD WORD $\ast$, bool, bool, \mbox{\hyperlink{classpoly}{poly}} $\ast$den=NULL)
\item 
\mbox{\Hypertarget{classpoly_a202879b39fe3d7b0dc6cbf02dfa19092}\label{classpoly_a202879b39fe3d7b0dc6cbf02dfa19092}} 
static void {\bfseries poly\+\_\+to\+\_\+argument} (const \mbox{\hyperlink{classpoly}{poly}} \&, WORD $\ast$, bool)
\item 
\mbox{\Hypertarget{classpoly_a99d25906cd841986d5a99e0f4bbfe591}\label{classpoly_a99d25906cd841986d5a99e0f4bbfe591}} 
static void {\bfseries poly\+\_\+to\+\_\+argument\+\_\+with\+\_\+den} (const \mbox{\hyperlink{classpoly}{poly}} \&, WORD, const UWORD $\ast$, WORD $\ast$, bool)
\item 
\mbox{\Hypertarget{classpoly_aabbf440b63052c0748ecab03b95602c6}\label{classpoly_aabbf440b63052c0748ecab03b95602c6}} 
static const \mbox{\hyperlink{classpoly}{poly}} {\bfseries from\+\_\+coefficient\+\_\+list} (PHEAD const std\+::vector$<$ WORD $>$ \&, int, WORD)
\item 
\mbox{\Hypertarget{classpoly_ac3935252869eab5464994b597a57a053}\label{classpoly_ac3935252869eab5464994b597a57a053}} 
static const std\+::vector$<$ WORD $>$ {\bfseries to\+\_\+coefficient\+\_\+list} (const \mbox{\hyperlink{classpoly}{poly}} \&)
\item 
\mbox{\Hypertarget{classpoly_a9a21d694eb2458e1624b00b0a1024a8e}\label{classpoly_a9a21d694eb2458e1624b00b0a1024a8e}} 
static const std\+::vector$<$ WORD $>$ {\bfseries coefficient\+\_\+list\+\_\+divmod} (const std\+::vector$<$ WORD $>$ \&, const std\+::vector$<$ WORD $>$ \&, WORD, int)
\item 
\mbox{\Hypertarget{classpoly_aff0693768a6a56b3d76a2f1c696e4ea6}\label{classpoly_aff0693768a6a56b3d76a2f1c696e4ea6}} 
static int {\bfseries monomial\+\_\+compare} (PHEAD const WORD $\ast$, const WORD $\ast$)
\item 
\mbox{\Hypertarget{classpoly_aba6e3acad5a33ed51392c2606104a5a3}\label{classpoly_aba6e3acad5a33ed51392c2606104a5a3}} 
static void {\bfseries add} (const \mbox{\hyperlink{classpoly}{poly}} \&, const \mbox{\hyperlink{classpoly}{poly}} \&, \mbox{\hyperlink{classpoly}{poly}} \&)
\item 
\mbox{\Hypertarget{classpoly_a2aade9f01b7307f24d48659e0250daef}\label{classpoly_a2aade9f01b7307f24d48659e0250daef}} 
static void {\bfseries sub} (const \mbox{\hyperlink{classpoly}{poly}} \&, const \mbox{\hyperlink{classpoly}{poly}} \&, \mbox{\hyperlink{classpoly}{poly}} \&)
\item 
static void \mbox{\hyperlink{classpoly_a41eadb23d8d0cef5c650fba1fc548894}{mul}} (const \mbox{\hyperlink{classpoly}{poly}} \&, const \mbox{\hyperlink{classpoly}{poly}} \&, \mbox{\hyperlink{classpoly}{poly}} \&)
\item 
\mbox{\Hypertarget{classpoly_a47965d2572cbd0e0f6826bcb81757f01}\label{classpoly_a47965d2572cbd0e0f6826bcb81757f01}} 
static void {\bfseries div} (const \mbox{\hyperlink{classpoly}{poly}} \&, const \mbox{\hyperlink{classpoly}{poly}} \&, \mbox{\hyperlink{classpoly}{poly}} \&)
\item 
\mbox{\Hypertarget{classpoly_a36b365793c5251b22b8b6238ca2f5e97}\label{classpoly_a36b365793c5251b22b8b6238ca2f5e97}} 
static void {\bfseries mod} (const \mbox{\hyperlink{classpoly}{poly}} \&, const \mbox{\hyperlink{classpoly}{poly}} \&, \mbox{\hyperlink{classpoly}{poly}} \&)
\item 
static void \mbox{\hyperlink{classpoly_ab8ad2c056a62b939c48c8e23ff1c413b}{divmod}} (const \mbox{\hyperlink{classpoly}{poly}} \&, const \mbox{\hyperlink{classpoly}{poly}} \&, \mbox{\hyperlink{classpoly}{poly}} \&, \mbox{\hyperlink{classpoly}{poly}} \&, bool only\+\_\+divides)
\item 
\mbox{\Hypertarget{classpoly_adbc2a98f5d24c6f7cfae542afec84fbd}\label{classpoly_adbc2a98f5d24c6f7cfae542afec84fbd}} 
static bool {\bfseries divides} (const \mbox{\hyperlink{classpoly}{poly}} \&, const \mbox{\hyperlink{classpoly}{poly}} \&)
\item 
\mbox{\Hypertarget{classpoly_a515d7093a884c25af371c7c62c0b08ff}\label{classpoly_a515d7093a884c25af371c7c62c0b08ff}} 
static void {\bfseries mul\+\_\+one\+\_\+term} (const \mbox{\hyperlink{classpoly}{poly}} \&, const \mbox{\hyperlink{classpoly}{poly}} \&, \mbox{\hyperlink{classpoly}{poly}} \&)
\item 
\mbox{\Hypertarget{classpoly_a735437e20366a295eb269edf27080f06}\label{classpoly_a735437e20366a295eb269edf27080f06}} 
static void {\bfseries mul\+\_\+univar} (const \mbox{\hyperlink{classpoly}{poly}} \&, const \mbox{\hyperlink{classpoly}{poly}} \&, \mbox{\hyperlink{classpoly}{poly}} \&, int)
\item 
static void \mbox{\hyperlink{classpoly_a3a0184e028475fb5455910d658bbd5a9}{mul\+\_\+heap}} (const \mbox{\hyperlink{classpoly}{poly}} \&, const \mbox{\hyperlink{classpoly}{poly}} \&, \mbox{\hyperlink{classpoly}{poly}} \&)
\item 
\mbox{\Hypertarget{classpoly_a345a283f4fd83d404539a6353c647849}\label{classpoly_a345a283f4fd83d404539a6353c647849}} 
static void {\bfseries divmod\+\_\+one\+\_\+term} (const \mbox{\hyperlink{classpoly}{poly}} \&, const \mbox{\hyperlink{classpoly}{poly}} \&, \mbox{\hyperlink{classpoly}{poly}} \&, \mbox{\hyperlink{classpoly}{poly}} \&, bool)
\item 
static void \mbox{\hyperlink{classpoly_aea7825e9878b28889763f1a2c9c18306}{divmod\+\_\+univar}} (const \mbox{\hyperlink{classpoly}{poly}} \&, const \mbox{\hyperlink{classpoly}{poly}} \&, \mbox{\hyperlink{classpoly}{poly}} \&, \mbox{\hyperlink{classpoly}{poly}} \&, int, bool)
\item 
static void \mbox{\hyperlink{classpoly_ab9c908d3bbe2638531607d1c78b9aafd}{divmod\+\_\+heap}} (const \mbox{\hyperlink{classpoly}{poly}} \&, const \mbox{\hyperlink{classpoly}{poly}} \&, \mbox{\hyperlink{classpoly}{poly}} \&, \mbox{\hyperlink{classpoly}{poly}} \&, bool, bool, bool \&)
\item 
\mbox{\Hypertarget{classpoly_a4314d20e9c34380dcae9b63f6ac86950}\label{classpoly_a4314d20e9c34380dcae9b63f6ac86950}} 
static void {\bfseries push\+\_\+heap} (PHEAD WORD $\ast$$\ast$, int)
\item 
\mbox{\Hypertarget{classpoly_af64d85c0ace49a80ab3701d8b1df602f}\label{classpoly_af64d85c0ace49a80ab3701d8b1df602f}} 
static void {\bfseries pop\+\_\+heap} (PHEAD WORD $\ast$$\ast$, int)
\end{DoxyCompactItemize}
\doxysubsection*{Data Fields}
\begin{DoxyCompactItemize}
\item 
\mbox{\Hypertarget{classpoly_acc20d43a48a065e1b4e90332e44bbe58}\label{classpoly_acc20d43a48a065e1b4e90332e44bbe58}} 
WORD $\ast$ {\bfseries terms}
\item 
\mbox{\Hypertarget{classpoly_a9c55bd246ea307f193c3bba04e68c713}\label{classpoly_a9c55bd246ea307f193c3bba04e68c713}} 
LONG {\bfseries size\+\_\+of\+\_\+terms}
\item 
\mbox{\Hypertarget{classpoly_afc0dfbdb9518edf032ba4dcce33c63df}\label{classpoly_afc0dfbdb9518edf032ba4dcce33c63df}} 
WORD {\bfseries modp}
\item 
\mbox{\Hypertarget{classpoly_ab9774d517ea86b103e0c6c04a45f92d0}\label{classpoly_ab9774d517ea86b103e0c6c04a45f92d0}} 
WORD {\bfseries modn}
\end{DoxyCompactItemize}


\doxysubsection{Detailed Description}


Definition at line 49 of file poly.\+h.



\doxysubsection{Member Function Documentation}
\mbox{\Hypertarget{classpoly_a115c36c7cb42135c7fcb31e1d4cc591f}\label{classpoly_a115c36c7cb42135c7fcb31e1d4cc591f}} 
\index{poly@{poly}!is\_dense\_univariate@{is\_dense\_univariate}}
\index{is\_dense\_univariate@{is\_dense\_univariate}!poly@{poly}}
\doxysubsubsection{\texorpdfstring{is\_dense\_univariate()}{is\_dense\_univariate()}}
{\footnotesize\ttfamily int poly\+::is\+\_\+dense\+\_\+univariate (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption}) const}

Dense univariate detection\hypertarget{classpoly_autotoc_md38}{}\doxysubsection{Description}\label{classpoly_autotoc_md38}
This method returns whether the polynomial is dense and univariate. The possible return values are\+:

-\/2 is not dense univariate -\/1 is no variables n$>$=0 is univariate in n\hypertarget{classpoly_autotoc_md39}{}\doxysubsection{Notes}\label{classpoly_autotoc_md39}
A univariate polynomial is considered dense iff more than half of the coefficients a\+\_\+0...a\+\_\+deg are non-\/zero. 

Definition at line 2278 of file poly.\+cc.



Referenced by mul().

\mbox{\Hypertarget{classpoly_a41eadb23d8d0cef5c650fba1fc548894}\label{classpoly_a41eadb23d8d0cef5c650fba1fc548894}} 
\index{poly@{poly}!mul@{mul}}
\index{mul@{mul}!poly@{poly}}
\doxysubsubsection{\texorpdfstring{mul()}{mul()}}
{\footnotesize\ttfamily void poly\+::mul (\begin{DoxyParamCaption}\item[{const \mbox{\hyperlink{classpoly}{poly}} \&}]{a,  }\item[{const \mbox{\hyperlink{classpoly}{poly}} \&}]{b,  }\item[{\mbox{\hyperlink{classpoly}{poly}} \&}]{c }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [static]}}

Polynomial multiplication\hypertarget{classpoly_autotoc_md34}{}\doxysubsection{Description}\label{classpoly_autotoc_md34}
This routine determines which multiplication routine to use for multiplying two polynomials. The logic is as follows\+:
\begin{DoxyItemize}
\item If a or b consists of only one term, call mul\+\_\+one\+\_\+term;
\item Otherwise, if both are univariate and dense, call mul\+\_\+univar;
\item Otherwise, call mul\+\_\+heap. 
\end{DoxyItemize}

Definition at line 1191 of file poly.\+cc.



References is\+\_\+dense\+\_\+univariate(), and mul\+\_\+heap().

\mbox{\Hypertarget{classpoly_ab8ad2c056a62b939c48c8e23ff1c413b}\label{classpoly_ab8ad2c056a62b939c48c8e23ff1c413b}} 
\index{poly@{poly}!divmod@{divmod}}
\index{divmod@{divmod}!poly@{poly}}
\doxysubsubsection{\texorpdfstring{divmod()}{divmod()}}
{\footnotesize\ttfamily void poly\+::divmod (\begin{DoxyParamCaption}\item[{const \mbox{\hyperlink{classpoly}{poly}} \&}]{a,  }\item[{const \mbox{\hyperlink{classpoly}{poly}} \&}]{b,  }\item[{\mbox{\hyperlink{classpoly}{poly}} \&}]{q,  }\item[{\mbox{\hyperlink{classpoly}{poly}} \&}]{r,  }\item[{bool}]{only\+\_\+divides }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [static]}}

Polynomial division\hypertarget{classpoly_autotoc_md37}{}\doxysubsection{Description}\label{classpoly_autotoc_md37}
This routine determines which division routine to use for dividing two polynomials. The logic is as follows\+:
\begin{DoxyItemize}
\item If b consists of only one term, call divmod\+\_\+one\+\_\+term;
\item Otherwise, if both are univariate and dense, call divmod\+\_\+univar;
\item Otherwise, call divmod\+\_\+heap. 
\end{DoxyItemize}

Definition at line 1852 of file poly.\+cc.

\mbox{\Hypertarget{classpoly_a3a0184e028475fb5455910d658bbd5a9}\label{classpoly_a3a0184e028475fb5455910d658bbd5a9}} 
\index{poly@{poly}!mul\_heap@{mul\_heap}}
\index{mul\_heap@{mul\_heap}!poly@{poly}}
\doxysubsubsection{\texorpdfstring{mul\_heap()}{mul\_heap()}}
{\footnotesize\ttfamily void poly\+::mul\+\_\+heap (\begin{DoxyParamCaption}\item[{const \mbox{\hyperlink{classpoly}{poly}} \&}]{a,  }\item[{const \mbox{\hyperlink{classpoly}{poly}} \&}]{b,  }\item[{\mbox{\hyperlink{classpoly}{poly}} \&}]{c }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [static]}}

Multiplication of polynomials with a heap\hypertarget{classpoly_autotoc_md33}{}\doxysubsection{Description}\label{classpoly_autotoc_md33}
Multiplies two multivariate polynomials. The next element of the product is efficiently determined by using a heap. If the product of the maximum power in all variables is small, a hash table is used to add equal terms for extra speed.

A heap element h is formatted as follows\+:
\begin{DoxyItemize}
\item h\mbox{[}0\mbox{]} = index in a
\item h\mbox{[}1\mbox{]} = index in b
\item h\mbox{[}2\mbox{]} = hash code (-\/1 if no hash is used)
\item h\mbox{[}3\mbox{]} = length of coefficient with sign
\item h\mbox{[}4...4+AN.\+poly\+\_\+num\+\_\+vars-\/1\mbox{]} = powers
\item h\mbox{[}4+AN.\+poly\+\_\+num\+\_\+vars...4+h\mbox{[}3\mbox{]}-\/1\mbox{]} = coefficient 
\end{DoxyItemize}

Definition at line 957 of file poly.\+cc.



References Rais\+Pow\+Cached().



Referenced by mul().

\mbox{\Hypertarget{classpoly_aea7825e9878b28889763f1a2c9c18306}\label{classpoly_aea7825e9878b28889763f1a2c9c18306}} 
\index{poly@{poly}!divmod\_univar@{divmod\_univar}}
\index{divmod\_univar@{divmod\_univar}!poly@{poly}}
\doxysubsubsection{\texorpdfstring{divmod\_univar()}{divmod\_univar()}}
{\footnotesize\ttfamily void poly\+::divmod\+\_\+univar (\begin{DoxyParamCaption}\item[{const \mbox{\hyperlink{classpoly}{poly}} \&}]{a,  }\item[{const \mbox{\hyperlink{classpoly}{poly}} \&}]{b,  }\item[{\mbox{\hyperlink{classpoly}{poly}} \&}]{q,  }\item[{\mbox{\hyperlink{classpoly}{poly}} \&}]{r,  }\item[{int}]{var,  }\item[{bool}]{only\+\_\+divides }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [static]}}

Division of dense univariate polynomials.\hypertarget{classpoly_autotoc_md35}{}\doxysubsection{Description}\label{classpoly_autotoc_md35}
Divides two dense univariate polynomials. For each power, the method collects all terms that result in that power.

Relevant formula \mbox{[}Q=A/B, P=SUM(p\+\_\+i$\ast$x$^\wedge$i), n=deg(\+A), m=deg(\+B)\mbox{]}\+: q\+\_\+k = \mbox{[} a\+\_\+\{m+k\} -\/ SUM(i=k+1...n-\/m, b\+\_\+\{m+k-\/i\}$\ast$q\+\_\+i) \mbox{]} / b\+\_\+m 

Definition at line 1372 of file poly.\+cc.



References Rais\+Pow\+Cached().

\mbox{\Hypertarget{classpoly_ab9c908d3bbe2638531607d1c78b9aafd}\label{classpoly_ab9c908d3bbe2638531607d1c78b9aafd}} 
\index{poly@{poly}!divmod\_heap@{divmod\_heap}}
\index{divmod\_heap@{divmod\_heap}!poly@{poly}}
\doxysubsubsection{\texorpdfstring{divmod\_heap()}{divmod\_heap()}}
{\footnotesize\ttfamily void poly\+::divmod\+\_\+heap (\begin{DoxyParamCaption}\item[{const \mbox{\hyperlink{classpoly}{poly}} \&}]{a,  }\item[{const \mbox{\hyperlink{classpoly}{poly}} \&}]{b,  }\item[{\mbox{\hyperlink{classpoly}{poly}} \&}]{q,  }\item[{\mbox{\hyperlink{classpoly}{poly}} \&}]{r,  }\item[{bool}]{only\+\_\+divides,  }\item[{bool}]{check\+\_\+div,  }\item[{bool \&}]{div\+\_\+fail }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [static]}}

Division of polynomials with a heap\hypertarget{classpoly_autotoc_md36}{}\doxysubsection{Description}\label{classpoly_autotoc_md36}
Divides two multivariate polynomials. The next element of the quotient/remainder is efficiently determined by using a heap. If the product of the maximum power in all variables is small, a hash table is used to add equal terms for extra speed.

If the input flag check\+\_\+div is set then if the result of any coefficient division results in a non-\/zero remainder (indicating that division has failed over the integers) the output flag div\+\_\+fail will be set and the division will be terminated early (q, r will be incorrect). If check\+\_\+div is not set then non-\/zero remainders from coefficient division will be written into r.

A heap element h is formatted as follows\+:
\begin{DoxyItemize}
\item h\mbox{[}0\mbox{]} = index in a
\item h\mbox{[}1\mbox{]} = index in b
\item h\mbox{[}2\mbox{]} = -\/1 (no hash is used)
\item h\mbox{[}3\mbox{]} = length of coefficient with sign
\item h\mbox{[}4...4+AN.\+poly\+\_\+num\+\_\+vars-\/1\mbox{]} = powers
\item h\mbox{[}4+AN.\+poly\+\_\+num\+\_\+vars...4+h\mbox{[}3\mbox{]}-\/1\mbox{]} = coefficient
\end{DoxyItemize}

Note\+: the hashing trick as in multiplication cannot be used easily, since there is no tight upperbound on the exponents in the answer.

For details, see M. Monagan, \char`\"{}\+Polynomial Division using Dynamic \+Array, Heaps, and Packed Exponent Vectors\char`\"{} 

Definition at line 1575 of file poly.\+cc.



The documentation for this class was generated from the following files\+:\begin{DoxyCompactItemize}
\item 
poly.\+h\item 
poly.\+cc\end{DoxyCompactItemize}
