forked from ivogeorg/ucd-csci2312-pa3
-
Notifications
You must be signed in to change notification settings - Fork 0
/
ClusteringTests.h
121 lines (77 loc) · 3.43 KB
/
ClusteringTests.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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
// File: ClusteringTests.h
//
// Created by Ivo Georgiev on 10/29/15.
//
#ifndef CLUSTERING_CLUSTERINGTESTS_H
#define CLUSTERING_CLUSTERINGTESTS_H
#include "ErrorContext.h"
using namespace Testing;
// - - - - - - - - - Tests: class Point - - - - - - - - - -
// Smoketest: constructor, copy constructor, destructor
void test_point_smoketest(ErrorContext &ec);
// id
void test_point_id(ErrorContext &ec, unsigned int numRuns);
// setValue, getValue, operator[]
void test_point_getsetelem(ErrorContext &ec, unsigned int numRuns);
// Copy constructor
void test_point_copying(ErrorContext &ec, unsigned int numRuns);
// operator=
void test_point_assignment(ErrorContext &ec, unsigned int numRuns);
// operator==, operator!=
void test_point_equality(ErrorContext &ec, unsigned int numRuns);
// operator<, operator<=, operator>, operator>=
// (pseudo-lexicographic comparison)
void test_point_comparison(ErrorContext &ec, unsigned int numRuns);
// operator+=, operator-=, operator*=, operator/=
void test_point_CAO(ErrorContext &ec, unsigned int numRuns);
// operator+, operator-, operator*, operator/
void test_point_SAO(ErrorContext &ec, unsigned int numRuns);
// distanceTo
void test_point_distance(ErrorContext &ec, unsigned int numRuns);
// operator>>, operator<< (incl. exceptions)
void test_point_IO(ErrorContext &ec, unsigned int numRuns);
// - - - - - - - - - Tests: class Cluster - - - - - - - - - -
// Smoketest: constructor, copy constructor, destructor
void test_cluster_smoketest(ErrorContext &ec);
// add, remove, operator[]
void test_cluster_addremove(ErrorContext &ec, unsigned int numRuns);
// Containment
void test_cluster_contain(ErrorContext &ec, unsigned int numRuns);
// Inner class Move
void test_cluster_move(ErrorContext &ec, unsigned int numRuns);
// Copy constructor
void test_cluster_copying(ErrorContext &ec, unsigned int numRuns);
// operator=
void test_cluster_assignment(ErrorContext &ec, unsigned int numRuns);
// subscript (operator[])
void test_cluster_subscript(ErrorContext &ec, unsigned int numRuns);
// operator==, operator!=
void test_cluster_equality(ErrorContext &ec, unsigned int numRuns);
// ascending pseudo-lexicographic order
void test_cluster_order(ErrorContext &ec, unsigned int numRuns);
// operator+=, operator-=, different rhs
void test_cluster_CAO(ErrorContext &ec, unsigned int numRuns);
// operator+, operator-, different rhs
void test_cluster_SAO(ErrorContext &ec, unsigned int numRuns);
// Centroid
void test_cluster_centroid(ErrorContext &ec, unsigned int numRuns);
// Id
void test_cluster_id(ErrorContext &ec, unsigned int numRuns);
// Init element selection ("pickCentroids")
void test_cluster_initselection(ErrorContext &ec, unsigned int numRuns);
// operator>>, operator<<
void test_cluster_IO(ErrorContext &ec, unsigned int numRuns);
// - - - - - - - - - Tests: class KMeans - - - - - - - - - -
// Smoketest: constructor, destructor, loading points
void test_kmeans_smoketest(ErrorContext &ec);
// running
void test_kmeans_run(ErrorContext &ec, unsigned int numRuns);
// operator<<
void test_kmeans_IO(ErrorContext &ec, unsigned int numRuns);
// K larger than number of points
void test_kmeans_toofewpoints(ErrorContext &ec, unsigned int numRuns);
// Check if scoring works with large points
void test_kmeans_largepoints(ErrorContext &ec, unsigned int numRuns);
// Large k, less than number of points
void test_kmeans_toomanyclusters(ErrorContext &ec, unsigned int numRuns);
#endif //CLUSTERING_CLUSTERINGTESTS_H