37 double EuclidDist::calc(
const double* v1,
const double* v2,
38 const unsigned int& dim) {
40 for (
int i = dim - 1; i >= 0; i--)
41 sum += pow(v1[i] - v2[i], 2);
45 double MaximumDist::calc(
const double* v1,
const double* v2,
46 const unsigned int& dim) {
47 double currValue, maxValue = 0.0;
48 for (
int i = dim - 1; i >= 0; i--) {
49 currValue = fabs(v1[i] - v2[i]);
50 if (currValue > maxValue) {
69 const unsigned int& dim) {
78 const unsigned int& dim) {
84 dim(dim), windowSize(window), metricCondition(condition) {
86 for (
unsigned int i = 0; i <
dim; i++)
96 const unsigned int& dim) {
97 if (dim != this->dim) {
99 s <<
"Given dimension " << dim
100 <<
" of argument vector does not match preliminarily defined dimension "
102 throw std::domain_error(s.str());
108 for (
unsigned int i = 0; i < this->
dim; i++)
109 this->
prev_v[i] = new_v[i];
112 if (!currfulfilled) {