40 |
*******************************************************************/ |
*******************************************************************/ |
41 |
#include "contsignal.hh" |
#include "contsignal.hh" |
42 |
|
|
43 |
void ContSignal::add ( ){ |
ContSignal &ContSignal::add ( ContSignal &src1, ContSignal &src2 ) |
44 |
} |
{ |
45 |
|
int it; |
46 |
void ContSignal::mult ( ){ |
int length = maximum((src1.length()), (src2.length())); |
47 |
} |
double *data = new double[length + 1]; |
48 |
|
ContSignal *res = new ContSignal(data, length); |
49 |
void ContSignal::concat ( ){ |
|
50 |
} |
for (it = 0; it < length; ++it) |
51 |
|
(*res)[it] = src1[it] + src2[it]; |
52 |
void ContSignal::Haming ( ){ |
(*res)[it] = '\0'; |
53 |
} |
return *res; |
54 |
|
} |
55 |
void ContSignal::truncate ( ){ |
|
56 |
} |
ContSignal &ContSignal::mult ( ContSignal &src1, ContSignal &src2 ) |
57 |
|
{ |
58 |
void ContSignal::min ( ){ |
int i,j,k; |
59 |
} |
int length = (src1.length() - 1 ) * (src2.length() - 1); |
60 |
|
double *data = new double[length + 1]; |
61 |
void ContSignal::max ( ){ |
ContSignal *res = new ContSignal(data, length); |
62 |
|
|
63 |
|
for (i = 0 ; i < length; ++i) |
64 |
|
for (j = 0, k = i; j < i && k >= 0; ++j, --k) |
65 |
|
if ( !src1[j] ) |
66 |
|
(*res)[i] += 0; |
67 |
|
else if ( !src2[k] ) |
68 |
|
(*res)[i] += 0; |
69 |
|
else (*res)[i] += src1[j] * src2[k]; |
70 |
|
(*res)[i] = '\0'; |
71 |
|
return *res; |
72 |
|
} |
73 |
|
|
74 |
|
ContSignal &ContSignal::concat ( ContSignal &src1, ContSignal &src2 ) |
75 |
|
{ |
76 |
|
std::cerr << "We couldn't concatenate two continus signals" << std::endl; |
77 |
|
exit (1); |
78 |
|
} |
79 |
|
|
80 |
|
ContSignal &ContSignal::hamming ( ContSignal &src ) |
81 |
|
{ |
82 |
|
std::cerr << "We couldn't applicate hamming on a continu signal" << std::endl; |
83 |
|
exit(1); |
84 |
|
} |
85 |
|
|
86 |
|
ContSignal &ContSignal::truncate ( ContSignal &src, const int begin, const int end ) |
87 |
|
{ |
88 |
|
std::cerr << "We couldn't truncate a continu signal" << std::endl; |
89 |
|
exit(1); |
90 |
|
} |
91 |
|
|
92 |
|
int ContSignal::min ( ContSignal &src ) |
93 |
|
{ |
94 |
|
std::cerr << "We couldn't search min of a continu signal" << std::endl; |
95 |
|
exit(1); |
96 |
|
} |
97 |
|
|
98 |
|
int ContSignal::max ( ContSignal &src ) |
99 |
|
{ |
100 |
|
std::cerr << "We couldn't search max of a continu signal" << std::endl; |
101 |
|
exit(1); |
102 |
} |
} |
103 |
|
|