#ifndef EM_TESEDIST_H
#define EM_TESEDIST_H

#include <stdint.h>
#include <vector>

#include "em_circular.h"

class EMTesedist : public EMCircular
{
  public:
    EMTesedist();
    EMTesedist(int cluster_count_);

    void train();
    void add_time(double phase);

    void print();

    double get_density_at(double phase) const;

  private:
    void expectation();
    double maximisation();

    class Cluster {
      public:
        Cluster();
        Cluster(double xx_, double yy_, double weight_);
        double xx;
        double yy;
        double weight;

        void print();

        double density_at(double phase) const;
    };

    std::vector<Cluster> clusters;
};

#endif // EM_TESEDIST_H
