Skip to content

Commit 5b14f09

Browse files
authored
Remove deprecated functions. Code refactoring. (#66)
* Remove some copy operators * Code refactoring * Remove `pow`, `pow2`, `fast_abs` * Update tests
1 parent a190f21 commit 5b14f09

File tree

3 files changed

+64
-178
lines changed

3 files changed

+64
-178
lines changed

include/dsplib/math.h

Lines changed: 0 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -62,10 +62,6 @@ real_t abs(cmplx_t v);
6262
arr_real angle(const arr_cmplx& arr);
6363
real_t angle(cmplx_t v);
6464

65-
//fast absolute complex magnitude
66-
arr_real fast_abs(const arr_cmplx& arr);
67-
real_t fast_abs(cmplx_t v);
68-
6965
//round
7066
real_t round(const real_t& x);
7167
cmplx_t round(const cmplx_t& x);
@@ -140,31 +136,6 @@ int nextpow2(int m);
140136
//checks if m is an integral power of two
141137
bool ispow2(int m);
142138

143-
//element-wise power
144-
[[deprecated("Behavior will be changed according to 'Matlab'. Use 'power(x, 2)' or 'abs2(x)'")]] arr_real pow2(
145-
const arr_real& arr);
146-
[[deprecated("Behavior will be changed according to 'Matlab'. Use 'power(x, 2)' or 'abs2(x)'")]] arr_cmplx pow2(
147-
const arr_cmplx& arr);
148-
149-
[[deprecated("Behavior will be changed according to 'Matlab'. Use 'power(x, 2)' or 'abs2(x)'")]] constexpr real_t pow2(
150-
real_t x) {
151-
return x * x;
152-
}
153-
154-
[[deprecated("Behavior will be changed according to 'Matlab'. Use 'power(x, 2)' or 'abs2(x)'")]] constexpr cmplx_t pow2(
155-
cmplx_t x) {
156-
return x * x;
157-
}
158-
159-
[[deprecated("Function will be removed. Use 'power(x, n)'")]] real_t pow(real_t x, real_t n);
160-
[[deprecated("Function will be removed. Use 'power(x, n)'")]] cmplx_t pow(cmplx_t x, real_t n);
161-
[[deprecated("Function will be removed. Use 'power(x, n)'")]] arr_cmplx pow(cmplx_t x, const arr_real& n);
162-
[[deprecated("Function will be removed. Use 'power(x, n)'")]] arr_real pow(real_t x, const arr_real& n);
163-
[[deprecated("Function will be removed. Use 'power(x, n)'")]] arr_real pow(const arr_real& x, const arr_real& n);
164-
[[deprecated("Function will be removed. Use 'power(x, n)'")]] arr_cmplx pow(const arr_cmplx& x, const arr_real& n);
165-
[[deprecated("Function will be removed. Use 'power(x, n)'")]] arr_real pow(const arr_real& x, real_t n);
166-
[[deprecated("Function will be removed. Use 'power(x, n)'")]] arr_cmplx pow(const arr_cmplx& x, real_t n);
167-
168139
//scalar^scalar->scalar
169140
real_t power(real_t x, real_t n);
170141
cmplx_t power(cmplx_t x, real_t n);

0 commit comments

Comments
 (0)