59 lines
2.4 KiB
Python
59 lines
2.4 KiB
Python
from typing import Optional, Dict, List, Tuple, Union
|
|
|
|
class Expression:
|
|
@staticmethod
|
|
def parse(s: str) -> "Expression": ...
|
|
@staticmethod
|
|
def symbol(name: str) -> "Expression": ...
|
|
@staticmethod
|
|
def num(n: int) -> "Expression": ...
|
|
@staticmethod
|
|
def float(f: float) -> "Expression": ...
|
|
|
|
def simplify(self) -> "Expression": ...
|
|
def expand(self) -> "Expression": ...
|
|
def derivative(self, var: str) -> "Expression": ...
|
|
def diff(self, var: str) -> "Expression": ...
|
|
def integrate(self, var: str) -> "Expression": ...
|
|
def limit(self, var: str, value: float) -> "LimitResult": ...
|
|
def solve(self, var: str) -> List["Expression"]: ...
|
|
def series(self, var: str, point: float, order: int) -> "Expression": ...
|
|
def evaluate(self, bindings: Dict[str, float]) -> float: ...
|
|
def to_latex(self) -> str: ...
|
|
def to_code(self, language: str) -> str: ...
|
|
def variables(self) -> List[str]: ...
|
|
def substitute(self, var: str, replacement: "Expression") -> "Expression": ...
|
|
def replace(self, pattern: str, replacement: str) -> "Expression": ...
|
|
def check_dimensions(self, context: Dict[str, str]) -> str: ...
|
|
def laplace(self, t_var: str, s_var: str) -> Optional["Expression"]: ...
|
|
def fourier(self, t_var: str, omega_var: str) -> Optional["Expression"]: ...
|
|
|
|
def __add__(self, other: "Expression") -> "Expression": ...
|
|
def __radd__(self, other: object) -> "Expression": ...
|
|
def __sub__(self, other: "Expression") -> "Expression": ...
|
|
def __mul__(self, other: "Expression") -> "Expression": ...
|
|
def __rmul__(self, other: object) -> "Expression": ...
|
|
def __truediv__(self, other: "Expression") -> "Expression": ...
|
|
def __neg__(self) -> "Expression": ...
|
|
def __pow__(self, exp: "Expression") -> "Expression": ...
|
|
def __str__(self) -> str: ...
|
|
def __repr__(self) -> str: ...
|
|
|
|
class LimitResult:
|
|
@property
|
|
def value(self) -> Optional["Expression"]: ...
|
|
@property
|
|
def is_finite(self) -> bool: ...
|
|
@property
|
|
def description(self) -> str: ...
|
|
def __str__(self) -> str: ...
|
|
def __repr__(self) -> str: ...
|
|
|
|
def S(names: str) -> Union["Expression", Tuple["Expression", ...]]: ...
|
|
def E(s: str) -> "Expression": ...
|
|
def N(n: int) -> "Expression": ...
|
|
def is_prime(n: int) -> bool: ...
|
|
def factorize(n: int) -> List[Tuple[int, int]]: ...
|
|
def gcd(a: int, b: int) -> int: ...
|
|
def fibonacci(n: int) -> int: ...
|