mirror of
https://github.com/php/doc-pt_br.git
synced 2026-03-24 07:02:09 +01:00
103 lines
3.4 KiB
XML
103 lines
3.4 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<!-- EN-Revision: bfe06c36ec1c0a37909704b292a204195b0bc14f Maintainer: leonardolara Status: ready -->
|
|
<refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xml:id="quickhashinthash.construct">
|
|
<refnamediv>
|
|
<refname>QuickHashIntHash::__construct</refname>
|
|
<refpurpose>Cria um novo objeto QuickHashIntHash</refpurpose>
|
|
</refnamediv>
|
|
|
|
<refsect1 role="description">
|
|
&reftitle.description;
|
|
<methodsynopsis>
|
|
<modifier>public</modifier> <methodname>QuickHashIntHash::__construct</methodname>
|
|
<methodparam><type>int</type><parameter>size</parameter></methodparam>
|
|
<methodparam choice="opt"><type>int</type><parameter>options</parameter></methodparam>
|
|
</methodsynopsis>
|
|
<simpara>
|
|
Este construtor cria um novo <classname>QuickHashIntHash</classname>. O tamanho é a quantidade de
|
|
listas de buckets a serem criadas. Quanto mais listas houver, menos colisões irão
|
|
existir. Opções também são suportadas.
|
|
</simpara>
|
|
</refsect1>
|
|
|
|
<refsect1 role="parameters">
|
|
&reftitle.parameters;
|
|
<variablelist>
|
|
<varlistentry>
|
|
<term><parameter>size</parameter></term>
|
|
<listitem>
|
|
<simpara>
|
|
A quantidade de listas de buckets a serem configuradas. O número informado será
|
|
automaticamente arredondado para a próxima potência de dois. Também é
|
|
automaticamente limitado de <literal>64</literal> a <literal>4194304</literal>.
|
|
</simpara>
|
|
</listitem>
|
|
</varlistentry>
|
|
<varlistentry>
|
|
<term><parameter>options</parameter></term>
|
|
<listitem>
|
|
<simpara>
|
|
As opções que podem ser passadas são: <constant>QuickHashIntHash::CHECK_FOR_DUPES</constant>,
|
|
que garante que nenhuma entrada duplicada seja adicionada ao hash;
|
|
<constant>QuickHashIntHash::DO_NOT_USE_ZEND_ALLOC</constant> para não usar o gerenciador de memória interna do PHP,
|
|
bem como uma das seguintes opções: <constant>QuickHashIntHash::HASHER_NO_HASH</constant>,
|
|
<constant>QuickHashIntHash::HASHER_JENKINS1</constant> ou <constant>QuickHashIntHash::HASHER_JENKINS2</constant>.
|
|
Estas três últimas configuram qual algoritmo de hash usar. Todas as opções
|
|
podem ser combinadas usando máscaras de bits.
|
|
</simpara>
|
|
</listitem>
|
|
</varlistentry>
|
|
</variablelist>
|
|
</refsect1>
|
|
|
|
<refsect1 role="returnvalues">
|
|
&reftitle.returnvalues;
|
|
<simpara>
|
|
Retorna um novo objeto <classname>QuickHashIntHash</classname>.
|
|
</simpara>
|
|
</refsect1>
|
|
|
|
<refsect1 role="examples">
|
|
&reftitle.examples;
|
|
<example>
|
|
<title>Exemplo de <function>QuickHashIntHash::__construct</function></title>
|
|
<programlisting role="php">
|
|
<![CDATA[
|
|
<?php
|
|
var_dump( new QuickHashIntHash( 1024 ) );
|
|
var_dump( new QuickHashIntHash( 1024, QuickHashIntHash::CHECK_FOR_DUPES ) );
|
|
var_dump(
|
|
new QuickHashIntHash(
|
|
1024,
|
|
QuickHashIntHash::DO_NOT_USE_ZEND_ALLOC | QuickHashIntHash::HASHER_JENKINS2
|
|
)
|
|
);
|
|
?>
|
|
]]>
|
|
</programlisting>
|
|
</example>
|
|
</refsect1>
|
|
|
|
|
|
</refentry>
|
|
<!-- Keep this comment at the end of the file
|
|
Local variables:
|
|
mode: sgml
|
|
sgml-omittag:t
|
|
sgml-shorttag:t
|
|
sgml-minimize-attributes:nil
|
|
sgml-always-quote-attributes:t
|
|
sgml-indent-step:1
|
|
sgml-indent-data:t
|
|
indent-tabs-mode:nil
|
|
sgml-parent-document:nil
|
|
sgml-default-dtd-file:"~/.phpdoc/manual.ced"
|
|
sgml-exposed-tags:nil
|
|
sgml-local-catalogs:nil
|
|
sgml-local-ecat-files:nil
|
|
End:
|
|
vim600: syn=xml fen fdm=syntax fdl=2 si
|
|
vim: et tw=78 syn=sgml
|
|
vi: ts=1 sw=1
|
|
-->
|