71 int len2 = 2 + len *
sizeof (nr_double_t);
73 ry = (nr_double_t *) malloc (len2 *
sizeof (nr_double_t));
74 memcpy (
ry, y, len1 *
sizeof (nr_double_t));
77 rx = (nr_double_t *) malloc (len2 *
sizeof (nr_double_t));
78 memcpy (
rx, x, len1 *
sizeof (nr_double_t));
89 int len2 = 2 + len *
sizeof (nr_double_t);
92 ry = (nr_double_t *) malloc (len2 *
sizeof (nr_double_t));
96 rx = (nr_double_t *) malloc (len2 *
sizeof (nr_double_t));
114 rx = (nr_double_t *) malloc (len2 *
sizeof (nr_double_t));
115 memcpy (
rx, x, len1 *
sizeof (nr_double_t));
130 for (
int i = 0;
i < len1;
i++)
cy[
i] = y->
get (
i);
133 rx = (nr_double_t *) malloc (len2 *
sizeof (nr_double_t));
162 for (
int i = 0; i <
length; i++) {
177 if (
repeat & REPEAT_YES) {
216 av = lo + ((hi - lo) / 2);
225 if (lo <= length && lo > 0 && x >=
rx[lo - 1])
237 if (x >=
rx[
i]) idx =
i;
244 nr_double_t x1, nr_double_t x2,
245 nr_double_t y1, nr_double_t y2) {
247 return (y1 + y2) / 2;
249 return ((x2 - x) * y1 + (x - x1) * y2) / (x2 - x1);
259 nr_double_t x1, x2,
r,
i;
261 x1 =
rx[idx]; x2 =
rx[idx+1];
262 y1 =
cy[idx]; y2 =
cy[idx+1];
273 nr_double_t res = 0.0;
295 if (idx ==
length - 1) idx--;
339 if (idx ==
length - 1) idx--;
std::complex< nr_double_t > nr_complex_t
nr_complex_t clinear(nr_double_t, int)
poly evaluate(nr_double_t)
void prepare(int, int, int domain=DATA_RECTANGULAR)
matrix real(matrix a)
Real part matrix.
matrix abs(matrix a)
Computes magnitude of each matrix element.
void vectors(qucs::vector, qucs::vector)
nr_double_t rinterpolate(nr_double_t)
matrix imag(matrix a)
Imaginary part matrix.
nr_double_t linear(nr_double_t, nr_double_t, nr_double_t, nr_double_t, nr_double_t)
void cvectors(qucs::vector *, qucs::vector *)
nr_complex_t floor(const nr_complex_t z)
Complex floor.
nr_double_t rlinear(nr_double_t, int)
void vectors(nr_double_t *, nr_double_t *, int)
nr_complex_t cinterpolate(nr_double_t)
nr_complex_t polar(const nr_double_t mag, const nr_double_t ang)
Construct a complex number using polar notation.
int findIndex_old(nr_double_t)
int findIndex(nr_double_t)
matrix arg(matrix a)
Computes the argument of each matrix element.
void rvectors(qucs::vector *, qucs::vector *)
vector unwrap(vector, nr_double_t tol=M_PI, nr_double_t step=2 *M_PI)