PTile#

class PTile#

A class representing an encoded (unencrypted) plaintext. It’s called a PTile because from a high-level point of view we’ll usually use several of these combined for holding a more complicated object such as a matrix.

get_current_device(self: pyhelayers.PTile) Tuple[pyhelayers.DeviceType, int]#

Returns the current device of this PTile.

Return type:

DeviceType, int

is_all_zeroes(self: pyhelayers.PTile) bool#

Returns true if this PTile encodes all zeroes plaintext, and false otherwise.

to_device(self: pyhelayers.PTile, type: pyhelayers.DeviceType, device_id: int = 0) None#

Move this PTile to another device.

Parameters:
  • type – The device type to move to.

  • device_id – The device ID to move to. Device ID can be from 0 to n-1,

where n is the the number of devices of the specified type.