Qucs-core  0.0.19
Namespaces | Data Structures | Functions
qucs Namespace Reference

Namespaces

namespace  detail
namespace  device
namespace  emi
namespace  eqn
namespace  fourier
namespace  transient

Data Structures

class  acsolver
class  analysis
 class for performing circuit analyses. More...

Functions

static void euclidian_update (nr_double_t a, nr_double_t &n, nr_double_t &scale)
template<typename nr_type_t >
nr_type_t cond_conj (nr_type_t t)
template<>
double cond_conj (double t)
static nr_double_t givens (nr_double_t a, nr_double_t b, nr_double_t &c, nr_double_t &s)
 Helper function computes Givens rotation.
static char * Cplx2String (nr_complex_t c)
nr_complex_t cos (const nr_complex_t z)
 Compute complex cosine.
nr_complex_t sin (const nr_complex_t z)
 Compute complex sine.
nr_complex_t tan (const nr_complex_t z)
 Compute complex tangent.
nr_complex_t acos (const nr_complex_t z)
 Compute complex arc cosine.
nr_complex_t asin (const nr_complex_t z)
 Compute complex arc sine.
nr_complex_t atan (const nr_complex_t z)
 Compute complex arc tangent.
nr_complex_t cosh (const nr_complex_t z)
 Compute complex hyperbolic cosine.
nr_complex_t sinh (const nr_complex_t z)
 Compute complex hyperbolic sine.
nr_complex_t tanh (const nr_complex_t z)
 Compute complex hyperbolic tangent.
nr_complex_t acosh (const nr_complex_t z)
 Compute complex arc hyperbolic cosine.
nr_complex_t asinh (const nr_complex_t z)
 Compute complex arc hyperbolic sine.
nr_complex_t atanh (const nr_complex_t z)
 Compute complex arc hyperbolic tangent.
nr_complex_t exp (const nr_complex_t z)
 Compute complex exponential.
nr_complex_t log (const nr_complex_t z)
 Compute principal value of natural logarithm of z.
nr_complex_t log10 (const nr_complex_t z)
 Compute principal value of decimal logarithm of z.
nr_complex_t pow (const nr_complex_t z, const nr_double_t d)
 Compute power function with real exponent.
nr_complex_t pow (const nr_double_t d, const nr_complex_t z)
 Compute power function with complex exponent but real mantisse.
nr_complex_t pow (const nr_complex_t z1, const nr_complex_t z2)
 Compute complex power function.
nr_complex_t sqrt (const nr_complex_t z)
 Compute principal value of square root.
nr_double_t norm (const nr_complex_t z)
 Compute euclidian norm of complex number.
nr_complex_t cot (const nr_complex_t z)
 Compute complex cotangent.
nr_complex_t acot (const nr_complex_t z)
 Compute complex arc cotangent.
nr_complex_t coth (const nr_complex_t z)
 Compute complex hyperbolic cotangent.
nr_complex_t acoth (const nr_complex_t z)
 Compute complex argument hyperbolic cotangent.
nr_complex_t sech (const nr_complex_t z)
 Compute complex hyperbolic secant.
nr_complex_t asech (const nr_complex_t z)
 Compute complex argument hyperbolic secant.
nr_complex_t cosech (const nr_complex_t z)
 Compute complex argument hyperbolic cosec.
nr_complex_t atan2 (const nr_complex_t y, const nr_complex_t x)
 Compute complex arc tangent fortran like function.
nr_complex_t log2 (const nr_complex_t z)
 Compute principal value of binary logarithm of z.
nr_complex_t signum (const nr_complex_t z)
 complex signum function
nr_complex_t sign (const nr_complex_t z)
 complex sign function
nr_complex_t sinc (const nr_complex_t z)
 Cardinal sine.
nr_double_t xhypot (const nr_complex_t a, const nr_complex_t b)
 Euclidean distance function for complex argument.
nr_double_t xhypot (nr_double_t a, nr_complex_t b)
 Euclidean distance function for a double b complex.
nr_double_t xhypot (nr_complex_t a, nr_double_t b)
 Euclidean distance function for b double a complex.
nr_complex_t round (const nr_complex_t z)
 Complex round Round is the nearest integral value Apply round to real and imaginary part.
nr_complex_t trunc (const nr_complex_t z)
 Complex trunc Apply round to integer, towards zero to real and imaginary part.
nr_double_t dB (const nr_complex_t z)
 Magnitude in dB Compute $10\log_{10} |z|^2=20\log_{10} |z|$.
nr_complex_t limexp (const nr_complex_t z)
 Compute limited complex exponential.
nr_complex_t polar (const nr_double_t mag, const nr_double_t ang)
 Construct a complex number using polar notation.
nr_complex_t polar (const nr_complex_t a, const nr_complex_t p)
 Extension of polar construction to complex.
nr_complex_t ztor (const nr_complex_t z, nr_complex_t zref)
 Converts impedance to reflexion coefficient.
nr_complex_t rtoz (const nr_complex_t r, nr_complex_t zref)
 Converts reflexion coefficient to impedance.
nr_complex_t ytor (const nr_complex_t y, nr_complex_t zref)
 Converts admittance to reflexion coefficient.
nr_complex_t rtoy (const nr_complex_t r, nr_complex_t zref)
 Converts reflexion coefficient to admittance.
nr_complex_t floor (const nr_complex_t z)
 Complex floor.
nr_complex_t ceil (const nr_complex_t z)
 Complex ceil Ceil is the smallest integral value not less than argument Apply ceil to real and imaginary part.
nr_complex_t fix (const nr_complex_t z)
 Complex fix.
nr_complex_t fmod (const nr_complex_t x, const nr_complex_t y)
 Complex fmod Apply fmod to the complex z.
nr_complex_t sqr (const nr_complex_t z)
 Square of complex number.
nr_complex_t step (const nr_complex_t z)
 Heaviside step function for complex number.
nr_complex_t cbesselj (unsigned int n, nr_complex_t z)
 Main entry point for besselj function.
static nr_complex_t cbesselj_smallarg (unsigned int n, nr_complex_t z)
static nr_complex_t cbesselj_mediumarg_odd (unsigned int n, nr_complex_t z)
static nr_complex_t cbesselj_mediumarg_even (unsigned int n, nr_complex_t z)
static nr_complex_t cbesselj_mediumarg (unsigned int n, nr_complex_t z)
static nr_complex_t cbesselj_largearg (unsigned int n, nr_complex_t z)
 besselj for large argument
nr_complex_t jn (const int n, const nr_complex_t z)
 Bessel function of first kind.
nr_complex_t yn (const int n, const nr_complex_t z)
 Bessel function of second kind.
nr_complex_t i0 (const nr_complex_t z)
 Modified Bessel function of first kind.
nr_complex_t erf (const nr_complex_t z)
 Error function.
nr_complex_t erfc (const nr_complex_t z)
 Complementart error function.
nr_complex_t erfinv (const nr_complex_t z)
 Inverse of error function.
nr_complex_t erfcinv (const nr_complex_t z)
 Inverse of complementart error function.
nr_complex_t operator% (const nr_complex_t z1, const nr_complex_t z2)
 Modulo.
nr_complex_t operator% (const nr_complex_t z1, const nr_double_t r2)
 Modulo.
nr_complex_t operator% (const nr_double_t r1, const nr_complex_t z2)
 Modulo.
bool operator== (const nr_complex_t z1, const nr_complex_t z2)
 Equality of two complex.
bool operator!= (const nr_complex_t z1, const nr_complex_t z2)
 Inequality of two complex.
bool operator>= (const nr_complex_t z1, const nr_complex_t z2)
 Superior of equal.
bool operator<= (const nr_complex_t z1, const nr_complex_t z2)
 Inferior of equal.
bool operator> (const nr_complex_t z1, const nr_complex_t z2)
 Superior.
bool operator< (const nr_complex_t z1, const nr_complex_t z2)
 Inferior.
nr_double_t rad2deg (const nr_complex_t x)
 rad2deg Convert radian to degree
nr_double_t deg2rad (const nr_complex_t x)
 rad2deg Convert radian to degree
matrix operator+ (matrix a, matrix b)
 Matrix addition.
matrix operator- (matrix a, matrix b)
 Matrix subtraction.
matrix operator* (matrix a, nr_complex_t z)
 Matrix scaling complex version.
matrix operator* (nr_complex_t z, matrix a)
 Matrix scaling complex version (different order)
matrix operator* (matrix a, nr_double_t d)
 Matrix scaling complex version.
matrix operator* (nr_double_t d, matrix a)
 Matrix scaling real version (different order)
matrix operator/ (matrix a, nr_complex_t z)
 Matrix scaling division by complex version.
matrix operator/ (matrix a, nr_double_t d)
 Matrix scaling division by real version.
matrix operator* (matrix a, matrix b)
matrix operator+ (matrix a, nr_complex_t z)
 Complex scalar addition.
matrix operator+ (nr_complex_t z, matrix a)
 Complex scalar addition different order.
matrix operator+ (matrix a, nr_double_t d)
 Real scalar addition.
matrix operator+ (nr_double_t d, matrix a)
 Real scalar addition different order.
matrix operator- (matrix a, nr_complex_t z)
 Complex scalar substraction.
matrix operator- (nr_complex_t z, matrix a)
 Complex scalar substraction different order.
matrix operator- (matrix a, nr_double_t d)
 Real scalar substraction.
matrix operator- (nr_double_t d, matrix a)
 Real scalar substraction different order.
matrix transpose (matrix a)
 Matrix transposition.
matrix conj (matrix a)
 Conjugate complex matrix.
matrix adjoint (matrix a)
 adjoint matrix
matrix abs (matrix a)
 Computes magnitude of each matrix element.
matrix dB (matrix a)
 Computes magnitude in dB of each matrix element.
matrix arg (matrix a)
 Computes the argument of each matrix element.
matrix real (matrix a)
 Real part matrix.
matrix imag (matrix a)
 Imaginary part matrix.
matrix sqr (matrix a)
 Multiply a matrix by itself.
matrix eye (int rs, int cs)
 Create identity matrix with specified number of rows and columns.
matrix eye (int s)
 Create a square identity matrix.
matrix diagonal (qucs::vector diag)
 Create a diagonal matrix from a vector.
matrix pow (matrix a, int n)
nr_complex_t cofactor (matrix a, int u, int v)
 Computes the complex cofactor of the given determinant.
nr_complex_t detLaplace (matrix a)
 Compute determinant of the given matrix using Laplace expansion.
nr_complex_t detGauss (matrix a)
 Compute determinant Gaussian algorithm.
nr_complex_t det (matrix a)
 Compute determinant of the given matrix.
matrix inverseLaplace (matrix a)
 Compute inverse matrix using Laplace expansion.
matrix inverseGaussJordan (matrix a)
 Compute inverse matrix using Gauss-Jordan elimination.
matrix inverse (matrix a)
 Compute inverse matrix.
matrix stos (matrix s, qucs::vector zref, qucs::vector z0)
 S params to S params.
matrix stos (matrix s, nr_complex_t zref, nr_complex_t z0)
 S renormalization with all part identic.
matrix stos (matrix s, nr_double_t zref, nr_double_t z0)
 S renormalization with all part identic and real.
matrix stos (matrix s, qucs::vector zref, nr_complex_t z0)
 S renormalization (variation)
matrix stos (matrix s, nr_complex_t zref, qucs::vector z0)
 S renormalization (variation)
matrix stoz (matrix s, qucs::vector z0)
 Scattering parameters to impedance matrix.
matrix stoz (matrix s, nr_complex_t z0)
 Scattering parameters to impedance matrix identic case.
matrix ztos (matrix z, qucs::vector z0)
 Convert impedance matrix scattering parameters.
matrix ztos (matrix z, nr_complex_t z0)
 Convert impedance matrix to scattering parameters identic case.
matrix ztoy (matrix z)
 impedance matrix to admittance matrix.
matrix stoy (matrix s, qucs::vector z0)
 Scattering parameters to admittance matrix.
matrix stoy (matrix s, nr_complex_t z0)
 Convert scattering pto adminttance parameters identic case.
matrix ytos (matrix y, qucs::vector z0)
 Admittance matrix to scattering parameters.
matrix ytos (matrix y, nr_complex_t z0)
 Convert Admittance matrix to scattering parameters identic case.
matrix stoa (matrix s, nr_complex_t z1, nr_complex_t z2)
 Converts chain matrix to scattering parameters.
matrix atos (matrix a, nr_complex_t z1, nr_complex_t z2)
 Converts chain matrix to scattering parameters.
matrix stoh (matrix s, nr_complex_t z1, nr_complex_t z2)
 Converts scattering parameters to hybrid matrix.
matrix htos (matrix h, nr_complex_t z1, nr_complex_t z2)
 Converts hybrid matrix to scattering parameters.
matrix stog (matrix s, nr_complex_t z1, nr_complex_t z2)
matrix gtos (matrix g, nr_complex_t z1, nr_complex_t z2)
matrix ytoz (matrix y)
 Convert admittance matrix to impedance matrix.
matrix cytocs (matrix cy, matrix s)
 Admittance noise correlation matrix to S-parameter noise correlation matrix.
matrix cstocy (matrix cs, matrix y)
 Converts S-parameter noise correlation matrix to admittance noise correlation matrix.
