mirror of
https://github.com/php/doc-es.git
synced 2026-03-24 07:22:16 +01:00
103 lines
3.5 KiB
XML
103 lines
3.5 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<!-- EN-Revision: bfe06c36ec1c0a37909704b292a204195b0bc14f Maintainer: PhilDaiguille Status: ready -->
|
|
<!-- Reviewed: no -->
|
|
<refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xml:id="quickhashintstringhash.construct">
|
|
<refnamediv>
|
|
<refname>QuickHashIntStringHash::__construct</refname>
|
|
<refpurpose>Crear 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>
|
|
<simpara>
|
|
Este constructor crea un nuevo objeto <classname>QuickHashIntStringHash</classname>. El tamaño es el número de
|
|
listas de cubos a crear. Cuantas más listas haya, menos colisiones habrá.
|
|
Las opciones también son compatibles.
|
|
</simpara>
|
|
</refsect1>
|
|
|
|
<refsect1 role="parameters">
|
|
&reftitle.parameters;
|
|
<variablelist>
|
|
<varlistentry>
|
|
<term><parameter>size</parameter></term>
|
|
<listitem>
|
|
<simpara>
|
|
La cantidad de listas de cubos a configurar. El número que se pasa será
|
|
automáticamente redondeado a la siguiente potencia de dos. También se
|
|
limita automáticamente de <literal>64</literal> a <literal>4194304</literal>.
|
|
</simpara>
|
|
</listitem>
|
|
</varlistentry>
|
|
<varlistentry>
|
|
<term><parameter>options</parameter></term>
|
|
<listitem>
|
|
<simpara>
|
|
Las opciones que se pueden pasar son: <constant>QuickHashIntStringHash::CHECK_FOR_DUPES</constant>,
|
|
que asegura que ninguna entrada duplicada se añada al hash;
|
|
<constant>QuickHashIntStringHash::DO_NOT_USE_ZEND_ALLOC</constant> para no utilizar el gestor de memoria interno de PHP
|
|
así como uno de los valores <constant>QuickHashIntStringHash::HASHER_NO_HASH</constant>,
|
|
<constant>QuickHashIntStringHash::HASHER_JENKINS1</constant> o <constant>QuickHashIntStringHash::HASHER_JENKINS2</constant>.
|
|
Estas tres últimas configuran el algoritmo de hash a utilizar. Todas las opciones
|
|
pueden ser combinadas utilizando máscaras de bits.
|
|
</simpara>
|
|
</listitem>
|
|
</varlistentry>
|
|
</variablelist>
|
|
</refsect1>
|
|
|
|
<refsect1 role="returnvalues">
|
|
&reftitle.returnvalues;
|
|
<simpara>
|
|
Devuelve un nuevo objeto <classname>QuickHashIntStringHash</classname>.
|
|
</simpara>
|
|
</refsect1>
|
|
|
|
<refsect1 role="examples">
|
|
&reftitle.examples;
|
|
<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>
|
|
</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
|
|
-->
|