-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathcentroid.h
35 lines (24 loc) · 1022 Bytes
/
centroid.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
#ifndef Included_Cluster_H
#define Included_Cluster_H
#include "List.h"
#include "Node.h"
#include "clusterNode.h"
template <class T>
class Cluster
{
private:
ClusterNode<T>* centroid; //kentroeides
List<ClusterNode<T>*>* points; //lista shmeiwn pou anhkoun sto cluster
public:
Cluster(); //constructor
Cluster(ClusterNode<T>* centr); //constructor
~Cluster(); //destructor
Node<ClusterNode<T>*>* getPoints(); //epistrefei thn lista me ta shmeia
int getNoPoints(); //epistrefei ton ari8mo twn shmeiwn pou anhkoun sto cluster
ClusterNode<T>* getCentroid(); //epistrefei to kentroeides
void setCentroid(ClusterNode<T>* centr); //ana8esh kentroeidous sto cluster
void insertPoint(ClusterNode<T>* point); //eisagwgh shmeiou sto cluster
void deletePoint(Node<ClusterNode<T>*>* delPoint); //diagrafh tou node apo thn lista
void emptyCluster(); //sunarthsh gia na adeiasei to cluster apo stoixeia
};
#endif