matrix cztocs (matrix cz, matrix s)
 Converts impedance noise correlation matrix to S-parameter noise correlation matrix.
matrix cstocz (matrix cs, matrix z)
 Converts S-parameter noise correlation matrix to impedance noise correlation matrix.
matrix cztocy (matrix cz, matrix y)
 Converts impedance noise correlation matrix to admittance noise correlation matrix.
matrix cytocz (matrix cy, matrix z)
 Converts admittance noise correlation matrix to impedance noise correlation matrix.
matrix twoport (matrix m, char in, char out)
 Generic conversion matrix.
matrix diagonal (vector)
matrix stos (matrix, vector, nr_complex_t z0=50.0)
matrix stos (matrix, nr_complex_t, vector)
matrix stos (matrix, vector, vector)
matrix stoz (matrix, vector)
matrix ztos (matrix, vector)
matrix stoy (matrix, vector)
matrix ytos (matrix, vector)
nr_double_t rollet (matrix)
nr_double_t b1 (matrix)
matrix rad2deg (matrix)
matrix deg2rad (matrix)
nr_double_t cos (const nr_double_t arg)
 Compute cosine of an angle.
nr_double_t sin (const nr_double_t arg)
 Compute sine of an angle.
nr_double_t tan (const nr_double_t arg)
 Compute tangent of an angle.
nr_double_t acos (const nr_double_t arg)
 Compute arc cosine.
nr_double_t asin (const nr_double_t arg)
 Compute arc sine.
nr_double_t atan (const nr_double_t arg)
 Compute arc tangent.
nr_double_t atan2 (const nr_double_t x, const nr_double_t y)
 Compute arc tangent with two parameters (fortran like function)
nr_double_t cosh (const nr_double_t arg)
 Compute hyperbolic cosine.
nr_double_t sinh (const nr_double_t arg)
 Compute hyperbolic sine.
nr_double_t tanh (const nr_double_t arg)
 Compute hyperbolic tangent.
nr_double_t acosh (const nr_double_t arg)
 Compute arc hyperbolic cosine.
nr_double_t asinh (const nr_double_t arg)
 Compute arc hyperbolic sine.
nr_double_t atanh (const nr_double_t arg)
 Compute arc hyperbolic tangent.
nr_double_t exp (const nr_double_t arg)
nr_double_t log (const nr_double_t arg)
nr_double_t log10 (const nr_double_t arg)
nr_double_t pow (const nr_double_t a, const nr_double_t b)
nr_double_t sqrt (const nr_double_t d)
nr_double_t xhypot (const nr_double_t a, const nr_double_t b)
 Euclidean distance function.
nr_double_t erf (nr_double_t arg)
nr_double_t ceil (nr_double_t arg)
nr_double_t floor (nr_double_t arg)
nr_double_t fmod (nr_double_t arg)
nr_double_t trunc (nr_double_t arg)
nr_double_t round (nr_double_t arg)
nr_double_t coth (const nr_double_t d)
nr_double_t sech (const nr_double_t d)
nr_double_t cosech (const nr_double_t d)
nr_double_t sqr (const nr_double_t r)
 Square a value.
unsigned int sqr (unsigned int r)
nr_double_t quadr (const nr_double_t r)
 Quartic function.
nr_double_t limexp (const nr_double_t r)
 Compute limited exponential.
nr_double_t signum (const nr_double_t d)
 real signum function
nr_double_t sign (const nr_double_t d)
 real sign function
nr_double_t sinc (const nr_double_t d)
 Real cardinal sinus.
nr_double_t fix (const nr_double_t d)
 Fix function.
nr_double_t step (const nr_double_t d)
 Heaviside step function.
unsigned int factorial (unsigned int n)
 Compute factorial n ie $n!$.
nr_double_t real (const nr_double_t r)
 Real part of real number.
nr_double_t imag (const nr_double_t r)
 Imaginary part of complex number.
nr_double_t norm (const nr_double_t r)
 Compute euclidian norm of real number.
nr_double_t abs (const nr_double_t r)
 Compute complex modulus of real number.
nr_double_t conj (const nr_double_t r)
 Conjugate of real number.
nr_double_t rad2deg (const nr_double_t x)
 rad2deg Convert radian to degree
nr_double_t deg2rad (const nr_double_t x)
 deg2rad Convert radian to degree
static nr_double_t cubic (const nr_double_t x)
 Compute the third power of input.
static nr_double_t celsius2kelvin (const nr_double_t x)
 Convert Celsius to Kelvin.
static nr_double_t kelvin2celsius (const nr_double_t x)
 Convert Kelvin to Celsius.
matvec operator+ (matvec a, matvec b)
matvec operator+ (matvec a, matrix b)
matvec operator+ (matvec a, qucs::vector b)
matvec operator+ (qucs::vector b, matvec a)
matvec operator+ (matrix a, matvec b)
matvec operator+ (matvec a, nr_complex_t z)
matvec operator+ (nr_complex_t z, matvec a)
matvec operator+ (matvec a, nr_double_t d)
matvec operator+ (nr_double_t d, matvec a)
matvec operator- (matvec a, nr_complex_t z)
matvec operator- (nr_complex_t z, matvec a)
matvec operator- (matvec a, nr_double_t d)
matvec operator- (nr_double_t d, matvec a)
matvec operator- (matvec a, matvec b)
matvec operator- (matvec a, matrix b)
matvec operator- (matrix a, matvec b)
matvec operator- (matvec a, qucs::vector b)
matvec operator- (qucs::vector b, matvec a)
matvec operator* (matvec a, nr_complex_t z)
matvec operator* (nr_complex_t z, matvec a)
matvec operator* (matvec a, nr_double_t d)
matvec operator* (nr_double_t d, matvec a)
matvec operator* (matvec a, qucs::vector b)
matvec operator* (qucs::vector a, matvec b)
matvec operator/ (matvec a, nr_complex_t z)
matvec operator/ (matvec a, nr_double_t d)
matvec operator/ (matvec a, qucs::vector b)
matvec operator* (matvec a, matvec b)
matvec operator* (matvec a, matrix b)
matvec operator* (matrix a, matvec b)
qucs::vector det (matvec a)
matvec inverse (matvec a)
matvec sqr (matvec a)
matvec pow (matvec a, int n)
matvec pow (matvec a, qucs::vector v)
matvec conj (matvec a)
matvec abs (matvec a)
matvec dB (matvec a)
matvec arg (matvec a)
matvec real (matvec a)
matvec imag (matvec a)
matvec adjoint (matvec a)
matvec transpose (matvec a)
matvec stos (matvec s, qucs::vector zref, qucs::vector z0)
matvec stos (matvec s, nr_complex_t zref, nr_complex_t z0)
matvec stos (matvec s, nr_double_t zref, nr_double_t z0)
matvec stos (matvec s, qucs::vector zref, nr_complex_t z0)
matvec stos (matvec s, nr_complex_t zref, qucs::vector z0)
matvec stoy (matvec s, qucs::vector z0)
matvec stoy (matvec s, nr_complex_t z0)
matvec ytos (matvec y, qucs::vector z0)
matvec ytos (matvec y, nr_complex_t z0)
matvec stoz (matvec s, qucs::vector z0)
matvec stoz (matvec s, nr_complex_t z0)
matvec ztos (matvec z, qucs::vector z0)
matvec ztos (matvec z, nr_complex_t z0)
matvec ztoy (matvec z)
matvec ytoz (matvec y)
matvec twoport (matvec m, char in, char out)
qucs::vector rollet (matvec m)
qucs::vector b1 (matvec m)
matvec rad2deg (matvec a)
matvec deg2rad (matvec a)
matvec pow (matvec, vector)
matvec stos (matvec, vector, nr_complex_t z0=50.0)
matvec stos (matvec, nr_complex_t, vector)
matvec stos (matvec, vector, vector)
matvec stoz (matvec, vector)
matvec ztos (matvec, vector)
matvec stoy (matvec, vector)
matvec ytos (matvec, vector)
static int sortfunc (struct nodelist_t *n)
static int insfunc (struct nodelist_t *n1, struct nodelist_t *n2)
template<class nr_type_t >
tmatrix< nr_type_t > inverse (tmatrix< nr_type_t > a)
template<class nr_type_t >
tmatrix< nr_type_t > teye (int n)
template<class nr_type_t >
tmatrix< nr_type_t > operator* (tmatrix< nr_type_t > a, tmatrix< nr_type_t > b)
template<class nr_type_t >
tvector< nr_type_t > operator* (tmatrix< nr_type_t > a, tvector< nr_type_t > b)
template<class nr_type_t >
tvector< nr_type_t > operator* (tvector< nr_type_t > a, tmatrix< nr_type_t > b)
template<class nr_type_t >
tvector< nr_type_t > operator+ (tvector< nr_type_t > a, tvector< nr_type_t > b)
template<class nr_type_t >
tvector< nr_type_t > operator- (tvector< nr_type_t > a, tvector< nr_type_t > b)
template<class nr_type_t >
tvector< nr_type_t > operator* (nr_double_t s, tvector< nr_type_t > a)
template<class nr_type_t >
tvector< nr_type_t > operator* (tvector< nr_type_t > a, nr_double_t s)
template<class nr_type_t >
tvector< nr_type_t > operator* (tvector< nr_type_t > a, tvector< nr_type_t > b)
template<class nr_type_t >
nr_type_t scalar (tvector< nr_type_t > a, tvector< nr_type_t > b)
template<class nr_type_t >
nr_type_t sum (tvector< nr_type_t > a)
template<class nr_type_t >
tvector< nr_type_t > operator- (tvector< nr_type_t > a)
template<class nr_type_t >
bool operator< (tvector< nr_type_t > a, tvector< nr_type_t > b)
template<class nr_type_t >
bool operator> (tvector< nr_type_t > a, tvector< nr_type_t > b)
template<class nr_type_t >
tvector< nr_type_t > operator+ (nr_type_t s, tvector< nr_type_t > a)
template<class nr_type_t >
tvector< nr_type_t > operator+ (tvector< nr_type_t > a, nr_type_t s)
template<class nr_type_t >
nr_double_t norm (tvector< nr_type_t > a)
template<class nr_type_t >
nr_double_t maxnorm (tvector< nr_type_t > a)
template<class nr_type_t >
tvector< nr_type_t > conj (tvector< nr_type_t > a)
vector unwrap (vector v, nr_double_t tol, nr_double_t step)
nr_complex_t sum (vector v)
nr_complex_t prod (vector v)
nr_complex_t avg (vector v)
vector signum (vector v)
vector sign (vector v)
vector xhypot (vector v, const nr_complex_t z)
vector xhypot (vector v, const nr_double_t d)
vector xhypot (const nr_complex_t z, vector v)
vector xhypot (const nr_double_t d, vector v)
vector xhypot (vector v1, vector v2)
vector sinc (vector v)
vector abs (vector v)
vector norm (vector v)
vector arg (vector v)
vector real (vector v)
vector imag (vector v)
vector conj (vector v)
vector dB (vector v)
vector sqrt (vector v)
vector exp (vector v)
vector limexp (vector v)
vector log (vector v)
vector log10 (vector v)
vector log2 (vector v)
vector pow (vector v, const nr_complex_t z)
vector pow (vector v, const nr_double_t d)
vector pow (const nr_complex_t z, vector v)
vector pow (const nr_double_t d, vector v)
vector pow (vector v1, vector v2)
vector sin (vector v)
vector asin (vector v)
vector acos (vector v)
vector cos (vector v)
vector tan (vector v)
vector atan (vector v)
vector cot (vector v)
vector acot (vector v)
vector sinh (vector v)
vector asinh (vector v)
vector cosh (vector v)
vector sech (vector v)
vector cosech (vector v)
vector acosh (vector v)
vector asech (vector v)
vector tanh (vector v)
vector atanh (vector v)
vector coth (vector v)
vector acoth (vector v)
vector ztor (vector v, nr_complex_t zref)
vector ytor (vector v, nr_complex_t zref)
vector rtoz (vector v, nr_complex_t zref)
vector rtoy (vector v, nr_complex_t zref)
vector diff (vector var, vector dep, int n)
vector operator+ (vector v1, vector v2)
vector operator+ (vector v, const nr_complex_t c)
vector operator+ (const nr_complex_t c, vector v)
vector operator+ (vector v, const nr_double_t d)
vector operator+ (const nr_double_t d, vector v)
vector operator- (vector v1, vector v2)
vector operator- (vector v, const nr_complex_t c)
vector operator- (vector v, const nr_double_t d)
vector operator- (const nr_complex_t c, vector v)
vector operator- (const nr_double_t d, vector v)
vector operator* (vector v1, vector v2)
vector operator* (vector v, const nr_complex_t c)
vector operator* (vector v, const nr_double_t d)
vector operator* (const nr_complex_t c, vector v)
vector operator* (const nr_double_t d, vector v)
vector operator/ (vector v1, vector v2)
vector operator/ (vector v, const nr_complex_t c)
vector operator/ (vector v, const nr_double_t d)
vector operator/ (const nr_complex_t c, vector v)
vector operator/ (const nr_double_t d, vector v)
vector operator% (vector v, const nr_complex_t z)
vector operator% (vector v, const nr_double_t d)
vector operator% (const nr_complex_t z, vector v)
vector operator% (const nr_double_t d, vector v)
vector operator% (vector v1, vector v2)
vector linspace (nr_double_t start, nr_double_t stop, int points)
vector logspace (nr_double_t start, nr_double_t stop, int points)
vector cumsum (vector v)
vector cumavg (vector v)
vector cumprod (vector v)
vector ceil (vector v)
vector fix (vector v)
vector floor (vector v)
vector round (vector v)
vector sqr (vector v)
vector step (vector v)
static nr_double_t integrate_n (vector v)
vector erf (vector v)
vector erfc (vector v)
vector erfinv (vector v)
vector erfcinv (vector v)
vector rad2deg (vector v)
vector deg2rad (vector v)
vector i0 (vector v)
vector jn (const int n, vector v)
vector yn (const int n, vector v)
vector polar (const nr_complex_t a, vector v)
vector polar (vector v, const nr_complex_t p)
vector polar (vector a, vector p)
vector atan2 (const nr_double_t y, vector v)
vector atan2 (vector v, const nr_double_t x)
vector atan2 (vector y, vector x)
vector w2dbm (vector v)
vector dbm2w (vector v)
nr_double_t integrate (vector v, const nr_double_t h)
nr_complex_t integrate (vector v, const nr_complex_t h)
vector dbm (vector v, const nr_complex_t z)
vector runavg (const nr_complex_t x, const int n)
vector runavg (vector v, const int n)
qucs::vector runavg (qucs::vector, const int)

