import type { Complex } from '../../treb-base-types/src'; export interface ComplexMatrixType { array: Complex[][]; m: number; n: number; error?: boolean; } export interface RealMatrixType { array: number[][]; m: number; n: number; error?: boolean; } export declare const PolarToRectangular: (a: { r: number; theta: number; }) => Complex; export declare const RectangularToPolar: (value: Complex) => { r: number; theta: number; }; export declare const TanH: (z: Complex) => Complex; export declare const Tan: (z: Complex) => Complex; export declare const CosH: (z: Complex) => Complex; export declare const Cos: (z: Complex) => { real: number; imaginary: number; }; export declare const SinH: (z: Complex) => Complex; export declare const Sin: (z: Complex) => { real: number; imaginary: number; }; export declare const ASin: (cpx: Complex) => Complex; export declare const ACos: (cpx: Complex) => { real: number; imaginary: number; }; export declare const ATan: (cpx: Complex) => Complex; export declare const ATan2: (y: Complex, x: Complex) => Complex | false; export declare const Product: (...args: Complex[]) => Complex; export declare const Multiply: (a: Complex, b: Complex) => Complex; export declare const RealSum: (a: RealMatrixType, b: RealMatrixType) => RealMatrixType; export declare const RealProduct: (a: RealMatrixType, b: RealMatrixType) => RealMatrixType; export declare const ComplexProduct: (a: ComplexMatrixType, b: ComplexMatrixType) => Complex[][]; /** * this function DOES NOT check if the matrix is square, because it's * recursive and we don't want to do that every time. check before you * call it. */ export declare const ComplexDeterminant: (matrix: ComplexMatrixType) => Complex; export declare const RealDeterminant: (matrix: RealMatrixType) => number; export declare const RealInverse: (matrix: RealMatrixType) => RealMatrixType | undefined; /** * returns the inverse of a complex matrix. the first step in this is * to split into {real, imaginary} and then invert the real matrix. we * can use that as a shortcut if there are no imaginary values, just return * the inverted real matrix (here converted to complex, but we don't necessarily * need to do that) * * @param a * @returns */ export declare const MatrixInverse: (a: ComplexMatrixType) => Complex[][] | undefined; export declare const Divide: (a: Complex, b: Complex) => Complex; export declare const Exp: (value: Complex) => Complex; /** * from polar form, the principal value is * Log z = ln r + iθ */ export declare const Log: (value: Complex) => Complex; /** * returns a^b where a and b are (possibly) complex */ export declare const Power: (a: Complex, b: Complex) => Complex;