~waver-developers/waveriir/trunk

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
55
56
57
58
59
60
61
62
63
64
/*
    This file is part of WaverIIR
    Copyright (C) 2021-2022 Peter Papp
    Please visit https://launchpad.net/waveriir for details
*/


#include "coefficientlist.h"


CoefficientList::CoefficientList()
{
    // nothing to do here
}


CoefficientList::CoefficientList(QList<double> a, QList<double> b)
{
    this->a.append(a);
    this->b.append(b);
}


CoefficientList::CoefficientList(std::initializer_list<double> a, std::initializer_list<double> b)
{
    this->a = QList<double>(a);
    this->b = QList<double>(b);
}


void CoefficientList::appendA(double aValue)
{
    a.append(aValue);
}


void CoefficientList::appendB(double bValue)
{
    b.append(bValue);
}


int CoefficientList::aSize()
{
    return a.size();
}


int CoefficientList::bSize()
{
    return b.size();
}


double CoefficientList::aValue(int index)
{
    return a.at(index);
}


double CoefficientList::bValue(int index)
{
    return b.at(index);
}