mirror of
https://github.com/php/doc-es.git
synced 2026-03-26 08:22:08 +01:00
git-svn-id: https://svn.php.net/repository/phpdoc/es/trunk@326586 c90b9560-bf6c-de11-be94-00142212c4b1
111 lines
3.4 KiB
XML
111 lines
3.4 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<!-- $Revision$ -->
|
|
<!-- EN-Revision: 60ec2446182c3f45d16a13c0be0b18baf5a13a48 Maintainer: seros Status: ready -->
|
|
<!-- Reviewed: no -->
|
|
|
|
<refentry xml:id="quickhashintstringhash.construct" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
|
|
<refnamediv>
|
|
<refname>QuickHashIntStringHash::__construct</refname>
|
|
<refpurpose>Crea un nuevo objeto QuickHashIntStringHash</refpurpose>
|
|
</refnamediv>
|
|
|
|
<refsect1 role="description">
|
|
&reftitle.description;
|
|
<methodsynopsis>
|
|
<modifier>public</modifier> <methodname>QuickHashIntStringHash::__construct</methodname>
|
|
<methodparam><type>int</type><parameter>size</parameter></methodparam>
|
|
<methodparam choice="opt"><type>int</type><parameter>options</parameter><initializer>0</initializer></methodparam>
|
|
</methodsynopsis>
|
|
<para>
|
|
Este constructor crea un nuevo objeto QuickHashIntStringHash. El tamaño es la cantidad de
|
|
listas de recipientes a crear. Cuantas más listas existan, menos colisiones
|
|
ocurrirán. También admite opciones.
|
|
</para>
|
|
</refsect1>
|
|
|
|
<refsect1 role="parameters">
|
|
&reftitle.parameters;
|
|
<para>
|
|
<variablelist>
|
|
<varlistentry>
|
|
<term><parameter>size</parameter></term>
|
|
<listitem>
|
|
<para>
|
|
La cantidad de listas de recipientes a configurar. El número que se pase será
|
|
automáticamente redondeado hacia la siguiente potencia de dos. También será
|
|
limitado automáticamente a valores entre 64 y 4194304.
|
|
</para>
|
|
</listitem>
|
|
</varlistentry>
|
|
<varlistentry>
|
|
<term><parameter>options</parameter></term>
|
|
<listitem>
|
|
<para>
|
|
Las opciones que se pueden pasar son: QuickHashIntStringHash::CHECK_FOR_DUPES,
|
|
que se asegura de que no se añadan entradas duplicadas al conjunto;
|
|
QuickHashIntStringHash::DO_NOT_USE_ZEND_ALLOC para no usar el gestor de memoria
|
|
interna de PHP, y tambíen una de las siguientes: QuickHashIntStringHash::HASHER_NO_HASH,
|
|
QuickHashIntStringHash::HASHER_JENKINS1 o QuickHashIntStringHash::HASHER_JENKINS2.
|
|
Estas tres últimas configuran el algoritmo hash a usar. Todas las opcioines
|
|
se pueden combinar usando máscaras de bits.
|
|
</para>
|
|
</listitem>
|
|
</varlistentry>
|
|
</variablelist>
|
|
</para>
|
|
</refsect1>
|
|
|
|
<refsect1 role="returnvalues">
|
|
&reftitle.returnvalues;
|
|
<para>
|
|
Devuelve un nuevo objeto QuickHashIntStringHash.
|
|
</para>
|
|
</refsect1>
|
|
|
|
<refsect1 role="examples">
|
|
&reftitle.examples;
|
|
<para>
|
|
<example>
|
|
<title>Ejemplo de <function>QuickHashIntStringHash::__construct</function></title>
|
|
<programlisting role="php">
|
|
<![CDATA[
|
|
<?php
|
|
var_dump( new QuickHashIntStringHash( 1024 ) );
|
|
var_dump( new QuickHashIntStringHash( 1024, QuickHashIntStringHash::CHECK_FOR_DUPES ) );
|
|
var_dump(
|
|
new QuickHashIntStringHash(
|
|
1024,
|
|
QuickHashIntStringHash::DO_NOT_USE_ZEND_ALLOC | QuickHashIntStringHash::HASHER_JENKINS2
|
|
)
|
|
);
|
|
?>
|
|
]]>
|
|
</programlisting>
|
|
</example>
|
|
</para>
|
|
</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
|
|
-->
|