opendp.comb module#

opendp.comb.make_basic_composition(measurement0, measurement1)[source]#

Construct the DP composition (measurement0, measurement1). Returns a Measurement.

Parameters:
  • measurement0 (Measurement) – The left member of the resulting 2-tuple.

  • measurement1 (Measurement) – The right member of the resulting 2-tuple.

Returns:

Measurement representing the composed transformations.

Return type:

Measurement

Raises:
  • AssertionError – if an argument’s type differs from the expected type

  • UnknownTypeError – if a type-argument fails to parse

  • OpenDPException – packaged error from the core OpenDP library

opendp.comb.make_chain_mt(measurement, transformation)[source]#

Construct the functional composition (measurementtransformation). Returns a Measurement.

Parameters:
Returns:

Measurement representing the chained computation.

Return type:

Measurement

Raises:
  • AssertionError – if an argument’s type differs from the expected type

  • UnknownTypeError – if a type-argument fails to parse

  • OpenDPException – packaged error from the core OpenDP library

opendp.comb.make_chain_tt(transformation1, transformation0)[source]#

Construct the functional composition (transformation1transformation0). Returns a Tranformation.

Parameters:
Returns:

Transformation representing the chained computation.

Return type:

Transformation

Raises:
  • AssertionError – if an argument’s type differs from the expected type

  • UnknownTypeError – if a type-argument fails to parse

  • OpenDPException – packaged error from the core OpenDP library