Detailed Description

It is prefered to add all used funcions into the qucs namespace. Doing so one is forced do think about compatibility instead of using std directly. Inline is optional at this moment

Todo:
test if inline indeed performace improves (optimization flags should inline them anyway)

Function Documentation

vector qucs::abs ( vector  v)

Definition at line 337 of file vector.cpp.

Compute complex modulus of real number.

Parameters:
[in]rReal number
Returns:
Modulus of r

Definition at line 498 of file real.cpp.

matvec qucs::abs ( matvec  a)

Definition at line 517 of file matvec.cpp.

matrix qucs::abs ( matrix  a)

Computes magnitude of each matrix element.

Parameters:
[in]amatrix
Todo:

add abs in place

a is const

Definition at line 531 of file matrix.cpp.

Compute arc cosine.

Parameters:
[in]zarc
Returns:
arc cosine of z

Definition at line 71 of file real.cpp.

Compute complex arc cosine.

Parameters:
[in]zcomplex arc
Returns:
arc cosine of z

Definition at line 84 of file complex.cpp.

vector qucs::acos ( vector  v)

Definition at line 469 of file vector.cpp.

Compute arc hyperbolic cosine.

Parameters:
[in]zarc
Returns:
arc hyperbolic cosine of z

Definition at line 132 of file real.cpp.

Compute complex arc hyperbolic cosine.

Parameters:
[in]zcomplex arc
Returns:
arc hyperbolic cosine of z

Definition at line 162 of file complex.cpp.

vector qucs::acosh ( vector  v)

Definition at line 535 of file vector.cpp.

Compute complex arc cotangent.

Parameters:
[in]zcomplex arc
Returns:
arc cotangent of z

Definition at line 310 of file complex.cpp.

vector qucs::acot ( vector  v)

Definition at line 499 of file vector.cpp.

Compute complex argument hyperbolic cotangent.

Parameters:
[in]zcomplex arc
Returns:
argument hyperbolic cotangent of z

Definition at line 332 of file complex.cpp.

vector qucs::acoth ( vector  v)

Definition at line 565 of file vector.cpp.

matrix qucs::adjoint ( matrix  a)

adjoint matrix

The function returns the adjoint complex matrix. This is also called the adjugate or transpose conjugate.

Parameters:
[in]aMatrix to transpose
Todo:

add adjoint in place

Do not lazy and avoid conj and transpose copy

a is const

Definition at line 522 of file matrix.cpp.

matvec qucs::adjoint ( matvec  a)

Definition at line 553 of file matvec.cpp.

vector qucs::arg ( vector  v)

Definition at line 349 of file vector.cpp.

matvec qucs::arg ( matvec  a)

Definition at line 531 of file matvec.cpp.

matrix qucs::arg ( matrix  a)

Computes the argument of each matrix element.

Parameters:
[in]amatrix
Todo:

add arg in place

a is const

Definition at line 555 of file matrix.cpp.

Compute complex argument hyperbolic secant.

Parameters:
[in]zcomplex arc
Returns:
argument hyperbolic secant of z
Todo:
for symetry reason implement sech

Definition at line 354 of file complex.cpp.

vector qucs::asech ( vector  v)

Definition at line 541 of file vector.cpp.

Compute arc sine.

Parameters:
[in]zarc
Returns:
arc sine of z

Definition at line 79 of file real.cpp.

Compute complex arc sine.

Parameters:
[in]zcomplex arc
Returns:
arc sine of z

Definition at line 102 of file complex.cpp.

vector qucs::asin ( vector  v)

Definition at line 463 of file vector.cpp.

Compute arc hyperbolic sine.

Parameters:
[in]zarc
Returns:
arc hyperbolic sine of z

Definition at line 147 of file real.cpp.

Compute complex arc hyperbolic sine.

Parameters:
[in]zcomplex arc
Returns:
arc hyperbolic sine of z

Definition at line 175 of file complex.cpp.

vector qucs::asinh ( vector  v)

Definition at line 511 of file vector.cpp.

Compute arc tangent.

Parameters:
[in]zarc
Returns:
arc tangent of z

Definition at line 87 of file real.cpp.

Compute complex arc tangent.

Parameters:
[in]zcomplex arc
Returns:
arc tangent of z

Definition at line 117 of file complex.cpp.

vector qucs::atan ( vector  v)

Definition at line 487 of file vector.cpp.

nr_double_t qucs::atan2 ( const nr_double_t  x,
const nr_double_t  y 
)

Compute arc tangent with two parameters (fortran like function)

Parameters:
[in]xproportion of x-coordinate
[in]yproportion of y-coordinate
Returns:
principal value of the arc tangent of y/x, expressed in radians.

Definition at line 96 of file real.cpp.

nr_complex_t qucs::atan2 ( const nr_complex_t  y,
const nr_complex_t  x 
)

Compute complex arc tangent fortran like function.

atan2 is a two-argument function that computes the arc tangent of y / x given y and x, but with a range of $(-\pi;\pi]$

Parameters:
[in]zcomplex angle
Returns:
arc tangent of z

Definition at line 377 of file complex.cpp.

vector qucs::atan2 ( const nr_double_t  y,
vector  v 
)

Definition at line 1176 of file vector.cpp.

vector qucs::atan2 ( vector  v,
const nr_double_t  x 
)

Definition at line 1183 of file vector.cpp.

vector qucs::atan2 ( vector  y,
vector  x 
)

Definition at line 1190 of file vector.cpp.

Compute arc hyperbolic tangent.

Parameters:
[in]zarc
Returns:
arc hyperbolic tangent of z

Definition at line 163 of file real.cpp.

Compute complex arc hyperbolic tangent.

Parameters:
[in]zcomplex arc
Returns:
arc hyperbolic tangent of z

Definition at line 188 of file complex.cpp.

vector qucs::atanh ( vector  v)

Definition at line 553 of file vector.cpp.

matrix qucs::atos ( matrix  a,
nr_complex_t  z1,
nr_complex_t  z2 
)

Converts chain matrix to scattering parameters.

Converts chain matrix to scattering parameters Formulae are given by [5] and are remembered here:

\begin{align*} S_{11}&=\frac{AZ_{02}+B-CZ_{01}^*Z_{02}-DZ_{01}^*}{\Delta} \\ S_{12}&=\frac{2(AD-BC) (\Re\text{e}\;Z_{01}\Re\text{e}\;Z_{02})^{1/2}} {\Delta}\\ S_{21}&=\frac{2(\Re\text{e}\;Z_{01}\Re\text{e}\;Z_{02})^{1/2}}{\Delta}\\ S_{22}&=\frac{-AZ_{02}^*+B-CZ_{01}^*Z_{02}+DZ_{01}}{\Delta} \end{align*}

Where:

\[ \Delta =AZ_{02}+B+CZ_{01}Z_{02}-DZ_{01} \]

Parameters:
[in]aChain matrix
[in]z1impedance at input 1
[in]z2impedance at input 2
Returns:
Scattering matrix
Bug:
Do not use fabs
Todo:
a, z1, z2 const

Definition at line 1222 of file matrix.cpp.

nr_complex_t qucs::avg ( vector  v)

Definition at line 272 of file vector.cpp.

nr_double_t qucs::b1 ( matrix  )
qucs::vector qucs::b1 ( matvec  m)

Definition at line 680 of file matvec.cpp.

nr_complex_t qucs::cbesselj ( unsigned int  n,
nr_complex_t  z 
)

Main entry point for besselj function.

static nr_complex_t qucs::cbesselj_largearg ( unsigned int  n,
nr_complex_t  z 
) [static]

besselj for large argument

Based on [5] eq (5)

Definition at line 221 of file complex.cpp.

static nr_complex_t qucs::cbesselj_mediumarg ( unsigned int  n,
nr_complex_t  z 
) [static]

Definition at line 203 of file complex.cpp.

static nr_complex_t qucs::cbesselj_mediumarg_even ( unsigned int  n,
nr_complex_t  z 
) [static]

Definition at line 175 of file complex.cpp.

static nr_complex_t qucs::cbesselj_mediumarg_odd ( unsigned int  n,
nr_complex_t  z 
) [static]

Definition at line 148 of file complex.cpp.

static nr_complex_t qucs::cbesselj_smallarg ( unsigned int  n,
nr_complex_t  z 
) [static]
Todo:
Not really adapted to high order therefore we do not check overflow for n >> 1
Parameters:
[in]norder
[in]argarguments

Definition at line 108 of file complex.cpp.

Definition at line 248 of file real.cpp.

Complex ceil Ceil is the smallest integral value not less than argument Apply ceil to real and imaginary part.

Parameters:
[in]zcomplex number
Returns:
ceilled complex number

Definition at line 634 of file complex.cpp.

vector qucs::ceil ( vector  v)

Definition at line 1031 of file vector.cpp.

static nr_double_t qucs::celsius2kelvin ( const nr_double_t  x) [inline, static]

Convert Celsius to Kelvin.

Definition at line 117 of file real.h.

nr_complex_t qucs::cofactor ( matrix  a,
int  u,
int  v 
)

Computes the complex cofactor of the given determinant.

The cofactor is the determinant obtained by deleting the row and column of a given element of a matrix or determinant. The cofactor is preceded by a + or - sign depending of the sign of $(-1)^(u+v)$

Bug:
This algortihm is recursive! Stack overfull!
Todo:

((u + v) & 1) is cryptic use (u + v)% 2

#ifdef 0

static?

Definition at line 657 of file matrix.cpp.

template<typename nr_type_t >
nr_type_t qucs::cond_conj ( nr_type_t  t) [inline]

Definition at line 871 of file eqnsys.cpp.

template<>
double qucs::cond_conj ( double  t) [inline]

Definition at line 876 of file eqnsys.cpp.

template<class nr_type_t >
tvector<nr_type_t> qucs::conj ( tvector< nr_type_t >  a)

Definition at line 295 of file tvector.cpp.

vector qucs::conj ( vector  v)

Definition at line 367 of file vector.cpp.

matrix qucs::conj ( matrix  a)

Conjugate complex matrix.

Parameters:
[in]aMatrix to conjugate
Todo:

add conj in place

a is const

Definition at line 505 of file matrix.cpp.

Conjugate of real number.

Parameters:
[in]rReal number
Returns:
Conjugate of real r ie r

Definition at line 507 of file real.cpp.

matvec qucs::conj ( matvec  a)

Definition at line 510 of file matvec.cpp.

Compute cosine of an angle.

Parameters:
[in]zangle in radians
Returns:
cosine of z

Definition at line 47 of file real.cpp.

Compute complex cosine.

Parameters:
[in]zcomplex angle
Returns:
cosine of z

Definition at line 57 of file complex.cpp.

vector qucs::cos ( vector  v)

Definition at line 475 of file vector.cpp.

Definition at line 295 of file real.cpp.

Compute complex argument hyperbolic cosec.

Parameters:
[in]zcomplex arc
Returns:
argument hyperbolic cosec of z

Definition at line 364 of file complex.cpp.

vector qucs::cosech ( vector  v)

Definition at line 529 of file vector.cpp.

Compute hyperbolic cosine.

Parameters:
[in]zarc
Returns:
hyperbolic cosine of z

Definition at line 108 of file real.cpp.

Compute complex hyperbolic cosine.

Parameters:
[in]zcomplex arc
Returns:
hyperbolic cosine of z

Definition at line 135 of file complex.cpp.

vector qucs::cosh ( vector  v)

Definition at line 517 of file vector.cpp.

Compute complex cotangent.

Parameters:
[in]zcomplex angle
Returns:
cotangent of z

Definition at line 298 of file complex.cpp.

vector qucs::cot ( vector  v)

Definition at line 493 of file vector.cpp.

Definition at line 287 of file real.cpp.

Compute complex hyperbolic cotangent.

Parameters:
[in]zcomplex angle
Returns:
hyperbolic cotangent of z

Definition at line 320 of file complex.cpp.

vector qucs::coth ( vector  v)

Definition at line 559 of file vector.cpp.

static char* qucs::Cplx2String ( nr_complex_t  c) [static]

Definition at line 163 of file equation.cpp.

matrix qucs::cstocy ( matrix  cs,
matrix  y 
)

Converts S-parameter noise correlation matrix to admittance noise correlation matrix.

According to [7] fig 2:

\[ C_y=(I+Y)C_s(I+Y)^+ \]

Where $C_s$ is the scattering noise correlation matrix, $C_y$ the admittance noise correlation matrix, $I$ the identity matrix and $S$ the scattering matrix of device. $x^+$ is the adjoint of $x$

Warning:
cs matrix and y matrix are assumed to be normalized
Parameters:
[in]csS parameter noise correlation
[in]yAdmittance matrix of device
Returns:
admittance noise correlation matrix
Todo:
cs, y const

Definition at line 1430 of file matrix.cpp.

matrix qucs::cstocz ( matrix  cs,
matrix  z 
)

Converts S-parameter noise correlation matrix to impedance noise correlation matrix.

According to [7] fig 2:

\[ C_z=(I+Z)C_s(I+Z)^+ \]

Where $C_s$ is the scattering noise correlation matrix, $C_z$ the impedance noise correlation matrix, $I$ the identity matrix and $S$ the scattering matrix of device. $x^+$ is the adjoint of $x$

Warning:
cs matrix and y matrix are assumed to be normalized
Parameters:
[in]csS parameter noise correlation
[in]zImpedance matrix of device
Returns:
Impedance noise correlation matrix
Todo:
cs, z const

Definition at line 1483 of file matrix.cpp.

static nr_double_t qucs::cubic ( const nr_double_t  x) [inline, static]

Compute the third power of input.

Definition at line 114 of file real.h.

vector qucs::cumavg ( vector  v)

Definition at line 1011 of file vector.cpp.

vector qucs::cumprod ( vector  v)

Definition at line 1021 of file vector.cpp.

vector qucs::cumsum ( vector  v)

Definition at line 1001 of file vector.cpp.

matrix qucs::cytocs ( matrix  cy,
matrix  s 
)

Admittance noise correlation matrix to S-parameter noise correlation matrix.

Converts admittance noise correlation matrix to S-parameter noise correlation matrix. According to [7] fig 2:

\[ C_s=\frac{1}{4}(I+S)C_y(I+S)^+ \]

Where $C_s$ is the scattering noise correlation matrix, $C_y$ the admittance noise correlation matrix, $I$ the identity matrix and $S$ the scattering matrix of device. $x^+$ is the adjoint of $x$

Warning:
cy matrix and s matrix are assumed to be normalized
Parameters:
[in]cyAdmittance noise correlation
[in]sS parameter matrix of device
Returns:
S-parameter noise correlation matrix
Note:
Assert compatiblity of matrix
Todo:
cy s const

Definition at line 1404 of file matrix.cpp.

matrix qucs::cytocz ( matrix  cy,
matrix  z 
)

Converts admittance noise correlation matrix to impedance noise correlation matrix.

According to [7] fig 2:

\[ C_z=ZC_yZ^+ \]

Where $C_z$ is the impedance correlation matrix, $I$ the identity matrix and $C_y$ the admittance noise correlation matrix. $x^+$ is the adjoint of $x$

Warning:
cy matrix and z matrix are assumed to be normalized
Parameters:
[in]cyAdmittance noise correlation
[in]zImpedance matrix of device
Returns:
Impedance noise correlation matrix
Todo:
cs, z const

Definition at line 1531 of file matrix.cpp.

matrix qucs::cztocs ( matrix  cz,
matrix  s 
)

Converts impedance noise correlation matrix to S-parameter noise correlation matrix.

According to [7] fig 2:

\[ C_s=\frac{1}{4}(I-S)C_z(I-S) \]

Where $C_s$ is the scattering noise correlation matrix, $C_z$ the impedance noise correlation matrix, $I$ the identity matrix and $S$ the scattering matrix of device. $x^+$ is the adjoint of $x$

Warning:
Cz matrix and s matrix are assumed to be normalized
Parameters:
[in]czImpedance noise correlation
[in]sS parameter matrix of device
Returns:
S-parameter noise correlation matrix
Note:
Assert compatiblity of matrix
Todo:
cz, s const

Definition at line 1457 of file matrix.cpp.

matrix qucs::cztocy ( matrix  cz,
matrix  y 
)

Converts impedance noise correlation matrix to admittance noise correlation matrix.

According to [7] fig 2:

\[ C_y=YC_zY^+ \]

Where $C_z$ is the impedance correlation matrix, $I$ the identity matrix and $C_y$ the admittance noise correlation matrix. $x^+$ is the adjoint of $x$

Warning:
cz matrix and y matrix are assumed to be normalized
Parameters:
[in]czimpedance noise correlation
[in]yAdmittance matrix of device
Returns:
admittance noise correlation matrix
Todo:
cs, y const

Definition at line 1507 of file matrix.cpp.

vector qucs::dB ( vector  v)

Definition at line 373 of file vector.cpp.

matvec qucs::dB ( matvec  a)

Definition at line 524 of file matvec.cpp.

Magnitude in dB Compute $10\log_{10} |z|^2=20\log_{10} |z|$.

Parameters:
[in]zcomplex number
Returns:
Magnitude in dB

Definition at line 528 of file complex.cpp.

matrix qucs::dB ( matrix  a)

Computes magnitude in dB of each matrix element.

Parameters:
[in]amatrix

Definition at line 542 of file matrix.cpp.

vector qucs::dbm ( vector  v,
const nr_complex_t  z 
)

Definition at line 1236 of file vector.cpp.

vector qucs::dbm2w ( vector  v)

Definition at line 1214 of file vector.cpp.

matrix qucs::deg2rad ( matrix  )

deg2rad Convert radian to degree

Parameters:
xinput
Returns:
input in radian (x)*pi/180

Definition at line 525 of file real.cpp.

matvec qucs::deg2rad ( matvec  a)

Definition at line 693 of file matvec.cpp.

rad2deg Convert radian to degree

Parameters:
xinput
Returns:
real(x)*pi/180

Definition at line 916 of file complex.cpp.

vector qucs::deg2rad ( vector  v)

Definition at line 1123 of file vector.cpp.

qucs::vector qucs::det ( matvec  a)

Definition at line 475 of file matvec.cpp.

nr_complex_t qucs::det ( matrix  a)

Compute determinant of the given matrix.

Parameters:
[in]amatrix
Returns:
Complex determinant
Todo:
a const?

Definition at line 762 of file matrix.cpp.

Compute determinant Gaussian algorithm.

Compute determinant of the given matrix using the Gaussian algorithm. This means to triangulate the matrix and multiply all the diagonal elements.

Parameters:
[in]amatrix
Note:
assert square matrix
Todo:

static ?

a const?

Definition at line 717 of file matrix.cpp.

Compute determinant of the given matrix using Laplace expansion.

The Laplace expansion of the determinant of an n by n square matrix a expresses the determinant of a as a sum of n determinants of (n-1) by (n-1) sub-matrices of a. There are 2n such expressions, one for each row and column of a.

See Wikipedia http://en.wikipedia.org/wiki/Laplace_expansion

Parameters:
[in]amatrix
Bug:
This algortihm is recursive! Stack overfull!
Note:
assert square matrix
Todo:

#ifdef 0

static ?

Definition at line 686 of file matrix.cpp.

matrix qucs::diagonal ( vector  )
matrix qucs::diagonal ( qucs::vector  diag)

Create a diagonal matrix from a vector.

Parameters:
[in]diagvector to write on the diagonal
Todo:
diag is const

Definition at line 624 of file matrix.cpp.

vector qucs::diff ( vector  var,
vector  dep,
int  n 
)

Definition at line 600 of file vector.cpp.

Definition at line 236 of file real.cpp.

Error function.

Parameters:
[in]zargument
Returns:
Error function
Bug:
Not implemented

Definition at line 766 of file complex.cpp.

vector qucs::erf ( vector  v)

Definition at line 1093 of file vector.cpp.

Complementart error function.

Parameters:
[in]zargument
Returns:
Complementary error function
Bug:
Not implemented

Definition at line 784 of file complex.cpp.

vector qucs::erfc ( vector  v)

Definition at line 1099 of file vector.cpp.

Inverse of complementart error function.

Parameters:
[in]zargument
Returns:
Inverse of complementary error function
Bug:
Not implemented

Definition at line 813 of file complex.cpp.

vector qucs::erfcinv ( vector  v)

Definition at line 1111 of file vector.cpp.

Inverse of error function.

Parameters:
[in]zargument
Returns:
Inverse of error function
Bug:
Not implemented

Definition at line 802 of file complex.cpp.

vector qucs::erfinv ( vector  v)

Definition at line 1105 of file vector.cpp.

static void qucs::euclidian_update ( nr_double_t  a,
nr_double_t n,
nr_double_t scale 
) [inline, static]

Helper function for the euclidian norm calculators.

Definition at line 830 of file eqnsys.cpp.

Definition at line 179 of file real.cpp.

Compute complex exponential.

Parameters:
[in]zcomplex number
Returns:
exponential of z

Definition at line 205 of file complex.cpp.

vector qucs::exp ( vector  v)

Definition at line 386 of file vector.cpp.

matrix qucs::eye ( int  rs,
int  cs 
)

Create identity matrix with specified number of rows and columns.

Parameters:
[in]rsrow number
[in]cscolumn number
Todo:

Avoid res.get*

Use memset

rs, cs are const

Definition at line 603 of file matrix.cpp.

matrix qucs::eye ( int  s)

Create a square identity matrix.

Parameters:
[in]srow or column number of square matrix
Todo:

Do not by lazy and implement it

s is const

Definition at line 616 of file matrix.cpp.

unsigned int qucs::factorial ( unsigned int  n)

Compute factorial n ie $n!$.

Definition at line 444 of file real.cpp.

Fix function.

Fix is nearest integral value in direction of 0,

\[ \operatorname{fix} d=\begin{cases} \operatorname{floor} d & \text{if } d > 0 \\ \operatorname{ceil} d & \text{else} \end{cases} \]

Parameters:
[in]dreal number
Returns:
fixed complex number
Todo:
Why not inline?

Definition at line 416 of file real.cpp.

Complex fix.

Apply fix to real and imaginary part

Parameters:
[in]zcomplex number
Returns:
fixed complex number
Todo:
why not using real fix

Definition at line 645 of file complex.cpp.

vector qucs::fix ( vector  v)

Definition at line 1037 of file vector.cpp.

Definition at line 252 of file real.cpp.

Complex floor.

floor is the largest integral value not greater than argument Apply floor to real and imaginary part

Parameters:
[in]zcomplex number
Returns:
floored complex number

Definition at line 623 of file complex.cpp.

vector qucs::floor ( vector  v)

Definition at line 1043 of file vector.cpp.

Definition at line 256 of file real.cpp.

nr_complex_t qucs::fmod ( const nr_complex_t  x,
const nr_complex_t  y 
)

Complex fmod Apply fmod to the complex z.

Parameters:
[in]xcomplex number (numerator)
[in]ycomplex number (denominator)
Returns:
return $x - n * y$ where n is the quotient of $x / y$, rounded towards zero to an integer.
Todo:
add fmod to manual

Definition at line 662 of file complex.cpp.

static nr_double_t qucs::givens ( nr_double_t  a,
nr_double_t  b,
nr_double_t c,
nr_double_t s 
) [inline, static]

Helper function computes Givens rotation.

Definition at line 1339 of file eqnsys.cpp.

matrix qucs::gtos ( matrix  g,
nr_complex_t  z1,
nr_complex_t  z2 
)

Definition at line 1355 of file matrix.cpp.

matrix qucs::htos ( matrix  h,
nr_complex_t  z1,
nr_complex_t  z2 
)

Converts hybrid matrix to scattering parameters.

Formulae are given by [5] and are remembered here:

\begin{align*} S_{11}&=\frac{(h_{11}-Z_{01}^*)(1+h_{22}Z_{02})-h_{12}h_{21}Z_{02}} {\Delta}\\ S_{12}&=\frac{-2h_{12}(\Re\text{e}\;Z_{01}\Re\text{e}\;Z_{02})^\frac{1}{2}} {\Delta}\\ S_{21}&=\frac{-2h_{21}(\Re\text{e}\;Z_{01}\Re\text{e}\;Z_{02})^\frac{1}{2}} {\Delta}\\ S_{22}&=\frac{(h_{11}+Z_{01})(1-h_{22}Z_{02}^*)-h_{12}h_{21}Z_{02}^*} {\Delta} \end{align*}

Where $\Delta$ is:

\[ \Delta=(Z_{01}+h_{11})(1+h_{22}Z_{02})-h_{12}h_{21}Z_{02} \]

Parameters:
[in]hhybrid matrix
[in]z1impedance at input 1
[in]z2impedance at input 2
Returns:
scattering matrix
Note:
Assert 2 by 2 matrix
Todo:
Why not h,z1,z2 const

Definition at line 1307 of file matrix.cpp.

Modified Bessel function of first kind.

Parameters:
[in]zargument
Returns:
Modified Bessel function of first kind of order 0
Bug:
Not implemented

Definition at line 754 of file complex.cpp.

vector qucs::i0 ( vector  v)

Definition at line 1129 of file vector.cpp.

vector qucs::imag ( vector  v)

Definition at line 361 of file vector.cpp.

Imaginary part of complex number.

Parameters:
[in]rReal number
Returns:
Imaginary part of r

Definition at line 479 of file real.cpp.

matvec qucs::imag ( matvec  a)

Definition at line 545 of file matvec.cpp.

matrix qucs::imag ( matrix  a)

Imaginary part matrix.

Parameters:
[in]amatrix
Todo:

add imag in place

a is const

Definition at line 581 of file matrix.cpp.

static int qucs::insfunc ( struct nodelist_t *  n1,
struct nodelist_t *  n2 
) [static]

Definition at line 197 of file nodelist.cpp.

nr_double_t qucs::integrate ( vector  v,
const nr_double_t  h 
)

Definition at line 1221 of file vector.cpp.

nr_complex_t qucs::integrate ( vector  v,
const nr_complex_t  h 
)

Definition at line 1228 of file vector.cpp.

static nr_double_t qucs::integrate_n ( vector  v) [static]

Definition at line 1067 of file vector.cpp.

template<class nr_type_t >
tmatrix<nr_type_t> qucs::inverse ( tmatrix< nr_type_t >  a)

Definition at line 197 of file tmatrix.cpp.

matvec qucs::inverse ( matvec  a)

Definition at line 482 of file matvec.cpp.

matrix qucs::inverse ( matrix  a)

Compute inverse matrix.

Parameters:
[in]amatrix to invert
Todo:
a is const

Definition at line 847 of file matrix.cpp.

matrix qucs::inverseGaussJordan ( matrix  a)

Compute inverse matrix using Gauss-Jordan elimination.

Compute inverse matrix of the given matrix by Gauss-Jordan elimination.

Todo:

a const?

static?

Note:
assert non singulat matix
Parameters:
[in]amatrix to invert

Definition at line 798 of file matrix.cpp.

matrix qucs::inverseLaplace ( matrix  a)

Compute inverse matrix using Laplace expansion.

Compute inverse matrix of the given matrix using Laplace expansion.

Parameters:
[in]amatrix to invert
Todo:

Static?

#ifdef 0

Bug:
recursive! Stack overflow
Todo:
a const?

Definition at line 779 of file matrix.cpp.

nr_complex_t qucs::jn ( const int  n,
const nr_complex_t  z 
)

Bessel function of first kind.

Parameters:
[in]norder
[in]zargument
Returns:
Bessel function of first kind of order n
Bug:
Not implemented

Definition at line 729 of file complex.cpp.

vector qucs::jn ( const int  n,
vector  v 
)

Definition at line 1135 of file vector.cpp.

static nr_double_t qucs::kelvin2celsius ( const nr_double_t  x) [inline, static]

Convert Kelvin to Celsius.

Definition at line 120 of file real.h.

Compute limited exponential.

Compute limited exponential:

\[ \begin{cases} \exp r & \text{if } r < \text{M\_LIMEXP} \\ \exp (\text{M\_LIMEXP})\left[1.0 + (r - \text{M\_LIMEXP})\right] & \text{else} \end{cases} \]

limitexp is a constant

Parameters:
[in]rreal number
Returns:
limited exponential of r
Todo:

Change limexp(real) limexp(complex) file order

Document limitexp

Definition at line 350 of file real.cpp.

vector qucs::limexp ( vector  v)

Definition at line 392 of file vector.cpp.

Compute limited complex exponential.

Parameters:
[in]zcomplex number
Returns:
limited exponential of z
Todo:
Change limexp(real) limexp(complex) file order

Definition at line 539 of file complex.cpp.

vector qucs::linspace ( nr_double_t  start,
nr_double_t  stop,
int  points 
)

Definition at line 959 of file vector.cpp.

Definition at line 182 of file real.cpp.

Compute principal value of natural logarithm of z.

Parameters:
[in]zcomplex number
Returns:
principal value of natural logarithm of z

Definition at line 215 of file complex.cpp.

vector qucs::log ( vector  v)

Definition at line 398 of file vector.cpp.

Definition at line 185 of file real.cpp.

Compute principal value of decimal logarithm of z.

Parameters:
[in]zcomplex number
Returns:
principal value of decimal logarithm of z

Definition at line 225 of file complex.cpp.

vector qucs::log10 ( vector  v)

Definition at line 404 of file vector.cpp.

Compute principal value of binary logarithm of z.

Parameters:
[in]zcomplex number
Returns:
principal value of binary logarithm of z

Definition at line 393 of file complex.cpp.

vector qucs::log2 ( vector  v)

Definition at line 410 of file vector.cpp.

vector qucs::logspace ( nr_double_t  start,
nr_double_t  stop,
int  points 
)

Definition at line 974 of file vector.cpp.

template<class nr_type_t >
nr_double_t qucs::maxnorm ( tvector< nr_type_t >  a)

Definition at line 284 of file tvector.cpp.

template<class nr_type_t >
nr_double_t qucs::norm ( tvector< nr_type_t >  a)

Definition at line 245 of file tvector.cpp.

Compute euclidian norm of complex number.

Compute $(\Re\mathrm{e}\;z )^2+ (\Im\mathrm{m}\;z)^2=|z|^2$

Parameters:
[in]zComplex number
Returns:
Euclidian norm of z

Definition at line 283 of file complex.cpp.

vector qucs::norm ( vector  v)

Definition at line 343 of file vector.cpp.

Compute euclidian norm of real number.

Compute $r^2$

Parameters:
[in]rReal number
Returns:
Euclidian norm of r

Definition at line 489 of file real.cpp.

bool qucs::operator!= ( const nr_complex_t  z1,
const nr_complex_t  z2 
)

Inequality of two complex.

Todo:
Why not inline
Note:
Like inequality of double this test is meaningless in finite precision Use instead fabs(x-x0) > tol

Definition at line 865 of file complex.cpp.

nr_complex_t qucs::operator% ( const nr_complex_t  z1,
const nr_complex_t  z2 
)

Modulo.

Todo:
Why not inline

Definition at line 826 of file complex.cpp.

nr_complex_t qucs::operator% ( const nr_complex_t  z1,
const nr_double_t  r2 
)

Modulo.

Todo:
Why not inline

Definition at line 834 of file complex.cpp.

nr_complex_t qucs::operator% ( const nr_double_t  r1,
const nr_complex_t  z2 
)

Modulo.

Todo:
Why not inline

Definition at line 842 of file complex.cpp.

vector qucs::operator% ( vector  v,
const nr_complex_t  z 
)

Definition at line 866 of file vector.cpp.

vector qucs::operator% ( vector  v,
const nr_double_t  d 
)

Definition at line 873 of file vector.cpp.

vector qucs::operator% ( const nr_complex_t  z,
vector  v 
)

Definition at line 880 of file vector.cpp.

vector qucs::operator% ( const nr_double_t  d,
vector  v 
)

Definition at line 887 of file vector.cpp.

vector qucs::operator% ( vector  v1,
vector  v2 
)

Definition at line 894 of file vector.cpp.

template<class nr_type_t >
tvector<nr_type_t> qucs::operator* ( nr_double_t  s,
tvector< nr_type_t >  a 
)

Definition at line 156 of file tvector.cpp.

template<class nr_type_t >
tvector<nr_type_t> qucs::operator* ( tvector< nr_type_t >  a,
nr_double_t  s 
)

Definition at line 164 of file tvector.cpp.

template<class nr_type_t >
tvector<nr_type_t> qucs::operator* ( tvector< nr_type_t >  a,
tvector< nr_type_t >  b 
)

Definition at line 170 of file tvector.cpp.

template<class nr_type_t >
tmatrix<nr_type_t> qucs::operator* ( tmatrix< nr_type_t >  a,
tmatrix< nr_type_t >  b 
)

Definition at line 275 of file tmatrix.cpp.

template<class nr_type_t >
tvector<nr_type_t> qucs::operator* ( tmatrix< nr_type_t >  a,
tvector< nr_type_t >  b 
)

Definition at line 291 of file tmatrix.cpp.

matrix qucs::operator* ( matrix  a,
nr_complex_t  z 
)

Matrix scaling complex version.

Parameters:
[in]amatrix to scale
[in]zscaling complex
Returns:
Scaled matrix
Todo:
Why not a and z const

Definition at line 298 of file matrix.cpp.

template<class nr_type_t >
tvector<nr_type_t> qucs::operator* ( tvector< nr_type_t >  a,
tmatrix< nr_type_t >  b 
)

Definition at line 306 of file tmatrix.cpp.

matrix qucs::operator* ( nr_complex_t  z,
matrix  a 
)

Matrix scaling complex version (different order)

Parameters:
[in]amatrix to scale
[in]zscaling complex
Returns:
Scaled matrix
Todo:

Why not a and z const

Why not inline

Definition at line 313 of file matrix.cpp.

matrix qucs::operator* ( matrix  a,
nr_double_t  d 
)

Matrix scaling complex version.

Parameters:
[in]amatrix to scale
[in]dscaling real
Returns:
Scaled matrix
Todo:
Why not d and a const

Definition at line 323 of file matrix.cpp.

matrix qucs::operator* ( nr_double_t  d,
matrix  a 
)

Matrix scaling real version (different order)

Parameters:
[in]amatrix to scale
[in]dscaling real
Returns:
Scaled matrix
Todo:

Why not inline?

Why not d and a const

Definition at line 338 of file matrix.cpp.

matrix qucs::operator* ( matrix  a,
matrix  b 
)

Matrix multiplication.

Dumb and not optimized matrix multiplication

Parameters:
a]first matrix
b]second matrix
Note:
assert compatibility
Todo:
a and b are const

Definition at line 378 of file matrix.cpp.

matvec qucs::operator* ( matvec  a,
nr_complex_t  z 
)

Definition at line 395 of file matvec.cpp.

matvec qucs::operator* ( nr_complex_t  z,
matvec  a 
)

Definition at line 402 of file matvec.cpp.

matvec qucs::operator* ( matvec  a,
nr_double_t  d 
)

Definition at line 407 of file matvec.cpp.

matvec qucs::operator* ( nr_double_t  d,
matvec  a 
)

Definition at line 414 of file matvec.cpp.

matvec qucs::operator* ( matvec  a,
qucs::vector  b 
)

Definition at line 419 of file matvec.cpp.

matvec qucs::operator* ( qucs::vector  a,
matvec  b 
)

Definition at line 427 of file matvec.cpp.

matvec qucs::operator* ( matvec  a,
matvec  b 
)

Definition at line 454 of file matvec.cpp.

matvec qucs::operator* ( matvec  a,
matrix  b 
)

Definition at line 462 of file matvec.cpp.

matvec qucs::operator* ( matrix  a,
matvec  b 
)

Definition at line 470 of file matvec.cpp.

vector qucs::operator* ( vector  v1,
vector  v2 
)

Definition at line 775 of file vector.cpp.

vector qucs::operator* ( vector  v,
const nr_complex_t  c 
)

Definition at line 788 of file vector.cpp.

vector qucs::operator* ( vector  v,
const nr_double_t  d 
)

Definition at line 794 of file vector.cpp.

vector qucs::operator* ( const nr_complex_t  c,
vector  v 
)

Definition at line 800 of file vector.cpp.

vector qucs::operator* ( const nr_double_t  d,
vector  v 
)

Definition at line 804 of file vector.cpp.

template<class nr_type_t >
tvector<nr_type_t> qucs::operator+ ( tvector< nr_type_t >  a,
tvector< nr_type_t >  b 
)

Definition at line 100 of file tvector.cpp.

matrix qucs::operator+ ( matrix  a,
matrix  b 
)

Matrix addition.

Parameters:
a]first matrix
b]second matrix
Note:
assert same size
Todo:
a and b are const

Definition at line 228 of file matrix.cpp.

template<class nr_type_t >
tvector<nr_type_t> qucs::operator+ ( nr_type_t  s,
tvector< nr_type_t >  a 
)

Definition at line 231 of file tvector.cpp.

template<class nr_type_t >
tvector<nr_type_t> qucs::operator+ ( tvector< nr_type_t >  a,
nr_type_t  s 
)

Definition at line 239 of file tvector.cpp.

matvec qucs::operator+ ( matvec  a,
matvec  b 
)

Definition at line 249 of file matvec.cpp.

matvec qucs::operator+ ( matvec  a,
matrix  b 
)

Definition at line 258 of file matvec.cpp.

matvec qucs::operator+ ( matvec  a,
qucs::vector  b 
)

Definition at line 266 of file matvec.cpp.

matvec qucs::operator+ ( qucs::vector  b,
matvec  a 
)

Definition at line 274 of file matvec.cpp.

matvec qucs::operator+ ( matrix  a,
matvec  b 
)

Definition at line 279 of file matvec.cpp.

matvec qucs::operator+ ( matvec  a,
nr_complex_t  z 
)

Definition at line 284 of file matvec.cpp.

matvec qucs::operator+ ( nr_complex_t  z,
matvec  a 
)

Definition at line 291 of file matvec.cpp.

matvec qucs::operator+ ( matvec  a,
nr_double_t  d 
)

Definition at line 298 of file matvec.cpp.

