Steppable 0.0.1
A CAS project written from scratch in C++
Loading...
Searching...
No Matches
steppable::prettyPrint::printers Namespace Reference

The custom-implemented printer engines for outputting expressions. More...

Functions

std::string ppSubscript (const std::string &base, const std::string &subscript)
 Pretty print a base expression, (aka, subscript).
std::string ppSuperscript (const std::string &base, const std::string &superscript)
 Pretty print a power expression, (aka, superscript).
std::string ppRoot (const std::string &radicand, const std::string &index="2")
 Pretty print a root expression.
std::string ppFraction (const std::string &top, const std::string &bottom, bool inLine=false)
 Pretty print a fraction.
std::string ppMatrix (const MatVec2D< Number > &matrix, int endRows=0)
 Pretty prints a matrix.

Detailed Description

The custom-implemented printer engines for outputting expressions.

Function Documentation

◆ ppFraction()

std::string steppable::prettyPrint::printers::ppFraction ( const std::string & top,
const std::string & bottom,
bool inLine = false )

Pretty print a fraction.

Parameters
topThe numerator.
bottomThe denominator.
inLineWhether to print in a single line.
Returns
The pretty printed fraction.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ ppMatrix()

std::string steppable::prettyPrint::printers::ppMatrix ( const MatVec2D< Number > & matrix,
int endRows = 0 )

Pretty prints a matrix.

Parameters
matrixThe matrix to be pretty printed.
Returns
A string representation of the matrix.
Here is the caller graph for this function:

◆ ppRoot()

std::string steppable::prettyPrint::printers::ppRoot ( const std::string & radicand,
const std::string & index = "2" )

Pretty print a root expression.

Parameters
radicandThe radicand.
indexThe index.
Returns
The pretty printed root expression.
Here is the call graph for this function:

◆ ppSubscript()

std::string steppable::prettyPrint::printers::ppSubscript ( const std::string & base,
const std::string & subscript )

Pretty print a base expression, (aka, subscript).

Parameters
baseThe base.
subscriptThe subscript.
Returns
The pretty printed base expression.
Here is the call graph for this function:

◆ ppSuperscript()

std::string steppable::prettyPrint::printers::ppSuperscript ( const std::string & base,
const std::string & superscript )

Pretty print a power expression, (aka, superscript).

Parameters
baseThe base.
superscriptThe exponent.
Returns
The pretty printed power expression.
Here is the call graph for this function:
Untitled