scinumtools.solver package

Submodules

scinumtools.solver.atom module

class scinumtools.solver.atom.AtomBase(value: str | float | bool)

Bases: object

cos()
log()
log10()
logical_and(other)
logical_not()
logical_or(other)
sin()
sqrt()
tan()
value: float | bool

scinumtools.solver.expression module

class scinumtools.solver.expression.Expression(expr: str)

Bases: object

expr: str
left: str
pop_left()
remove(string: str)
right: str
shift(nchar: int = 1)

scinumtools.solver.operators module

class scinumtools.solver.operators.OperatorAdd(expr: str | None = None)

Bases: OperatorBase

operate_binary(tokens)
operate_unary(tokens)
symbol: str = '+'
class scinumtools.solver.operators.OperatorAnd(expr: str | None = None)

Bases: OperatorBase

operate_binary(tokens)
symbol: str = '&&'
class scinumtools.solver.operators.OperatorBase(expr: str | None = None)

Bases: object

args: list = None
symbol: str
class scinumtools.solver.operators.OperatorCos(expr: str)

Bases: OperatorPar

operate_args(tokens)
symbol: str = 'cos('
class scinumtools.solver.operators.OperatorEq(expr: str | None = None)

Bases: OperatorBase

operate_binary(tokens)
symbol: str = '=='
class scinumtools.solver.operators.OperatorExp(expr: str)

Bases: OperatorPar

operate_args(tokens)
symbol: str = 'exp('
class scinumtools.solver.operators.OperatorGe(expr: str | None = None)

Bases: OperatorBase

operate_binary(tokens)
symbol: str = '>='
class scinumtools.solver.operators.OperatorGt(expr: str | None = None)

Bases: OperatorBase

operate_binary(tokens)
symbol: str = '>'
class scinumtools.solver.operators.OperatorLe(expr: str | None = None)

Bases: OperatorBase

operate_binary(tokens)
symbol: str = '<='
class scinumtools.solver.operators.OperatorLog(expr: str)

Bases: OperatorPar

operate_args(tokens)
symbol: str = 'log('
class scinumtools.solver.operators.OperatorLog10(expr: str)

Bases: OperatorPar

operate_args(tokens)
symbol: str = 'log10('
class scinumtools.solver.operators.OperatorLogb(expr: str)

Bases: OperatorPar

narg: int = 2
operate_args(tokens)
symbol: str = 'logb('
class scinumtools.solver.operators.OperatorLt(expr: str | None = None)

Bases: OperatorBase

operate_binary(tokens)
symbol: str = '<'
class scinumtools.solver.operators.OperatorMul(expr: str | None = None)

Bases: OperatorBase

operate_binary(tokens)
symbol: str = '*'
class scinumtools.solver.operators.OperatorNe(expr: str | None = None)

Bases: OperatorBase

operate_binary(tokens)
symbol: str = '!='
class scinumtools.solver.operators.OperatorNot(expr: str | None = None)

Bases: OperatorBase

operate_unary(tokens)
symbol: str = '!'
class scinumtools.solver.operators.OperatorOr(expr: str | None = None)

Bases: OperatorBase

operate_binary(tokens)
symbol: str = '||'
class scinumtools.solver.operators.OperatorPar(expr: str)

Bases: OperatorBase

narg: int = 1
operate_args(tokens)
symbol: str = '('
symbol_close: str = ')'
symbol_open: str = '('
symbol_separator: str = ','
class scinumtools.solver.operators.OperatorPow(expr: str | None = None)

Bases: OperatorBase

operate_binary(tokens)
symbol: str = '**'
class scinumtools.solver.operators.OperatorPowb(expr: str)

Bases: OperatorPar

narg: int = 2
operate_args(tokens)
symbol: str = 'pow('
class scinumtools.solver.operators.OperatorSin(expr: str)

Bases: OperatorPar

operate_args(tokens)
symbol: str = 'sin('
class scinumtools.solver.operators.OperatorSqrt(expr: str)

Bases: OperatorPar

operate_args(tokens)
symbol: str = 'sqrt('
class scinumtools.solver.operators.OperatorSub(expr: str | None = None)

Bases: OperatorBase

operate_binary(tokens)
operate_unary(tokens)
symbol: str = '-'
class scinumtools.solver.operators.OperatorTan(expr: str)

Bases: OperatorPar

operate_args(tokens)
symbol: str = 'tan('
class scinumtools.solver.operators.OperatorTruediv(expr: str | None = None)

Bases: OperatorBase

operate_binary(tokens)
symbol: str = '/'
class scinumtools.solver.operators.Otype(value)

Bases: Enum

An enumeration.

ARGS = 0
BINARY = 2
TERNARY = 3
UNARY = 1

scinumtools.solver.solver module

class scinumtools.solver.solver.ExpressionSolver(atom, operators: dict | None = None, steps: list | None = None)

Bases: object

expr: Expression
operators: dict
solve(expr: str | Expression)
tokens: list

scinumtools.solver.tokens module

class scinumtools.solver.tokens.Tokens(atom)

Bases: object

append(token)
atom: AtomBase
get_left()
get_right()
left: list
operate(operators, otype)
put_left(token)
put_right(token)
right: list

Module contents