Definition at line 28 of file DemuxSolverTest.cpp.
◆ Run()
void DemuxSolverTest::Run |
( |
| ) |
|
|
inline |
◆ SetUp()
virtual void DemuxSolverTest::SetUp |
( |
| ) |
|
|
inlineprotectedvirtual |
◆ TearDown()
void DemuxSolverTest::TearDown |
( |
| ) |
|
|
inlineprotected |
◆ NNLSSolverTest()
void DemuxSolverTest::NNLSSolverTest |
( |
| ) |
|
|
inlineprotected |
Definition at line 47 of file DemuxSolverTest.cpp.
50 vector<double> expectedSolution = {
61 double trailingWindowIntensity = 0.0;
◆ TestNNLSGivenSolution()
void DemuxSolverTest::TestNNLSGivenSolution |
( |
const vector< double > & |
expectedSolution, |
|
|
double |
trailingWindowIntensity |
|
) |
| |
|
inlineprotected |
Definition at line 79 of file DemuxSolverTest.cpp.
86 int numDemuxWindows = 7;
87 int numTransitions = 1;
88 signal.reset(
new MatrixType(numSpectra, numTransitions));
89 masks.reset(
new MatrixType(numSpectra, numDemuxWindows));
90 solution.reset(
new MatrixType(numDemuxWindows, numTransitions));
104 for (
int i = 0; i < numSpectra; ++i)
106 for (
int j = 0; j < numDemuxWindows; ++j)
108 if (j == i || j == i + 1)
110 masks->row(i)[j] = 1.0;
114 masks->row(i)[j] = 0.0;
120 vector<double> signalVec;
121 for (
int i = 0; i < numSpectra; ++i)
123 double signalSum = expectedSolution[i];
124 if (i + 1 < numSpectra)
125 signalSum += expectedSolution[i + 1];
127 signalSum += trailingWindowIntensity;
128 signalVec.push_back(signalSum);
130 for (
size_t i = 0; i < signalVec.size(); ++i)
132 signal->row(i)[0] = signalVec[i];
135 solver.
Solve(masks, signal, solution);
138 for (
size_t i = 0; i < expectedSolution.size(); ++i)
References pwiz::analysis::NNLSSolver::Solve(), and unit_assert_equal.
The documentation for this class was generated from the following file: