-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathproduct.cpp
More file actions
54 lines (47 loc) · 823 Bytes
/
Copy pathproduct.cpp
File metadata and controls
54 lines (47 loc) · 823 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
#include "product.hpp"
product::product(signal *x,signal *y)
{
setX(x);
setY(y);
}
product::product( product &toCopy) noexcept : x{toCopy.getX()},y{toCopy.getY()}
{
}
product& product::operator=( product &toCopy) noexcept
{
setX(toCopy.getX());
setY(toCopy.getY());
return *this;
}
product::product(product &&toMove) noexcept : x{std::move(toMove.getX())},y{std::move(toMove.getY())}
{
}
product& product::operator=(product &&toMove) noexcept
{
setX(std::move(toMove.getX()));
setY(std::move(toMove.getY()));
return *this;
}
product::~product()
{
}
std::complex<double> product::get(long long int n)
{
return x->get(n)*y->get(n);
}
signal* product::getX()
{
return x;
}
void product::setX(signal *x)
{
this->x = x;
}
signal* product::getY()
{
return y;
}
void product::setY( signal *y)
{
this->y = y;
}