Kinetic Visualization
 All Classes Functions Variables Pages
Clustering.h
1 #pragma once
2 #include "GLM/gtx.hpp"
3 #include "GLM/gtc.hpp"
4 #include "GLM/gtx/type_ptr.hpp"
5 
6 #include "linalg.h"
7 #include "solvers.h"
8 
9 #include <QColor>
10 #include <QtConcurrentRun>
11 #include <QFuture>
12 #include <QFutureWatcher>
13 
14 // system includes
15 #include <fstream>
16 #include <iostream>
17 
19 {
20 public:
24  Clustering(void);
28  ~Clustering(void);
29 
36  static void Eigen(glm::mat2& rvec, glm::vec2& rval, glm::mat2 covariance);
44  static void SVD(glm::vec2& rw, glm::mat2& ru, glm::mat2& rvt, glm::mat2 covariance);
51  static float getDensity(glm::vec2 pos, glm::vec2 mean, glm::mat2 covariance);
58  static glm::mat2 CalculateCovariance(glm::vec2 radii, float phi);
70  static void kMeans(glm::vec2** x, glm::vec2* m, float* numComponents, float** g, int N, int K, int Iterations);
78  static void DoClustering(glm::vec2* m, glm::mat2* c, glm::vec2* x, int N, int K);
79 
86  static glm::vec4* CalculateTFTexture(glm::vec2* m, glm::mat2* covariance, glm::vec4* color);
87 };