?? bloomfilter32bp2.html
字號:
</TABLE> <P><!-- ============ FIELD DETAIL =========== --><A NAME="field_detail"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2"><B>Field Detail</B></FONT></TH></TR></TABLE><A NAME="NUMBER_OF_WEIGHTS"><!-- --></A><H3>NUMBER_OF_WEIGHTS</H3><PRE>public static final int <B>NUMBER_OF_WEIGHTS</B></PRE><DL><DD>The number of weights used to create hash functions.<P><DL><DT><B>See Also:</B><DD><A HREF="../../../constant-values.html#org.archive.util.BloomFilter32bp2.NUMBER_OF_WEIGHTS">Constant Field Values</A></DL></DL><HR><A NAME="m"><!-- --></A><H3>m</H3><PRE>public final long <B>m</B></PRE><DL><DD>The number of bits in this filter.<P><DL></DL></DL><HR><A NAME="power"><!-- --></A><H3>power</H3><PRE>public final long <B>power</B></PRE><DL><DD>the power-of-two that m is<P><DL></DL></DL><HR><A NAME="d"><!-- --></A><H3>d</H3><PRE>public final int <B>d</B></PRE><DL><DD>The number of hash functions used by this filter.<P><DL></DL></DL><HR><A NAME="ADDRESS_BITS_PER_UNIT"><!-- --></A><H3>ADDRESS_BITS_PER_UNIT</H3><PRE>protected static final int <B>ADDRESS_BITS_PER_UNIT</B></PRE><DL><DL><DT><B>See Also:</B><DD><A HREF="../../../constant-values.html#org.archive.util.BloomFilter32bp2.ADDRESS_BITS_PER_UNIT">Constant Field Values</A></DL></DL><HR><A NAME="BIT_INDEX_MASK"><!-- --></A><H3>BIT_INDEX_MASK</H3><PRE>protected static final int <B>BIT_INDEX_MASK</B></PRE><DL><DL><DT><B>See Also:</B><DD><A HREF="../../../constant-values.html#org.archive.util.BloomFilter32bp2.BIT_INDEX_MASK">Constant Field Values</A></DL></DL><!-- ========= CONSTRUCTOR DETAIL ======== --><A NAME="constructor_detail"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2"><B>Constructor Detail</B></FONT></TH></TR></TABLE><A NAME="BloomFilter32bp2(int, int)"><!-- --></A><H3>BloomFilter32bp2</H3><PRE>public <B>BloomFilter32bp2</B>(int n, int d)</PRE><DL><DD>Creates a new Bloom filter with given number of hash functions and expected number of elements.<P><DL><DT><B>Parameters:</B><DD><CODE>n</CODE> - the expected number of elements.<DD><CODE>d</CODE> - the number of hash functions; if the filter add not more than <code>n</code> elements, false positives will happen with probability 2<sup>-<var>d</var></sup>.</DL></DL><!-- ============ METHOD DETAIL ========== --><A NAME="method_detail"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2"><B>Method Detail</B></FONT></TH></TR></TABLE><A NAME="size()"><!-- --></A><H3>size</H3><PRE>public int <B>size</B>()</PRE><DL><DD>The number of character sequences in the filter.<P><DD><DL><DT><B>Specified by:</B><DD><CODE><A HREF="../../../org/archive/util/BloomFilter.html#size()">size</A></CODE> in interface <CODE><A HREF="../../../org/archive/util/BloomFilter.html" title="interface in org.archive.util">BloomFilter</A></CODE></DL></DD><DD><DL><DT><B>Returns:</B><DD>the number of character sequences in the filter (but see <A HREF="../../../org/archive/util/BloomFilter32bp2.html#contains(java.lang.CharSequence)"><CODE>contains(CharSequence)</CODE></A>).</DL></DD></DL><HR><A NAME="contains(java.lang.CharSequence)"><!-- --></A><H3>contains</H3><PRE>public boolean <B>contains</B>(java.lang.CharSequence s)</PRE><DL><DD>Checks whether the given character sequence is in this filter. <P>Note that this method may return true on a character sequence that is has not been added to the filter. This will happen with probability 2<sub>-<var>d</var></sub>, where <var>d</var> is the number of hash functions specified at creation time, if the number of the elements in the filter is less than <var>n</var>, the number of expected elements specified at creation time.<P><DD><DL><DT><B>Specified by:</B><DD><CODE><A HREF="../../../org/archive/util/BloomFilter.html#contains(java.lang.CharSequence)">contains</A></CODE> in interface <CODE><A HREF="../../../org/archive/util/BloomFilter.html" title="interface in org.archive.util">BloomFilter</A></CODE></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>s</CODE> - a character sequence.<DT><B>Returns:</B><DD>true if the sequence is in the filter (or if a sequence with the same hash sequence is in the filter).</DL></DD></DL><HR><A NAME="add(java.lang.CharSequence)"><!-- --></A><H3>add</H3><PRE>public boolean <B>add</B>(java.lang.CharSequence s)</PRE><DL><DD>Adds a character sequence to the filter.<P><DD><DL><DT><B>Specified by:</B><DD><CODE><A HREF="../../../org/archive/util/BloomFilter.html#add(java.lang.CharSequence)">add</A></CODE> in interface <CODE><A HREF="../../../org/archive/util/BloomFilter.html" title="interface in org.archive.util">BloomFilter</A></CODE></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>s</CODE> - a character sequence.<DT><B>Returns:</B><DD>true if the character sequence was not in the filter (but see <A HREF="../../../org/archive/util/BloomFilter32bp2.html#contains(java.lang.CharSequence)"><CODE>contains(CharSequence)</CODE></A>).</DL></DD></DL><HR><A NAME="getBit(int)"><!-- --></A><H3>getBit</H3><PRE>protected boolean <B>getBit</B>(int bitIndex)</PRE><DL><DD>Returns from the local bitvector the value of the bit with the specified index. The value is <tt>true</tt> if the bit with the index <tt>bitIndex</tt> is currently set; otherwise, returns <tt>false</tt>. (adapted from cern.colt.bitvector.QuickBitVector)<P><DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>bitIndex</CODE> - the bit index.<DT><B>Returns:</B><DD>the value of the bit with the specified index.</DL></DD></DL><HR><A NAME="setBit(int)"><!-- --></A><H3>setBit</H3><PRE>protected void <B>setBit</B>(int bitIndex)</PRE><DL><DD>Changes the bit with index <tt>bitIndex</tt> in local bitvector. (adapted from cern.colt.bitvector.QuickBitVector)<P><DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>bitIndex</CODE> - the index of the bit to be set.</DL></DD></DL><HR><A NAME="getSizeBytes()"><!-- --></A><H3>getSizeBytes</H3><PRE>public long <B>getSizeBytes</B>()</PRE><DL><DD><B>Description copied from interface: <CODE><A HREF="../../../org/archive/util/BloomFilter.html#getSizeBytes()">BloomFilter</A></CODE></B></DD><DD>The amount of memory in bytes consumed by the bloom bitfield.<P><DD><DL><DT><B>Specified by:</B><DD><CODE><A HREF="../../../org/archive/util/BloomFilter.html#getSizeBytes()">getSizeBytes</A></CODE> in interface <CODE><A HREF="../../../org/archive/util/BloomFilter.html" title="interface in org.archive.util">BloomFilter</A></CODE></DL></DD><DD><DL><DT><B>Returns:</B><DD>memory used by bloom bitfield, in bytes</DL></DD></DL><!-- ========= END OF CLASS DATA ========= --><HR><!-- ======= START OF BOTTOM NAVBAR ====== --><A NAME="navbar_bottom"><!-- --></A><A HREF="#skip-navbar_bottom" title="Skip navigation links"></A><TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY=""><TR><TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"><A NAME="navbar_bottom_firstrow"><!-- --></A><TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY=""> <TR ALIGN="center" VALIGN="top"> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD> <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/BloomFilter32bp2.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD> </TR></TABLE></TD><TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM></EM></TD></TR><TR><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../../org/archive/util/BloomFilter32bitSplit.html" title="class in org.archive.util"><B>PREV CLASS</B></A> <A HREF="../../../org/archive/util/BloomFilter32bp2Split.html" title="class in org.archive.util"><B>NEXT CLASS</B></A></FONT></TD><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../../index.html?org/archive/util/BloomFilter32bp2.html" target="_top"><B>FRAMES</B></A> <A HREF="BloomFilter32bp2.html" target="_top"><B>NO FRAMES</B></A> <SCRIPT type="text/javascript"> <!-- if(window==top) { document.writeln('<A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>'); } //--></SCRIPT><NOSCRIPT> <A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A></NOSCRIPT></FONT></TD></TR><TR><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> SUMMARY: NESTED | <A HREF="#field_summary">FIELD</A> | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">DETAIL: <A HREF="#field_detail">FIELD</A> | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD></TR></TABLE><A NAME="skip-navbar_bottom"></A><!-- ======== END OF BOTTOM NAVBAR ======= --><HR>Copyright © 2003-2007 Internet Archive. All Rights Reserved.</BODY></HTML>
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -