示例#1
0
	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?
	}
示例#2
0
	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);
		}
	}
示例#3
0
	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);
		}
	}