SecreC 2 language 2.9.0 (2026.10)
Language and standard library reference
Loading...
Searching...
No Matches
Functions

Functions

template<domain D>
D uint32 contingencyTable (D uint32 data, D bool cases, D bool controls, uint32 codeBook)
 
template<domain D>
D uint64 contingencyTable (D uint64 data, D bool cases, D bool controls, uint64 codeBook)
 

Detailed Description

Create a contingency table.

Note
D - all protection domains
Supported types - uint32 / uint64
Parameters
data- input vector
cases- vector indicating which elements of data belong to cases
controls- vector indicating which elements of data belong to controls
codeBook- matrix used for coding the answer. The first row contains expected values of the input vector and the second row contains the classes that these values will be put into. The classes should be consecutive and begin from 1.
Returns
returns a contingency table in the format
CasesControls
Option 1c1d1
Option 2c2d2
Option 3c3d3
………
Leakage
None

Function Documentation

◆ contingencyTable() [1/2]

template<domain D>
D uint32 contingencyTable ( D uint32  data,
D bool  cases,
D bool  controls,
uint32  codeBook 
)

◆ contingencyTable() [2/2]

template<domain D>
D uint64 contingencyTable ( D uint64  data,
D bool  cases,
D bool  controls,
uint64  codeBook 
)