[mareframe] Annotation of /trunk/paramin-beta/dataconverter.h
Annotation of /trunk/paramin-beta/dataconverter.h
Parent Directory
| Revision Log
Revision 1 -
(view)
(download)
1 : |
agomez |
1 |
#ifndef dataconverter_h
|
2 : |
|
|
#define dataconverter_h
|
3 : |
|
|
|
4 : |
|
|
#include "paramin.h" |
5 : |
|
|
#include "intvector.h"
|
6 : |
|
|
#include "doublevector.h"
|
7 : |
|
|
|
8 : |
|
|
/**
|
9 : |
|
|
*
|
10 : |
|
|
* \brief class DataConverter makes a new vector from a given vector v[0..numVar-1], using the formula:
|
11 : |
|
|
* xNew[i] = xfullraw[i] if xind[i] = 0 else xNew[i] = v[j].
|
12 : |
|
|
* 0 <= i < numVarTotal. 0 <= j < numVar.
|
13 : |
|
|
*/
|
14 : |
|
|
|
15 : |
|
|
class DataConverter {
|
16 : |
|
|
private:
|
17 : |
|
|
/**
|
18 : |
|
|
* \brief initial values for vector
|
19 : |
|
|
*/
|
20 : |
|
|
DoubleVector xfullraw;
|
21 : |
|
|
DoubleVector xConverted;
|
22 : |
|
|
IntVector xind;
|
23 : |
|
|
int numVarTotal;
|
24 : |
|
|
public:
|
25 : |
|
|
DataConverter();
|
26 : |
|
|
~DataConverter();
|
27 : |
|
|
void setInitialData(const IntVector& xi, const DoubleVector& xr);
|
28 : |
|
|
const DoubleVector& getXFull();
|
29 : |
|
|
int getNumVarTotal();
|
30 : |
|
|
const DoubleVector& convertX(const DoubleVector& v1);
|
31 : |
|
|
const IntVector& getOptInfo();
|
32 : |
|
|
};
|
33 : |
|
|
|
34 : |
|
|
#endif
|
|