#ifndef _METRICS_TRACKER_HPP_
#define _METRICS_TRACKER_HPP_

#pragma once

#include <cpp/radio/Vector.hpp>
#include <cpp/radio/statistics/SlidingMinMax.hpp>

namespace Radio
{
namespace Metrics
{

class Tracker
{
	static const size_t NUM_QUADRRANTS = 4;
public:
	Tracker(RealScalar rho, RealScalar smoothness=0.5);
	virtual ~Tracker();
	void process(ComplexScalar const &x);
	ComplexScalar const* trackers() const;
	
private:
	RVec m_mags;
	RealScalar m_rho;
	RealScalar m_smoothness;

	ComplexScalar m_trackers[NUM_QUADRRANTS];
	size_t getQuadrant(ComplexScalar const &x);
};

} // Metrics
} // Radio

#endif // _METRICS_TRACKER_HPP_