Basic Polynomial Algebra Subprograms (BPAS)
v. 1.791
|
An encapsulation of a mathematical symbol. More...
#include <Symbol.hpp>
Public Member Functions | |
Symbol () | |
Construct an empty Symbol. | |
Symbol (char c) | |
Construct a Symbol from the given character. More... | |
Symbol (const char *c) | |
Construct a Symbol from a c-string. More... | |
Symbol (const wchar_t *c) | |
Construct a Symbol from a wide character c-string. | |
Symbol (const std::string &a) | |
Construct a Symbol from a std::string. More... | |
Symbol (const std::wstring &a) | |
Construct a Symbol from a wide string, std::wstring. More... | |
Symbol (const Symbol &a) | |
Copy constructor. | |
~Symbol () | |
Destructor. | |
Symbol & | operator= (char c) |
Get the type of this Symbol. More... | |
Symbol & | operator= (const char *c) |
Assignment operator from a c-string. More... | |
Symbol & | operator= (const std::string &a) |
Assignment operator from a std::string. More... | |
Symbol & | operator= (const Symbol &a) |
Copy assignment. More... | |
Symbol & | operator+= (const std::string &a) |
Concatenate a string to this Symbol. More... | |
Symbol & | operator+= (const Symbol &a) |
Concatenate a Symbol to this Symbol. More... | |
std::string | toString () const |
Conver a Symbol to a std::string. More... | |
ExpressionTree | convertToExpressionTree () const |
Convert a Symbol to an ExpressionTree. More... | |
Static Public Member Functions | |
static Symbol | randomElement () |
Get a random Symbol. More... | |
static std::vector< Symbol > | randomElements (int n) |
Get a vector of pair-wise different random Symbols. More... | |
Friends | |
bool | operator< (const Symbol &s1, const Symbol &s2) |
Less than comparison operator between two Symbol. More... | |
bool | operator== (const Symbol &s1, const Symbol &s2) |
Equality comparison operator between two Symbol. More... | |
bool | operator== (const std::string &s2, const Symbol &s1) |
Equality comparison operator between a Symbol and a string. More... | |
bool | operator== (const Symbol &s1, const std::string &s2) |
Equality comparison operator between a Symbol and a string. More... | |
bool | operator!= (const std::string &s2, const Symbol &s1) |
Inequality comparison operator between a Symbol and a string. More... | |
bool | operator!= (const Symbol &s1, const std::string &s2) |
Inequality comparison operator between a Symbol and a string. More... | |
bool | operator<= (const Symbol &s1, const Symbol &s2) |
Less-than-equal comparison operator between two Symbol. More... | |
bool | operator> (const Symbol &s1, const Symbol &s2) |
Greater-than comparison operator between two Symbol. More... | |
bool | operator>= (const Symbol &s1, const Symbol &s2) |
Greater-than-equal comparison operator between two Symbol. More... | |
bool | operator!= (const Symbol &s1, const Symbol &s2) |
Inequality comparison operator between two Symbol. More... | |
std::ostream & | operator<< (std::ostream &out, const Symbol &b) |
Output operator. More... | |
An encapsulation of a mathematical symbol.
This symbol can be an indeterminant, or more generally, any unicode string. Provides comparison, concatenation, and printing.
|
inline |
Construct a Symbol from the given character.
c | the character |
|
inlineexplicit |
Construct a Symbol from a c-string.
c | the c-string. |
|
inlineexplicit |
Construct a Symbol from a std::string.
a | the string |
|
inlineexplicit |
Construct a Symbol from a wide string, std::wstring.
a | the wide string |
|
inline |
Convert a Symbol to an ExpressionTree.
|
inline |
Concatenate a string to this Symbol.
a | the string to concatenate. |
|
inline |
Get the type of this Symbol.
Assignment operator from a character.
c | the character to assign from. |
|
inline |
Assignment operator from a c-string.
c | the c-string to assign from. |
|
inline |
Assignment operator from a std::string.
a | the string to assign from. |
Copy assignment.
a | the other Symbol to copy from. |
|
static |
Get a vector of pair-wise different random Symbols.
n: the size of the vector.
|
inline |
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |