93 |
if ( !src1[it] ) |
if ( !src1[it] ) |
94 |
for ( ;it < length; ++it) |
for ( ;it < length; ++it) |
95 |
(*res)[it] = src2[it]; |
(*res)[it] = src2[it]; |
|
res[it] = '\0'; |
|
96 |
return *res; |
return *res; |
97 |
} |
} |
98 |
|
|
106 |
(*res)[it1] = src1[it1]; |
(*res)[it1] = src1[it1]; |
107 |
for (it2 = 0; it2 < src2.length(); ++it2, ++it1) |
for (it2 = 0; it2 < src2.length(); ++it2, ++it1) |
108 |
(*res)[it1] = src2[it2]; |
(*res)[it1] = src2[it2]; |
|
res[it1] = '\0'; |
|
109 |
return *res; |
return *res; |
110 |
} |
} |
111 |
|
|
129 |
for (it = 0; it < this->length(); ++it) |
for (it = 0; it < this->length(); ++it) |
130 |
(*res)[it] = (*this)[it] * (0.54 - 0.46 * cos(2 * PI * it / |
(*res)[it] = (*this)[it] * (0.54 - 0.46 * cos(2 * PI * it / |
131 |
(this->length() - 1))); |
(this->length() - 1))); |
|
res[it] = '\0'; |
|
|
return *res; |
|
|
} |
|
|
|
|
|
DiscSignal &DiscSignal::truncate ( DiscSignal &src, const int begin, const int end ) |
|
|
{ |
|
|
assert (end < begin); |
|
|
int it; |
|
|
int length = end - begin; |
|
|
double *data = new double[length + 1]; |
|
|
DiscSignal *res = new DiscSignal(data, length); |
|
|
for (it = 0; it < length; ++it) |
|
|
(*res)[it] = src[begin + it]; |
|
|
res[it] = '\0'; |
|
132 |
return *res; |
return *res; |
133 |
} |
} |
134 |
|
|