void Polynom::FillSignal(Signal & signal) const { int ind = 0; int N = signal.GetDesc().N; double st = signal.GetDesc().startTime; double dt = signal.GetDesc().dt; signal.FillData(0, N, [&](){ double res = (*this)( st + ind * dt ); ind++; return res; }); // TODO : Test! are we sure it works correct? }
void SegmentDescription::BuildSignal(Signal & signal) const { signal.Reset(); for (size_t i = 0; i < cores.size(); ++i) { cores[i].AddToArray(signal.GetData(), signal.GetDesc().N); } }
void Polynom::AddToSignal(Signal & signal) const { const SignalDescription & d = signal.GetDesc(); double * data = signal.GetData(); for (int i = 0; i < d.N; ++i) { data[i] += (*this)(d.startTime + i * d.dt); } }