matvec qucs::operator+ ( nr_double_t  d,
matvec  a 
)

Definition at line 305 of file matvec.cpp.

matrix qucs::operator+ ( matrix  a,
nr_complex_t  z 
)

Complex scalar addition.

Parameters:
[in]amatrix
[in]zcomplex to add
Todo:

Move near other +

a and z are const

Definition at line 399 of file matrix.cpp.

matrix qucs::operator+ ( nr_complex_t  z,
matrix  a 
)

Complex scalar addition different order.

Parameters:
[in]amatrix
[in]zcomplex to add
Todo:

Move near other +

a and z are const

Why not inline

Definition at line 414 of file matrix.cpp.

matrix qucs::operator+ ( matrix  a,
nr_double_t  d 
)

Real scalar addition.

Parameters:
[in]amatrix
[in]dreal to add
Todo:

Move near other +

a and d are const

Definition at line 424 of file matrix.cpp.

matrix qucs::operator+ ( nr_double_t  d,
matrix  a 
)

Real scalar addition different order.

Parameters:
[in]amatrix
[in]dreal to add
Todo:

Move near other +

a and d are const

Why not inline

Definition at line 439 of file matrix.cpp.

vector qucs::operator+ ( vector  v1,
vector  v2 
)

Definition at line 665 of file vector.cpp.

vector qucs::operator+ ( vector  v,
const nr_complex_t  c 
)

Definition at line 678 of file vector.cpp.

vector qucs::operator+ ( const nr_complex_t  c,
vector  v 
)

Definition at line 684 of file vector.cpp.

vector qucs::operator+ ( vector  v,
const nr_double_t  d 
)

Definition at line 688 of file vector.cpp.

vector qucs::operator+ ( const nr_double_t  d,
vector  v 
)

Definition at line 694 of file vector.cpp.

template<class nr_type_t >
tvector<nr_type_t> qucs::operator- ( tvector< nr_type_t >  a,
tvector< nr_type_t >  b 
)

Definition at line 120 of file tvector.cpp.

template<class nr_type_t >
tvector<nr_type_t> qucs::operator- ( tvector< nr_type_t >  a)

Definition at line 204 of file tvector.cpp.

matrix qucs::operator- ( matrix  a,
matrix  b 
)

Matrix subtraction.

Parameters:
a]first matrix
b]second matrix
Note:
assert same size
Todo:
a and b are const

Definition at line 259 of file matrix.cpp.

matvec qucs::operator- ( matvec  a,
nr_complex_t  z 
)

Definition at line 312 of file matvec.cpp.

matvec qucs::operator- ( nr_complex_t  z,
matvec  a 
)

Definition at line 319 of file matvec.cpp.

matvec qucs::operator- ( matvec  a,
nr_double_t  d 
)

Definition at line 326 of file matvec.cpp.

matvec qucs::operator- ( nr_double_t  d,
matvec  a 
)

Definition at line 333 of file matvec.cpp.

matvec qucs::operator- ( matvec  a,
matvec  b 
)

Definition at line 348 of file matvec.cpp.

matvec qucs::operator- ( matvec  a,
matrix  b 
)

Definition at line 357 of file matvec.cpp.

matvec qucs::operator- ( matrix  a,
matvec  b 
)

Definition at line 365 of file matvec.cpp.

matvec qucs::operator- ( matvec  a,
qucs::vector  b 
)

Definition at line 370 of file matvec.cpp.

matvec qucs::operator- ( qucs::vector  b,
matvec  a 
)

Definition at line 375 of file matvec.cpp.

matrix qucs::operator- ( matrix  a,
nr_complex_t  z 
)

Complex scalar substraction.

Parameters:
[in]amatrix
[in]zcomplex to add
Todo:

Move near other +

a and z are const

Why not inline

Definition at line 450 of file matrix.cpp.

matrix qucs::operator- ( nr_complex_t  z,
matrix  a 
)

Complex scalar substraction different order.

Parameters:
[in]amatrix
[in]zcomplex to add
Todo:

Move near other +

a and z are const

Why not inline

Definition at line 461 of file matrix.cpp.

matrix qucs::operator- ( matrix  a,
nr_double_t  d 
)

Real scalar substraction.

Parameters:
[in]amatrix
[in]zreal to add
Todo:

Move near other +

a and z are const

Why not inline

Definition at line 472 of file matrix.cpp.

matrix qucs::operator- ( nr_double_t  d,
matrix  a 
)

Real scalar substraction different order.

Parameters:
[in]amatrix
[in]zreal to add
Todo:

Move near other +

a and z are const

Why not inline

Definition at line 483 of file matrix.cpp.

vector qucs::operator- ( vector  v1,
vector  v2 
)

Definition at line 721 of file vector.cpp.

vector qucs::operator- ( vector  v,
const nr_complex_t  c 
)

Definition at line 734 of file vector.cpp.

vector qucs::operator- ( vector  v,
const nr_double_t  d 
)

Definition at line 740 of file vector.cpp.

vector qucs::operator- ( const nr_complex_t  c,
vector  v 
)

Definition at line 746 of file vector.cpp.

vector qucs::operator- ( const nr_double_t  d,
vector  v 
)

Definition at line 752 of file vector.cpp.

matrix qucs::operator/ ( matrix  a,
nr_complex_t  z 
)

Matrix scaling division by complex version.

Parameters:
[in]amatrix to scale
[in]zscaling complex
Returns:
Scaled matrix
Todo:
Why not a and z const

Definition at line 348 of file matrix.cpp.

matrix qucs::operator/ ( matrix  a,
nr_double_t  d 
)

Matrix scaling division by real version.

Parameters:
[in]amatrix to scale
[in]dscaling real
Returns:
Scaled matrix
Todo:
Why not a and d const

Definition at line 362 of file matrix.cpp.

matvec qucs::operator/ ( matvec  a,
nr_complex_t  z 
)

Definition at line 432 of file matvec.cpp.

matvec qucs::operator/ ( matvec  a,
nr_double_t  d 
)

Definition at line 439 of file matvec.cpp.

matvec qucs::operator/ ( matvec  a,
qucs::vector  b 
)

Definition at line 446 of file matvec.cpp.

vector qucs::operator/ ( vector  v1,
vector  v2 
)

Definition at line 825 of file vector.cpp.

vector qucs::operator/ ( vector  v,
const nr_complex_t  c 
)

Definition at line 840 of file vector.cpp.

vector qucs::operator/ ( vector  v,
const nr_double_t  d 
)

Definition at line 846 of file vector.cpp.

vector qucs::operator/ ( const nr_complex_t  c,
vector  v 
)

Definition at line 852 of file vector.cpp.

vector qucs::operator/ ( const nr_double_t  d,
vector  v 
)

Definition at line 859 of file vector.cpp.

template<class nr_type_t >
bool qucs::operator< ( tvector< nr_type_t >  a,
tvector< nr_type_t >  b 
)

Definition at line 213 of file tvector.cpp.

bool qucs::operator< ( const nr_complex_t  z1,
const nr_complex_t  z2 
)

Inferior.

Todo:
Why not inline

Definition at line 897 of file complex.cpp.

bool qucs::operator<= ( const nr_complex_t  z1,
const nr_complex_t  z2 
)

Inferior of equal.

Todo:
Why not inline

Definition at line 881 of file complex.cpp.

bool qucs::operator== ( const nr_complex_t  z1,
const nr_complex_t  z2 
)

Equality of two complex.

Todo:
Why not inline
Note:
Like equality of double this test is meaningless in finite precision Use instead fabs(x-x0) < tol

Definition at line 854 of file complex.cpp.

template<class nr_type_t >
bool qucs::operator> ( tvector< nr_type_t >  a,
tvector< nr_type_t >  b 
)

Definition at line 222 of file tvector.cpp.

bool qucs::operator> ( const nr_complex_t  z1,
const nr_complex_t  z2 
)

Superior.

Todo:
Why not inline

Definition at line 889 of file complex.cpp.

bool qucs::operator>= ( const nr_complex_t  z1,
const nr_complex_t  z2 
)

Superior of equal.

Todo:
Why not inline

Definition at line 873 of file complex.cpp.

nr_complex_t qucs::polar ( const nr_double_t  mag,
const nr_double_t  ang 
)

Construct a complex number using polar notation.

Parameters:
[in]magMagnitude
[in]angAngle
Returns:
complex number in rectangular form

Definition at line 551 of file complex.cpp.

nr_complex_t qucs::polar ( const nr_complex_t  a,
const nr_complex_t  p 
)

Extension of polar construction to complex.

Parameters:
[in]aMagnitude
[in]pAngle
Returns:
complex number in rectangular form
Bug:
Do not seems holomorph form of real polar
Bug:
are these needed/used?

Definition at line 566 of file complex.cpp.

vector qucs::polar ( const nr_complex_t  a,
vector  v 
)

Definition at line 1147 of file vector.cpp.

vector qucs::polar ( vector  v,
const nr_complex_t  p 
)

Definition at line 1153 of file vector.cpp.

vector qucs::polar ( vector  a,
vector  p 
)

Definition at line 1159 of file vector.cpp.

matvec qucs::pow ( matvec  ,
vector   
)
nr_double_t qucs::pow ( const nr_double_t  a,
const nr_double_t  b 
)

Definition at line 193 of file real.cpp.

nr_complex_t qucs::pow ( const nr_complex_t  z,
const nr_double_t  d 
)

Compute power function with real exponent.

Parameters:
[in]zcomplex mantisse
[in]dreal exponent
Returns:
z power d ( $z^d$)

Definition at line 238 of file complex.cpp.

nr_complex_t qucs::pow ( const nr_double_t  d,
const nr_complex_t  z 
)

Compute power function with complex exponent but real mantisse.

Parameters:
[in]dreal mantisse
[in]zcomplex exponent
Returns:
d power z ( $d^z$)

Definition at line 248 of file complex.cpp.

nr_complex_t qucs::pow ( const nr_complex_t  z1,
const nr_complex_t  z2 
)

Compute complex power function.

Parameters:
[in]z1complex mantisse
[in]z2complex exponent
Returns:
d power z ( $z_1^{z_2}$)

Definition at line 258 of file complex.cpp.

vector qucs::pow ( vector  v,
const nr_complex_t  z 
)

Definition at line 416 of file vector.cpp.

vector qucs::pow ( vector  v,
const nr_double_t  d 
)

Definition at line 422 of file vector.cpp.

vector qucs::pow ( const nr_complex_t  z,
vector  v 
)

Definition at line 428 of file vector.cpp.

vector qucs::pow ( const nr_double_t  d,
vector  v 
)

Definition at line 434 of file vector.cpp.

vector qucs::pow ( vector  v1,
vector  v2 
)

Definition at line 440 of file vector.cpp.

matvec qucs::pow ( matvec  a,
int  n 
)

Definition at line 494 of file matvec.cpp.

matvec qucs::pow ( matvec  a,
qucs::vector  v 
)

Definition at line 501 of file matvec.cpp.

matrix qucs::pow ( matrix  a,
int  n 
)

Definition at line 632 of file matrix.cpp.

nr_complex_t qucs::prod ( vector  v)

Definition at line 266 of file vector.cpp.

Quartic function.

Parameters:
[in]rReal number
Returns:
$x^4$

Definition at line 324 of file real.cpp.

matrix qucs::rad2deg ( matrix  )

rad2deg Convert radian to degree

Parameters:
xinput
Returns:
input in degree (x)*180/pi

Definition at line 516 of file real.cpp.

matvec qucs::rad2deg ( matvec  a)

Definition at line 687 of file matvec.cpp.

rad2deg Convert radian to degree

Parameters:
xinput
Returns:
real(x)*180/pi

Definition at line 907 of file complex.cpp.

vector qucs::rad2deg ( vector  v)

Definition at line 1117 of file vector.cpp.

vector qucs::real ( vector  v)

Definition at line 355 of file vector.cpp.

Real part of real number.

Parameters:
[in]rReal number
Returns:
Real part of r ie r

Definition at line 470 of file real.cpp.

matvec qucs::real ( matvec  a)

Definition at line 538 of file matvec.cpp.

matrix qucs::real ( matrix  a)

Real part matrix.

Parameters:
[in]amatrix
Todo:

add real in place

a is const

Definition at line 568 of file matrix.cpp.

nr_double_t qucs::rollet ( matrix  )
qucs::vector qucs::rollet ( matvec  m)

Definition at line 671 of file matvec.cpp.

Definition at line 273 of file real.cpp.

Complex round Round is the nearest integral value Apply round to real and imaginary part.

Parameters:
[in]zcomplex number
Returns:
rounded complex number

Definition at line 496 of file complex.cpp.

vector qucs::round ( vector  v)

Definition at line 1049 of file vector.cpp.

vector qucs::rtoy ( vector  v,
nr_complex_t  zref 
)

Definition at line 593 of file vector.cpp.

Converts reflexion coefficient to admittance.

Parameters:
[in]rreflexion coefficient
[in]zrefnormalisation impedance
Returns:
admittance

Definition at line 608 of file complex.cpp.

vector qucs::rtoz ( vector  v,
nr_complex_t  zref 
)

Definition at line 586 of file vector.cpp.

Converts reflexion coefficient to impedance.

Parameters:
[in]rreflexion coefficient
[in]zrefnormalisation impedance
Returns:
impedance

