reference/gmp/functions/gmp-hamdist.xml
039ab719e695141ee54409d26ad828337ec31d6e
...
...
@@ -1,6 +1,6 @@
1
1
<?xml version="1.0" encoding="utf-8"?>
2
2
<!-- $Revision$ -->
3
-
<refentry xmlns="http://docbook.org/ns/docbook" xml:id="function.gmp-hamdist">
3
+
<refentry xml:id="function.gmp-hamdist" xmlns="http://docbook.org/ns/docbook">
4
4
<refnamediv>
5
5
<refname>gmp_hamdist</refname>
6
6
<refpurpose>Hamming distance</refpurpose>
...
...
@@ -10,12 +10,12 @@
10
10
&reftitle.description;
11
11
<methodsynopsis>
12
12
<type>int</type><methodname>gmp_hamdist</methodname>
13
-
<methodparam><type>resource</type><parameter>a</parameter></methodparam>
14
-
<methodparam><type>resource</type><parameter>b</parameter></methodparam>
13
+
<methodparam><type class="union"><type>GMP</type><type>int</type><type>string</type></type><parameter>num1</parameter></methodparam>
14
+
<methodparam><type class="union"><type>GMP</type><type>int</type><type>string</type></type><parameter>num2</parameter></methodparam>
15
15
</methodsynopsis>
16
16
<para>
17
-
Returns the hamming distance between <parameter>a</parameter> and
18
-
<parameter>b</parameter>. Both operands should be non-negative.
17
+
Returns the hamming distance between <parameter>num1</parameter> and
18
+
<parameter>num2</parameter>. Both operands should be non-negative.
19
19
</para>
20
20
</refsect1>
21
21

...
...
@@ -24,7 +24,7 @@
24
24
<para>
25
25
<variablelist>
26
26
<varlistentry>
27
-
<term><parameter>a</parameter></term>
27
+
<term><parameter>num1</parameter></term>
28
28
<listitem>
29
29
&gmp.parameter;
30
30
<para>
...
...
@@ -33,7 +33,7 @@
33
33
</listitem>
34
34
</varlistentry>
35
35
<varlistentry>
36
-
<term><parameter>b</parameter></term>
36
+
<term><parameter>num2</parameter></term>
37
37
<listitem>
38
38
&gmp.parameter;
39
39
<para>
...
...
@@ -48,7 +48,7 @@
48
48
<refsect1 role="returnvalues">
49
49
&reftitle.returnvalues;
50
50
<para>
51
-
&gmp.return;
51
+
The hamming distance between <parameter>num1</parameter> and <parameter>num2</parameter>, as an <type>int</type>.
52
52
</para>
53
53
</refsect1>
54
54

...
...
@@ -64,7 +64,7 @@ $ham1 = gmp_init("1001010011", 2);
64
64
$ham2 = gmp_init("1011111100", 2);
65
65
echo gmp_hamdist($ham1, $ham2) . "\n";
66
66

67
-
/* hamdist is equivilent to: */
67
+
/* hamdist is equivalent to: */
68
68
echo gmp_popcount(gmp_xor($ham1, $ham2)) . "\n";
69
69
?>
70
70
]]>
...
...
@@ -91,7 +91,6 @@ echo gmp_popcount(gmp_xor($ham1, $ham2)) . "\n";
91
91
</refsect1>
92
92

93
93
</refentry>
94
-

95
94
<!-- Keep this comment at the end of the file
96
95
Local variables:
97
96
mode: sgml
98
97