-
Notifications
You must be signed in to change notification settings - Fork 0
/
GenericScale.h
44 lines (35 loc) · 994 Bytes
/
GenericScale.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
/*
* File: GenericScale.h
* Author: ivek
*
* Created on February 16, 2012, 10:48 AM
*/
#ifndef GENERICSCALE_H
#define GENERICSCALE_H
#include "UpdateFunctionDelegator.h"
#include "VertexProxy.h"
#include <vector>
/**
* An interface through which vertices pass the scale hyperparameter to gamma
* vertices;
*
* @return
*/
class GenericScale :public UpdateFunctionDelegator {
public:
element_type* scaleRelatedValues;
GenericScale()
{
this->scaleRelatedValues = new element_type[VertexProxy::K->get_val()];
}
GenericScale(const GenericScale& orig)
{
// std::copy(orig.scaleRelatedValues.begin(), orig.scaleRelatedValues.end(), this->scaleRelatedValues.begin());
this->scaleRelatedValues = new element_type[VertexProxy::K->get_val()];
memcpy(this->scaleRelatedValues, orig.scaleRelatedValues, sizeof(element_type)*VertexProxy::K->get_val());
};
~GenericScale() {
delete(this->scaleRelatedValues);
}
};
#endif /* GENERICSCALE_H */