opendp 0.14.2-dev.20260401.2

A library of differential privacy algorithms for the statistical analysis of sensitive private data.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
# type: ignore
def make_is_equal(
    input_domain: VectorDomain[AtomDomain[TIA]], 
    input_metric: M, 
    value: TIA
): # |\label{line:def}|
    output_row_domain = atom_domain(T=bool)

    def is_equal(arg: TA) -> TA: # |\label{line:function}|
        return value == arg

    return make_row_by_row( # |\label{line:row-by-row}|
        input_domain, 
        input_metric, 
        output_row_domain, 
        is_equal
    )