Definition at line 590 of file complex.cpp.

qucs::vector qucs::runavg ( qucs::vector  ,
const int   
)
vector qucs::runavg ( const nr_complex_t  x,
const int  n 
)

Definition at line 1243 of file vector.cpp.

vector qucs::runavg ( vector  v,
const int  n 
)

Definition at line 1249 of file vector.cpp.

template<class nr_type_t >
nr_type_t qucs::scalar ( tvector< nr_type_t >  a,
tvector< nr_type_t >  b 
)

Definition at line 180 of file tvector.cpp.

Definition at line 291 of file real.cpp.

Compute complex hyperbolic secant.

Parameters:
[in]zcomplex angle
Returns:
hyperbolic secant of z

Definition at line 343 of file complex.cpp.

vector qucs::sech ( vector  v)

Definition at line 523 of file vector.cpp.

vector qucs::sign ( vector  v)

Definition at line 284 of file vector.cpp.

real sign function

compute

\[ \mathrm{sign}\;d= = \begin{cases} 1 & \text{if } d\ge 0 \\ -1 & \text{if } d<0 \end{cases} \]

Parameters:
[in]dreal number
Returns:
sign of d
Todo:
Move near complex sign

Definition at line 386 of file real.cpp.

complex sign function

compute

\[ \mathrm{sign}\;z= \mathrm{sign} (re^{i\theta}) = \begin{cases} 1 & \text{if } z=0 \\ e^{i\theta} & \text{else} \end{cases} \]

Parameters:
[in]zcomplex number
Returns:
sign of z
Todo:
Better implementation z/abs(z) is not really stable

Definition at line 435 of file complex.cpp.

vector qucs::signum ( vector  v)

Definition at line 278 of file vector.cpp.

real signum function

compute

\[ \mathrm{signum}\;d= = \begin{cases} O & \text{if } d=0 \\ 1 & \text{if } d>0 \\ -1 & \text{if } d<0 \end{cases} \]

Parameters:
[in]dreal number
Returns:
signum of d
Todo:
Move near complex signum

Definition at line 368 of file real.cpp.

complex signum function

compute

\[ \mathrm{signum}\;z= \mathrm{signum} (re^{i\theta}) = \begin{cases} 0 & \text{if } z=0 \\ e^{i\theta} & \text{else} \end{cases} \]

Parameters:
[in]zcomplex number
Returns:
signum of z
Todo:
Better implementation z/abs(z) is not really stable

Definition at line 416 of file complex.cpp.

Compute sine of an angle.

Parameters:
[in]zangle in radians
Returns:
sine of z

Definition at line 55 of file real.cpp.

Compute complex sine.

Parameters:
[in]zcomplex angle
Returns:
sine of z

Definition at line 66 of file complex.cpp.

vector qucs::sin ( vector  v)

Definition at line 457 of file vector.cpp.

vector qucs::sinc ( vector  v)

Definition at line 331 of file vector.cpp.

Real cardinal sinus.

Compute $\mathrm{sinc}\;d=\frac{\sin d}{d}$

Parameters:
[in]dreal number
Returns:
cardianal sinus of s
Todo:
Why not inline

Definition at line 397 of file real.cpp.

Cardinal sine.

Compute $\mathrm{sinc}\;z=\frac{\sin z}{z}$

Parameters:
[in]zcomplex number
Returns:
cardianal sine of z

Definition at line 448 of file complex.cpp.

Compute hyperbolic sine.

Parameters:
[in]zarc
Returns:
hyperbolic sine of z

Definition at line 116 of file real.cpp.

Compute complex hyperbolic sine.

Parameters:
[in]zcomplex arc
Returns:
hyperbolic sine of z

Definition at line 144 of file complex.cpp.

vector qucs::sinh ( vector  v)

Definition at line 505 of file vector.cpp.

static int qucs::sortfunc ( struct nodelist_t *  n) [static]

Definition at line 182 of file nodelist.cpp.

Square a value.

Parameters:
[in]rReal number
Returns:
$x^2$

Definition at line 309 of file real.cpp.

unsigned int qucs::sqr ( unsigned int  r)

Definition at line 313 of file real.cpp.

matvec qucs::sqr ( matvec  a)

Definition at line 489 of file matvec.cpp.

matrix qucs::sqr ( matrix  a)

Multiply a matrix by itself.

Parameters:
[in]amatrix

Definition at line 592 of file matrix.cpp.

Square of complex number.

Parameters:
[in]zcomplex number
Returns:
squared complex number

Definition at line 673 of file complex.cpp.

vector qucs::sqr ( vector  v)

Definition at line 1055 of file vector.cpp.

Definition at line 198 of file real.cpp.

Compute principal value of square root.

Compute the square root of a given complex number (except negative real), and with a branch cut along the negative real axis.

Parameters:
[in]zcomplex number
Returns:
principal value of square root z

Definition at line 271 of file complex.cpp.

vector qucs::sqrt ( vector  v)

Definition at line 380 of file vector.cpp.

Heaviside step function.

The Heaviside step function, H, also called unit step function, is a discontinuous function whose value is zero for negative argument and one for positive argument. For zero by convention, H(0)=0.5

Parameters:
[in]dHeaviside argument
Returns:
Heaviside step
Todo:
Create Heaviside alias

Definition at line 429 of file real.cpp.

Heaviside step function for complex number.

Apply Heaviside to real and imaginary part

Parameters:
[in]zHeaviside argument
Returns:
Heaviside step
Todo:

Create Heaviside alias

Why not using real heaviside

Definition at line 691 of file complex.cpp.

vector qucs::step ( vector  v)

Definition at line 1061 of file vector.cpp.

matrix qucs::stoa ( matrix  s,
nr_complex_t  z1,
nr_complex_t  z2 
)

Converts chain matrix to scattering parameters.

Converts scattering parameters to chain matrix. Formulae are given by [5] tab 1. and are remembered here:

\begin{align*} A&=\frac{(Z_{01}^*+S_{11}Z_{01})(1-S_{22}) +S_{12}S_{21}Z_{01}}{\Delta} \\ B&=\frac{(Z_{01}^*+S_{11}Z_{01})(Z_{02}^*+S_{22}Z_{02}) -S_{12}S_{21}Z_{01}Z_{02}}{\Delta} \\ C&=\frac{(1-S_{11})(1-S_{22}) -S_{12}S_{21}}{\Delta} \\ D&=\frac{(1-S_{11})(Z_{02}^*+S_{22}Z_{02}) +S_{12}S_{21}Z_{02}}{\Delta} \end{align*}

Where:

\[ \Delta = 2 S_{21}\sqrt{\Re\text{e}\;Z_{01}\Re\text{e}\;Z_{02}} \]

Bug:
Do not need fabs
Parameters:
[in]sScattering matrix
[in]z1impedance at input 1
[in]z2impedance at input 2
Returns:
Chain matrix
Note:
Assert 2 by 2 matrix
Todo:
Why not s,z1,z2 const

Definition at line 1181 of file matrix.cpp.

matrix qucs::stog ( matrix  s,
nr_complex_t  z1,
nr_complex_t  z2 
)

Definition at line 1331 of file matrix.cpp.

matrix qucs::stoh ( matrix  s,
nr_complex_t  z1,
nr_complex_t  z2 
)

Converts scattering parameters to hybrid matrix.

Converts chain matrix to scattering parameters Formulae are given by [5] and are remembered here:

\begin{align*} h_{11}&=\frac{(Z_{01}^*+S_{11}Z_{01}) (Z_{02}^*+S_{22}Z_{02}) -S_{12}S_{21}Z_{01}Z_{02}}{\Delta}\\ h_{12}&=\frac{2S_{12} (\Re\text{e}\;Z_{01} \Re\text{e}\;Z_{02})^\frac{1}{2}} {\Delta} \\ h_{21}&=\frac{-2S_{21} (\Re\text{e}\;Z_{01} \Re\text{e}\;Z_{02})^\frac{1}{2}} {\Delta} \\ h_{22}&=\frac{(1-S_{11})(1-S_{22})-S_{12}S_{21}}{\Delta} \end{align*}

Where $\Delta$ is:

\[ \Delta=(1-S_{11})(Z_{02}^*+S_{22}Z_{02})+S_{12}S_{21}Z_{02} \]

Bug:
{Programmed formulae are valid only for Z real}
Parameters:
[in]sScattering matrix
[in]z1impedance at input 1
[in]z2impedance at input 2
Returns:
hybrid matrix
Note:
Assert 2 by 2 matrix
Todo:
Why not s,z1,z2 const

Definition at line 1269 of file matrix.cpp.

matvec qucs::stos ( matvec  ,
vector  ,
nr_complex_t  z0 = 50.0 
)
matvec qucs::stos ( matvec  ,
nr_complex_t  ,
vector   
)
matvec qucs::stos ( matvec  ,
vector  ,
vector   
)
matrix qucs::stos ( matrix  ,
vector  ,
nr_complex_t  z0 = 50.0 
)
matrix qucs::stos ( matrix  ,
nr_complex_t  ,
vector   
)
matrix qucs::stos ( matrix  ,
vector  ,
vector   
)
matvec qucs::stos ( matvec  s,
qucs::vector  zref,
qucs::vector  z0 
)

Definition at line 568 of file matvec.cpp.

matvec qucs::stos ( matvec  s,
nr_complex_t  zref,
nr_complex_t  z0 
)

Definition at line 577 of file matvec.cpp.

matvec qucs::stos ( matvec  s,
nr_double_t  zref,
nr_double_t  z0 
)

Definition at line 582 of file matvec.cpp.

matvec qucs::stos ( matvec  s,
qucs::vector  zref,
nr_complex_t  z0 
)

Definition at line 586 of file matvec.cpp.

matvec qucs::stos ( matvec  s,
nr_complex_t  zref,
qucs::vector  z0 
)

Definition at line 590 of file matvec.cpp.

matrix qucs::stos ( matrix  s,
qucs::vector  zref,
qucs::vector  z0 
)

S params to S params.

Convert scattering parameters with the reference impedance 'zref' to scattering parameters with the reference impedance 'z0'.

Detail are given in [1], under equation (32)

New scatering matrix $S'$ is:

\[ S'=A^{-1}(S-\Gamma^+)(I-\Gamma S)^{-1}A^+ \]

Where x^+ is the adjoint (or complex tranposate) of x, I the identity matrix and $A$ is diagonal the matrix such as: $ \Gamma_i= r_i $ and $A$ the diagonal matrix such as:

\[ A_i = \frac{(1-r_i^*)\sqrt{|1-r_ir_i^*|}}{|1-r_i|} \]

Where $x*$ is the complex conjugate of $x$ and $r_i$ is wave reflexion coefficient of $Z_i'$ with respect to $Z_i^*$ (where $Z_i'$ is the new impedance and $Z_i$ is the old impedance), ie:

\[ r_i = \frac{Z_i'-Z_i}{Z_i'-Z_i^*} \]

Parameters:
[in]soriginal S matrix
[in]zreforiginal reference impedance
[in]z0new reference impedance
Bug:
This formula is valid only for real z!
Todo:

Correct documentation about standing waves [1-4]

Implement Speciale implementation [2-3] if applicable

Returns:
Renormalized scattering matrix
Todo:
s, zref and z0 const

Definition at line 890 of file matrix.cpp.

matrix qucs::stos ( matrix  s,
nr_complex_t  zref,
nr_complex_t  z0 
)

S renormalization with all part identic.

Parameters:
[in]soriginal S matrix
[in]zreforiginal reference impedance
[in]z0new reference impedance
Todo:
Why not inline
Returns:
Renormalized scattering matrix
Todo:
s, zref and z0 const

Definition at line 910 of file matrix.cpp.

matrix qucs::stos ( matrix  s,
nr_double_t  zref,
nr_double_t  z0 
)

S renormalization with all part identic and real.

Parameters:
[in]soriginal S matrix
[in]zreforiginal reference impedance
[in]z0new reference impedance
Todo:
Why not inline
Returns:
Renormalized scattering matrix
Todo:
s, zref and z0 const

Definition at line 923 of file matrix.cpp.

matrix qucs::stos ( matrix  s,
qucs::vector  zref,
nr_complex_t  z0 
)

S renormalization (variation)

Parameters:
[in]soriginal S matrix
[in]zreforiginal reference impedance
[in]z0new reference impedance
Todo:
Why not inline
Returns:
Renormalized scattering matrix
Todo:
s, zref and z0 const

Definition at line 935 of file matrix.cpp.

matrix qucs::stos ( matrix  s,
nr_complex_t  zref,
qucs::vector  z0 
)

S renormalization (variation)

Parameters:
[in]soriginal S matrix
[in]zreforiginal reference impedance
[in]z0new reference impedance
Todo:

Why not inline

s, zref and z0 const

Returns:
Renormalized scattering matrix

Definition at line 947 of file matrix.cpp.

matvec qucs::stoy ( matvec  ,
vector   
)
matrix qucs::stoy ( matrix  ,
vector   
)
matvec qucs::stoy ( matvec  s,
qucs::vector  z0 
)

Definition at line 595 of file matvec.cpp.

matvec qucs::stoy ( matvec  s,
nr_complex_t  z0 
)

Definition at line 602 of file matvec.cpp.

