Frobby 0.9.5
|
#include <InputConsumer.h>
Classes | |
struct | Entry |
Public Member Functions | |
InputConsumer () | |
void | consumeRing (const VarNames &names) |
void | requireSquareFree () |
void | beginIdeal () |
Start consuming an ideal. | |
void | hintGenCount (size_t hintGenCount) |
Suggest that the current ideal will have the given number of generators. | |
void | beginTerm () |
Start consuming a term. | |
size_t | consumeVar (Scanner &in) |
Reads variable and returns id. | |
size_t | consumeVarNumber (Scanner &in) |
Reads variable as a number so that the first variable is 1. | |
void | consumeVarExponentOne (size_t var, const Scanner &in) |
Consumes var raised to the exponent 1. | |
void | consumeVarExponent (size_t var, Scanner &in) |
Consumes var raised to an exponent read from in. | |
void | endTerm () |
Done reading a term. | |
void | consumeTermProductNotation (Scanner &in) |
Reads a term in a format like "a^4*b*c^2". | |
void | endIdeal () |
Done reading an ideal. | |
bool | empty () const |
Returns true if there are ideals stored. | |
void | releaseIdeal (auto_ptr< SquareFreeIdeal > &sqf, auto_ptr< BigIdeal > &big) |
Struct that keeps either a BigIdeal or a SquareFreeIdeal. | |
auto_ptr< BigIdeal > | releaseBigIdeal () |
Returns the least recently read ideal that has not been released. | |
auto_ptr< SquareFreeIdeal > | releaseSquareFreeIdeal () |
Returns the least recently read ideal that has not been released. | |
const VarNames & | getRing () const |
Returns the current ring. | |
Private Member Functions | |
void | releaseIdeal (Entry &e) |
void | errorVariableAppearsTwice (const Scanner &in, size_t var) |
void | idealNotSquareFree () |
Static Private Member Functions | |
static void | toBigIdeal (auto_ptr< SquareFreeIdeal > &sqf, auto_ptr< BigIdeal > &big) |
Private Attributes | |
string | _tmpString |
VarNames | _names |
auto_ptr< BigIdeal > | _bigIdeal |
auto_ptr< SquareFreeIdeal > | _sqfIdeal |
vector< string > | _term |
std::list< Entry * > | _ideals |
ElementDeleter< std::list< Entry * > > | _idealsDeleter |
bool | _inIdeal |
bool | _requireSquareFree |
Definition at line 30 of file InputConsumer.h.
InputConsumer::InputConsumer | ( | ) |
Definition at line 27 of file InputConsumer.cpp.
void InputConsumer::beginIdeal | ( | ) |
Start consuming an ideal.
Definition at line 50 of file InputConsumer.cpp.
void InputConsumer::beginTerm | ( | ) |
Start consuming a term.
Definition at line 62 of file InputConsumer.cpp.
Definition at line 33 of file InputConsumer.cpp.
Reads a term in a format like "a^4*b*c^2".
Definition at line 148 of file InputConsumer.cpp.
size_t InputConsumer::consumeVar | ( | Scanner & | in | ) |
Reads variable and returns id.
Does not return if there is an error.
Definition at line 90 of file InputConsumer.cpp.
Consumes var raised to an exponent read from in.
Does not return if there is an error.
Definition at line 122 of file InputConsumer.cpp.
Consumes var raised to the exponent 1.
Definition at line 102 of file InputConsumer.cpp.
size_t InputConsumer::consumeVarNumber | ( | Scanner & | in | ) |
Reads variable as a number so that the first variable is 1.
Does not return if there is an error.
Definition at line 76 of file InputConsumer.cpp.
|
inline |
Returns true if there are ideals stored.
Definition at line 74 of file InputConsumer.h.
void InputConsumer::endIdeal | ( | ) |
Done reading an ideal.
Definition at line 191 of file InputConsumer.cpp.
void InputConsumer::endTerm | ( | ) |
Done reading a term.
Definition at line 164 of file InputConsumer.cpp.
Definition at line 234 of file InputConsumer.cpp.
Returns the current ring.
Definition at line 91 of file InputConsumer.h.
void InputConsumer::hintGenCount | ( | size_t | hintGenCount | ) |
Suggest that the current ideal will have the given number of generators.
This helps in preallocating the right amount of memory.
Definition at line 57 of file InputConsumer.cpp.
|
private |
Definition at line 241 of file InputConsumer.cpp.
Returns the least recently read ideal that has not been released.
Converts the ideal to a BigIdeal if it had been read as something else.
Definition at line 209 of file InputConsumer.cpp.
void InputConsumer::releaseIdeal | ( | auto_ptr< SquareFreeIdeal > & | sqf, |
auto_ptr< BigIdeal > & | big | ||
) |
Struct that keeps either a BigIdeal or a SquareFreeIdeal.
Assigns the least recently read ideal that has not been released to the parameter of the type that the ideal was read as.
Definition at line 200 of file InputConsumer.cpp.
Definition at line 227 of file InputConsumer.cpp.
auto_ptr< SquareFreeIdeal > InputConsumer::releaseSquareFreeIdeal | ( | ) |
Returns the least recently read ideal that has not been released.
That ideal must have been read as a SquareFreeIdeal.
Definition at line 218 of file InputConsumer.cpp.
void InputConsumer::requireSquareFree | ( | ) |
Definition at line 45 of file InputConsumer.cpp.
|
staticprivate |
Definition at line 247 of file InputConsumer.cpp.
Definition at line 107 of file InputConsumer.h.
|
private |
Definition at line 111 of file InputConsumer.h.
|
private |
Definition at line 112 of file InputConsumer.h.
|
private |
Definition at line 113 of file InputConsumer.h.
|
private |
Definition at line 106 of file InputConsumer.h.
|
private |
Definition at line 114 of file InputConsumer.h.
|
private |
Definition at line 108 of file InputConsumer.h.
|
private |
Definition at line 109 of file InputConsumer.h.
|
private |
Definition at line 105 of file InputConsumer.h.