forked from ppdewolf/libmuargus
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathTable.h
86 lines (77 loc) · 2.11 KB
/
Table.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
/*
* Argus Open Source
* Software to apply Statistical Disclosure Control techniques
*
* Copyright 2014 Statistics Netherlands
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the European Union Public Licence
* (EUPL) version 1.1, as published by the European Commission.
*
* You can find the text of the EUPL v1.1 on
* https://joinup.ec.europa.eu/software/page/eupl/licence-eupl
*
* This software is distributed on an "AS IS" basis without
* warranties or conditions of any kind, either express or implied.
*/
#if !defined Table_h
#define Table_h
#include "globals.h"
class CTable {
public:
CTable()
{
Cell = 0;
nCell = 0;
HasRecode = false;
IsBIR = false;
BIRCell = 0;
BIRThreshold =0;
BHRThreshold = 0;
}
~CTable()
{
/*if (Cell != 0) {
delete[] Cell;
}
if (BIRCell != 0) {
delete[] BIRCell;
}
Cell = 0;
BIRCell = 0;
*/
}
long Threshold;
long nDim; // number of variables (= dimensions) in table
int SizeDim[MAXDIM]; // = nCode of corresponding variable
int Varnr[MAXDIM]; // index of each dimension variable
long *Cell; // counting space for frequency
long nCell; // number of cells
bool BaseTable; // is a permanent table, specified bij SetTable?
bool HasRecode; // toggle for Recode Table (index at i + m_ntab)
bool IsBIR; // toggle for BaseIndividualRisk table
double *BIRCell; // counting space for weight (BIR)
double BIRThreshold; // Threshold for BIR
long BIRWeightVar; // index weight variable
double BIRMinValue;
double BIRMaxValue;
double BIRClassWidth;
double BIRnClasses;
long BIRUnsafe;
// Methods and Functions
// For Household Risk management
double BHRMinValue;
double BHRMaxValue;
double BHRClassWidth;
double BHRnClasses;
long BHRUnsafe;
double BHRThreshold;
bool SetVariables(long lnDim, long *ExplVar, long BirVarnr);
bool CheckVarSequence();
long GetMemSize();
bool PrepareTable();
void FreeRecodedTable();
long GetCellNr(int *DimNr);
//void operator = (CTable & table2);
};
#endif