matrix qucs::stoy ( matrix  s,
qucs::vector  z0 
)

Scattering parameters to admittance matrix.

Convert scattering parameters to admittance matrix. According to [1] eq (19):

\[ Z=F^{-1} (I- S)^{-1} (SG + G^+) F \]

Where $S$ is the scattering matrix, $x^+$ is the adjoint of x, I the identity matrix. The matrix F and G are diagonal matrix defined by:

\begin{align*} F_i&=\frac{1}{2\sqrt{\Re\text{e}\; Z_i}} \\ G_i&=Z_i \end{align*}

Using the well know formula $(AB)^{-1}=B^{1}A^{1}$, we derivate:

\[ Y=F^{-1} (SG+G^+)^{-1} (I-S) F \]

Parameters:
[in]sScattering matrix
[in]z0Normalisation impedance
Note:
We could safely drop the $1/2$ in $F$ because we compute $FXF^{-1}$ and therefore $1/2$ will simplify.
Bug:
not correct if zref is complex
Todo:
s and z0 const
Returns:
Admittance matrix

Definition at line 1082 of file matrix.cpp.

matrix qucs::stoy ( matrix  s,
nr_complex_t  z0 
)

Convert scattering pto adminttance parameters identic case.

Parameters:
[in]SScattering matrix
[in]z0Normalisation impedance
Returns:
Admittance matrix
Todo:

Why not inline

s and z0 const

Definition at line 1101 of file matrix.cpp.

matvec qucs::stoz ( matvec  ,
vector   
)
matrix qucs::stoz ( matrix  ,
vector   
)
matvec qucs::stoz ( matvec  s,
qucs::vector  z0 
)

Definition at line 619 of file matvec.cpp.

matvec qucs::stoz ( matvec  s,
nr_complex_t  z0 
)

Definition at line 626 of file matvec.cpp.

matrix qucs::stoz ( matrix  s,
qucs::vector  z0 
)

Scattering parameters to impedance matrix.

Convert scattering parameters to impedance matrix. According to [1] eq (19):

\[ Z=F^{-1} (I- S)^{-1} (SG + G^+) F \]

Where $S$ is the scattering matrix, $x^+$ is the adjoint of x, I the identity matrix. The matrix F and G are diagonal matrix defined by:

\begin{align*} F_i&=\frac{1}{2\sqrt{\Re\text{e}\; Z_i}} \\ G_i&=Z_i \end{align*}

Parameters:
[in]sScattering matrix
[in]z0Normalisation impedance
Note:
We could safely drop the $1/2$ in $F$ because we compute $FXF^{-1}$ and therefore $1/2$ will simplify.
Bug:
not correct if zref is complex
Todo:
s, z0 const
Returns:
Impedance matrix

Definition at line 973 of file matrix.cpp.

matrix qucs::stoz ( matrix  s,
nr_complex_t  z0 
)

Scattering parameters to impedance matrix identic case.

Parameters:
[in]sScattering matrix
[in]z0Normalisation impedance
Returns:
Impedance matrix
Todo:

Why not inline?

s and z0 const?

Definition at line 992 of file matrix.cpp.

template<class nr_type_t >
nr_type_t qucs::sum ( tvector< nr_type_t >  a)

Definition at line 196 of file tvector.cpp.

nr_complex_t qucs::sum ( vector  v)

Definition at line 260 of file vector.cpp.

Compute tangent of an angle.

Parameters:
[in]zangle in radians
Returns:
tangent of z

Definition at line 63 of file real.cpp.

Compute complex tangent.

Parameters:
[in]zcomplex angle
Returns:
tangent of z

Definition at line 75 of file complex.cpp.

vector qucs::tan ( vector  v)

Definition at line 481 of file vector.cpp.

Compute hyperbolic tangent.

Parameters:
[in]zarc
Returns:
hyperbolic tangent of z

Definition at line 124 of file real.cpp.

Compute complex hyperbolic tangent.

Parameters:
[in]zcomplex arc
Returns:
hyperbolic tangent of z

Definition at line 153 of file complex.cpp.

vector qucs::tanh ( vector  v)

Definition at line 547 of file vector.cpp.

template<class nr_type_t >
tmatrix<nr_type_t> qucs::teye ( int  n)

Definition at line 247 of file tmatrix.cpp.

matrix qucs::transpose ( matrix  a)

Matrix transposition.

Parameters:
[in]aMatrix to transpose
Todo:

add transpose in place

a is const

Definition at line 492 of file matrix.cpp.

matvec qucs::transpose ( matvec  a)

Definition at line 560 of file matvec.cpp.

Definition at line 264 of file real.cpp.

Complex trunc Apply round to integer, towards zero to real and imaginary part.

Parameters:
[in]zcomplex number
Returns:
rounded complex number

Definition at line 512 of file complex.cpp.

matvec qucs::twoport ( matvec  m,
char  in,
char  out 
)

Definition at line 661 of file matvec.cpp.

matrix qucs::twoport ( matrix  m,
char  in,
char  out 
)

Generic conversion matrix.

This function converts 2x2 matrices from any of the matrix forms Y, Z, H, G and A to any other. Also converts S<->(A, T, H, Y and Z) matrices. Convertion assumed:

Y->Y, Y->Z, Y->H, Y->G, Y->A, Y->S, Z->Y, Z->Z, Z->H, Z->G, Z->A, Z->S, H->Y, H->Z, H->H, H->G, H->A, H->S, G->Y, G->Z, G->H, G->G, G->A, G->S, A->Y, A->Z, A->H, A->G, A->A, A->S, S->Y, S->Z, S->H, S->G, S->A, S->S, S->T,T->T,T->S

Note:
assert 2x2 matrix
Parameters:
[in]mbase matrix
[in]inmatrix
[in]outmatrix
Returns:
matrix given by format out
Todo:
m, in, out const

Definition at line 1594 of file matrix.cpp.

vector qucs::unwrap ( vector  v,
nr_double_t  tol,
nr_double_t  step 
)

Definition at line 244 of file vector.cpp.

vector qucs::w2dbm ( vector  v)

Definition at line 1207 of file vector.cpp.

nr_double_t qucs::xhypot ( const nr_double_t  a,
const nr_double_t  b 
)

Euclidean distance function.

The xhypot() function returns $\sqrt{a^2+b^2}$. This is the length of the hypotenuse of a right-angle triangle with sides of length a and b, or the distance of the point (a,b) from the origin.

Parameters:
[in]afirst length
[in]bsecond length
Returns:
Euclidean distance from (0,0) to (a,b): $\sqrt{a^2+b^2}$

Definition at line 213 of file real.cpp.

vector qucs::xhypot ( vector  v,
const nr_complex_t  z 
)

Definition at line 290 of file vector.cpp.

vector qucs::xhypot ( vector  v,
const nr_double_t  d 
)

Definition at line 296 of file vector.cpp.

vector qucs::xhypot ( const nr_complex_t  z,
vector  v 
)

Definition at line 302 of file vector.cpp.

vector qucs::xhypot ( const nr_double_t  d,
vector  v 
)

Definition at line 308 of file vector.cpp.

vector qucs::xhypot ( vector  v1,
vector  v2 
)

Definition at line 314 of file vector.cpp.

nr_double_t qucs::xhypot ( const nr_complex_t  a,
const nr_complex_t  b 
)

Euclidean distance function for complex argument.

The xhypot() function returns $\sqrt{a^2+b^2}$. This is the length of the hypotenuse of a right-angle triangle with sides of length a and b, or the distance of the point (a,b) from the origin.

Parameters:
[in]afirst length
[in]bsecond length
Returns:
Euclidean distance from (0,0) to (a,b): $\sqrt{a^2+b^2}$

Definition at line 465 of file complex.cpp.

Euclidean distance function for a double b complex.

Definition at line 478 of file complex.cpp.

Euclidean distance function for b double a complex.

Definition at line 484 of file complex.cpp.

nr_complex_t qucs::yn ( const int  n,
const nr_complex_t  z 
)

Bessel function of second kind.

Parameters:
[in]norder
[in]zargument
Returns:
Bessel function of second kind of order n
Bug:
Not implemented

Definition at line 742 of file complex.cpp.

vector qucs::yn ( const int  n,
vector  v 
)

Definition at line 1141 of file vector.cpp.

vector qucs::ytor ( vector  v,
nr_complex_t  zref 
)

Definition at line 579 of file vector.cpp.

Converts admittance to reflexion coefficient.

Parameters:
[in]yadmitance
[in]zrefnormalisation impedance
Returns:
reflexion coefficient

Definition at line 599 of file complex.cpp.

matvec qucs::ytos ( matvec  ,
vector   
)
matrix qucs::ytos ( matrix  ,
vector   
)
matvec qucs::ytos ( matvec  y,
qucs::vector  z0 
)

Definition at line 607 of file matvec.cpp.

matvec qucs::ytos ( matvec  y,
nr_complex_t  z0 
)

Definition at line 614 of file matvec.cpp.

matrix qucs::ytos ( matrix  y,
qucs::vector  z0 
)

Admittance matrix to scattering parameters.

Convert admittance matrix to scattering parameters. Using the same methodology as [1] eq (16-19), but writing (16) as $i=Yv$, ie

\[ S=F(I-G^+Y)(I-GY)^{-1}F^{-1} \]

Where $S$ is the scattering matrix, $x^+$ is the adjoint of x, I the identity matrix. The matrix F and G are diagonal matrix defined by:

\begin{align*} F_i&=\frac{1}{2\sqrt{\Re\text{e}\; Z_i}} \\ G_i&=Z_i \end{align*}

Using the well know formula $(AB)^{-1}=B^{1}A^{1}$, we derivate:

\[ Y=F^{-1} (SG+G^+)^{-1} (I-S) F \]

Parameters:
[in]yadmittance matrix
[in]z0Normalisation impedance
Note:
We could safely drop the $1/2$ in $F$ because we compute $FXF^{-1}$ and therefore $1/2$ will simplify.
Bug:
not correct if zref is complex
Todo:
why not y and z0 const
Returns:
Scattering matrix

Definition at line 1133 of file matrix.cpp.

matrix qucs::ytos ( matrix  y,
nr_complex_t  z0 
)

Convert Admittance matrix to scattering parameters identic case.

Parameters:
[in]yAdmittance matrix
[in]z0Normalisation impedance
Returns:
Scattering matrix
Todo:

Why not inline

y and z0 const

Definition at line 1151 of file matrix.cpp.

matvec qucs::ytoz ( matvec  y)

Definition at line 651 of file matvec.cpp.

matrix qucs::ytoz ( matrix  y)

Convert admittance matrix to impedance matrix.

Convert $Y$ matrix to $Z$ matrix using well known relation $Z=Y^{-1}$

Parameters:
[in]yadmittance matrix
Returns:
Impedance matrix
Note:
Check if y matrix is a square matrix
Todo:

Why not inline

y const

move near ztoy()

Definition at line 1380 of file matrix.cpp.

vector qucs::ztor ( vector  v,
nr_complex_t  zref 
)

Definition at line 572 of file vector.cpp.

Converts impedance to reflexion coefficient.

Parameters:
[in]zimpedance
[in]zrefnormalisation impedance
Returns:
reflexion coefficient

Definition at line 581 of file complex.cpp.

matvec qucs::ztos ( matvec  ,
vector   
)
matrix qucs::ztos ( matrix  ,
vector   
)
matvec qucs::ztos ( matvec  z,
qucs::vector  z0 
)

Definition at line 631 of file matvec.cpp.

matvec qucs::ztos ( matvec  z,
nr_complex_t  z0 
)

Definition at line 638 of file matvec.cpp.

matrix qucs::ztos ( matrix  z,
qucs::vector  z0 
)

Convert impedance matrix scattering parameters.

Convert scattering parameters to impedance matrix. According to [1] eq (18):

\[ S=F(Z-G^+)(Z+G)^{-1} F^{-1} \]

Where $Z$ is the scattering matrix, $x^+$ is the adjoint of x, I the identity matrix. The matrix F and G are diagonal matrix defined by:

\begin{align*} F_i&=\frac{1}{2\sqrt{\Re\text{e}\; Z_i}} \\ G_i&=Z_i \end{align*}

Parameters:
[in]ZImpedance matrix
[in]z0Normalisation impedance
Returns:
Scattering matrix
Note:
We could safely drop the $1/2$ in $F$ because we compute $FXF^{-1}$ and therefore $1/2$ will simplify.
Bug:
not correct if zref is complex
Todo:
z and z0 const?

Definition at line 1018 of file matrix.cpp.

matrix qucs::ztos ( matrix  z,
nr_complex_t  z0 
)

Convert impedance matrix to scattering parameters identic case.

Parameters:
[in]ZImpedance matrix
[in]z0Normalisation impedance
Returns:
Scattering matrix
Todo:

Why not inline

z and z0 const

Definition at line 1037 of file matrix.cpp.

matvec qucs::ztoy ( matvec  z)

Definition at line 643 of file matvec.cpp.

matrix qucs::ztoy ( matrix  z)

impedance matrix to admittance matrix.

Convert impedance matrix to admittance matrix. By definition $Y=Z^{-1}$

Parameters:
[in]zimpedance matrix
Returns:
Admittance matrix
Todo:

Why not inline

z const

Definition at line 1050 of file matrix.cpp.