source: proiecte/HadoopJUnit/hadoop-0.20.1/docs/api/org/apache/hadoop/util/bloom/HashFunction.html @ 120

Last change on this file since 120 was 120, checked in by (none), 14 years ago

Added the mail files for the Hadoop JUNit Project

  • Property svn:executable set to *
File size: 13.7 KB
Line 
1<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
2<!--NewPage-->
3<HTML>
4<HEAD>
5<!-- Generated by javadoc (build 1.6.0_07) on Tue Sep 01 20:56:55 UTC 2009 -->
6<TITLE>
7HashFunction (Hadoop 0.20.1 API)
8</TITLE>
9
10<META NAME="date" CONTENT="2009-09-01">
11
12<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../../stylesheet.css" TITLE="Style">
13
14<SCRIPT type="text/javascript">
15function windowTitle()
16{
17    if (location.href.indexOf('is-external=true') == -1) {
18        parent.document.title="HashFunction (Hadoop 0.20.1 API)";
19    }
20}
21</SCRIPT>
22<NOSCRIPT>
23</NOSCRIPT>
24
25</HEAD>
26
27<BODY BGCOLOR="white" onload="windowTitle();">
28<HR>
29
30
31<!-- ========= START OF TOP NAVBAR ======= -->
32<A NAME="navbar_top"><!-- --></A>
33<A HREF="#skip-navbar_top" title="Skip navigation links"></A>
34<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
35<TR>
36<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
37<A NAME="navbar_top_firstrow"><!-- --></A>
38<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
39  <TR ALIGN="center" VALIGN="top">
40  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
41  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
42  <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
43  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="class-use/HashFunction.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>
44  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
45  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
46  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
47  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
48  </TR>
49</TABLE>
50</TD>
51<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
52</EM>
53</TD>
54</TR>
55
56<TR>
57<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
58&nbsp;<A HREF="../../../../../org/apache/hadoop/util/bloom/Filter.html" title="class in org.apache.hadoop.util.bloom"><B>PREV CLASS</B></A>&nbsp;
59&nbsp;<A HREF="../../../../../org/apache/hadoop/util/bloom/Key.html" title="class in org.apache.hadoop.util.bloom"><B>NEXT CLASS</B></A></FONT></TD>
60<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
61  <A HREF="../../../../../index.html?org/apache/hadoop/util/bloom/HashFunction.html" target="_top"><B>FRAMES</B></A>  &nbsp;
62&nbsp;<A HREF="HashFunction.html" target="_top"><B>NO FRAMES</B></A>  &nbsp;
63&nbsp;<SCRIPT type="text/javascript">
64  <!--
65  if(window==top) {
66    document.writeln('<A HREF="../../../../../allclasses-noframe.html"><B>All Classes</B></A>');
67  }
68  //-->
69</SCRIPT>
70<NOSCRIPT>
71  <A HREF="../../../../../allclasses-noframe.html"><B>All Classes</B></A>
72</NOSCRIPT>
73
74
75</FONT></TD>
76</TR>
77<TR>
78<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
79  SUMMARY:&nbsp;NESTED&nbsp;|&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
80<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
81DETAIL:&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
82</TR>
83</TABLE>
84<A NAME="skip-navbar_top"></A>
85<!-- ========= END OF TOP NAVBAR ========= -->
86
87<HR>
88<!-- ======== START OF CLASS DATA ======== -->
89<H2>
90<FONT SIZE="-1">
91org.apache.hadoop.util.bloom</FONT>
92<BR>
93Class HashFunction</H2>
94<PRE>
95<A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">java.lang.Object</A>
96  <IMG SRC="../../../../../resources/inherit.gif" ALT="extended by "><B>org.apache.hadoop.util.bloom.HashFunction</B>
97</PRE>
98<HR>
99<DL>
100<DT><PRE>public final class <B>HashFunction</B><DT>extends <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</A></DL>
101</PRE>
102
103<P>
104Implements a hash object that returns a certain number of hashed values.
105<P>
106
107<P>
108<DL>
109<DT><B>See Also:</B><DD><A HREF="../../../../../org/apache/hadoop/util/bloom/Key.html" title="class in org.apache.hadoop.util.bloom"><CODE>The general behavior of a key being stored in a filter</CODE></A>,
110<A HREF="../../../../../org/apache/hadoop/util/bloom/Filter.html" title="class in org.apache.hadoop.util.bloom"><CODE>The general behavior of a filter</CODE></A></DL>
111<HR>
112
113<P>
114
115<!-- ======== CONSTRUCTOR SUMMARY ======== -->
116
117<A NAME="constructor_summary"><!-- --></A>
118<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
119<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
120<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
121<B>Constructor Summary</B></FONT></TH>
122</TR>
123<TR BGCOLOR="white" CLASS="TableRowColor">
124<TD><CODE><B><A HREF="../../../../../org/apache/hadoop/util/bloom/HashFunction.html#HashFunction(int, int, int)">HashFunction</A></B>(int&nbsp;maxValue,
125             int&nbsp;nbHash,
126             int&nbsp;hashType)</CODE>
127
128<BR>
129&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Constructor.</TD>
130</TR>
131</TABLE>
132&nbsp;
133<!-- ========== METHOD SUMMARY =========== -->
134
135<A NAME="method_summary"><!-- --></A>
136<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
137<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
138<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
139<B>Method Summary</B></FONT></TH>
140</TR>
141<TR BGCOLOR="white" CLASS="TableRowColor">
142<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
143<CODE>&nbsp;void</CODE></FONT></TD>
144<TD><CODE><B><A HREF="../../../../../org/apache/hadoop/util/bloom/HashFunction.html#clear()">clear</A></B>()</CODE>
145
146<BR>
147&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Clears <i>this</i> hash function.</TD>
148</TR>
149<TR BGCOLOR="white" CLASS="TableRowColor">
150<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
151<CODE>&nbsp;int[]</CODE></FONT></TD>
152<TD><CODE><B><A HREF="../../../../../org/apache/hadoop/util/bloom/HashFunction.html#hash(org.apache.hadoop.util.bloom.Key)">hash</A></B>(<A HREF="../../../../../org/apache/hadoop/util/bloom/Key.html" title="class in org.apache.hadoop.util.bloom">Key</A>&nbsp;k)</CODE>
153
154<BR>
155&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Hashes a specified key into several integers.</TD>
156</TR>
157</TABLE>
158&nbsp;<A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A>
159<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
160<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
161<TH ALIGN="left"><B>Methods inherited from class java.lang.<A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</A></B></TH>
162</TR>
163<TR BGCOLOR="white" CLASS="TableRowColor">
164<TD><CODE><A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true#clone()" title="class or interface in java.lang">clone</A>, <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true#equals(java.lang.Object)" title="class or interface in java.lang">equals</A>, <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true#finalize()" title="class or interface in java.lang">finalize</A>, <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true#getClass()" title="class or interface in java.lang">getClass</A>, <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true#hashCode()" title="class or interface in java.lang">hashCode</A>, <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true#notify()" title="class or interface in java.lang">notify</A>, <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true#notifyAll()" title="class or interface in java.lang">notifyAll</A>, <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true#toString()" title="class or interface in java.lang">toString</A>, <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true#wait()" title="class or interface in java.lang">wait</A>, <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true#wait(long)" title="class or interface in java.lang">wait</A>, <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true#wait(long, int)" title="class or interface in java.lang">wait</A></CODE></TD>
165</TR>
166</TABLE>
167&nbsp;
168<P>
169
170<!-- ========= CONSTRUCTOR DETAIL ======== -->
171
172<A NAME="constructor_detail"><!-- --></A>
173<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
174<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
175<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
176<B>Constructor Detail</B></FONT></TH>
177</TR>
178</TABLE>
179
180<A NAME="HashFunction(int, int, int)"><!-- --></A><H3>
181HashFunction</H3>
182<PRE>
183public <B>HashFunction</B>(int&nbsp;maxValue,
184                    int&nbsp;nbHash,
185                    int&nbsp;hashType)</PRE>
186<DL>
187<DD>Constructor.
188 <p>
189 Builds a hash function that must obey to a given maximum number of returned values and a highest value.
190<P>
191<DL>
192<DT><B>Parameters:</B><DD><CODE>maxValue</CODE> - The maximum highest returned value.<DD><CODE>nbHash</CODE> - The number of resulting hashed values.<DD><CODE>hashType</CODE> - type of the hashing function (see <A HREF="../../../../../org/apache/hadoop/util/hash/Hash.html" title="class in org.apache.hadoop.util.hash"><CODE>Hash</CODE></A>).</DL>
193</DL>
194
195<!-- ============ METHOD DETAIL ========== -->
196
197<A NAME="method_detail"><!-- --></A>
198<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
199<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
200<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
201<B>Method Detail</B></FONT></TH>
202</TR>
203</TABLE>
204
205<A NAME="clear()"><!-- --></A><H3>
206clear</H3>
207<PRE>
208public void <B>clear</B>()</PRE>
209<DL>
210<DD>Clears <i>this</i> hash function. A NOOP
211<P>
212<DD><DL>
213</DL>
214</DD>
215</DL>
216<HR>
217
218<A NAME="hash(org.apache.hadoop.util.bloom.Key)"><!-- --></A><H3>
219hash</H3>
220<PRE>
221public int[] <B>hash</B>(<A HREF="../../../../../org/apache/hadoop/util/bloom/Key.html" title="class in org.apache.hadoop.util.bloom">Key</A>&nbsp;k)</PRE>
222<DL>
223<DD>Hashes a specified key into several integers.
224<P>
225<DD><DL>
226<DT><B>Parameters:</B><DD><CODE>k</CODE> - The specified key.
227<DT><B>Returns:</B><DD>The array of hashed values.</DL>
228</DD>
229</DL>
230<!-- ========= END OF CLASS DATA ========= -->
231<HR>
232
233
234<!-- ======= START OF BOTTOM NAVBAR ====== -->
235<A NAME="navbar_bottom"><!-- --></A>
236<A HREF="#skip-navbar_bottom" title="Skip navigation links"></A>
237<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
238<TR>
239<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
240<A NAME="navbar_bottom_firstrow"><!-- --></A>
241<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
242  <TR ALIGN="center" VALIGN="top">
243  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
244  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
245  <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
246  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="class-use/HashFunction.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>
247  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
248  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
249  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
250  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
251  </TR>
252</TABLE>
253</TD>
254<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
255</EM>
256</TD>
257</TR>
258
259<TR>
260<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
261&nbsp;<A HREF="../../../../../org/apache/hadoop/util/bloom/Filter.html" title="class in org.apache.hadoop.util.bloom"><B>PREV CLASS</B></A>&nbsp;
262&nbsp;<A HREF="../../../../../org/apache/hadoop/util/bloom/Key.html" title="class in org.apache.hadoop.util.bloom"><B>NEXT CLASS</B></A></FONT></TD>
263<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
264  <A HREF="../../../../../index.html?org/apache/hadoop/util/bloom/HashFunction.html" target="_top"><B>FRAMES</B></A>  &nbsp;
265&nbsp;<A HREF="HashFunction.html" target="_top"><B>NO FRAMES</B></A>  &nbsp;
266&nbsp;<SCRIPT type="text/javascript">
267  <!--
268  if(window==top) {
269    document.writeln('<A HREF="../../../../../allclasses-noframe.html"><B>All Classes</B></A>');
270  }
271  //-->
272</SCRIPT>
273<NOSCRIPT>
274  <A HREF="../../../../../allclasses-noframe.html"><B>All Classes</B></A>
275</NOSCRIPT>
276
277
278</FONT></TD>
279</TR>
280<TR>
281<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
282  SUMMARY:&nbsp;NESTED&nbsp;|&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
283<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
284DETAIL:&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
285</TR>
286</TABLE>
287<A NAME="skip-navbar_bottom"></A>
288<!-- ======== END OF BOTTOM NAVBAR ======= -->
289
290<HR>
291Copyright &copy; 2009 The Apache Software Foundation
292</BODY>
293</HTML>
Note: See TracBrowser for help on using the repository browser.