### changeset 797:671ae0aec2ff

Comment touch ups.
author Martin Geisler Wed, 28 May 2008 09:35:01 +0200 73af810f6bb1 89f2dd066756 viff/comparison.py 1 files changed, 5 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
```--- a/viff/comparison.py	Wed May 28 09:30:07 2008 +0200
+++ b/viff/comparison.py	Wed May 28 09:35:01 2008 +0200
@@ -160,7 +160,7 @@

@increment_pc
def convert_bit_share(self, share, dst_field):
-        """Convert a 0/1 share into dst_field."""
+        """Convert a 0/1 share into *dst_field*."""
l = self.options.security_parameter + math.log(dst_field.modulus, 2)
# TODO assert field sizes are OK...

@@ -187,7 +187,7 @@

@increment_pc
def greater_than_equal_preproc(self, field, smallField=None):
-        """Preprocessing for greater_than_equal."""
+        """Preprocessing for :meth:`greater_than_equal`."""
if smallField is None:
smallField = field

@@ -241,7 +241,7 @@

@increment_pc
def greater_than_equal_online(self, share_a, share_b, preproc, field):
-        """Compute ``share_a >= share_b``. Result is shared."""
+        """Compute ``share_a >= share_b``. Result is secret shared."""
# increment l as a, b are increased
l = self.options.bit_length + 1
# a = 2a+1; b= 2b // ensures inputs not equal
@@ -316,8 +316,8 @@
def greater_than_equal(self, share_a, share_b):
"""Compute ``share_a >= share_b``.

-        Both arguments must be of type field. The result is a
-        field share.
+        Both arguments must be shares from the same field. The result
+        is a new 0/1 share from the field.
"""
# TODO: Make all input-taking methods do coercion like this.
field = getattr(share_a, "field", getattr(share_b, "field", None))```