scinumtools.solver package
Submodules
scinumtools.solver.atom module
scinumtools.solver.expression module
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 = '/'
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