mirror of
https://github.com/php/doc-ru.git
synced 2026-03-24 15:52:13 +01:00
85 lines
2.6 KiB
XML
85 lines
2.6 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
||
<!-- EN-Revision: d51166ca16fda8e766849505b84f9306ef443f71 Maintainer: tmn Status: ready -->
|
||
<!-- Reviewed: no -->
|
||
<refentry xml:id="splpriorityqueue.compare" xmlns="http://docbook.org/ns/docbook">
|
||
<refnamediv>
|
||
<refname>SplPriorityQueue::compare</refname>
|
||
<refpurpose>
|
||
Сравнивает приоритеты для корректного помещения элементов в очередь
|
||
</refpurpose>
|
||
</refnamediv>
|
||
|
||
<refsect1 role="description">
|
||
&reftitle.description;
|
||
<methodsynopsis role="SplPriorityQueue">
|
||
<modifier>public</modifier> <type>int</type><methodname>SplPriorityQueue::compare</methodname>
|
||
<methodparam><type>mixed</type><parameter>priority1</parameter></methodparam>
|
||
<methodparam><type>mixed</type><parameter>priority2</parameter></methodparam>
|
||
</methodsynopsis>
|
||
|
||
<para>
|
||
Сравнивает <parameter>priority1</parameter> с <parameter>priority2</parameter>.
|
||
</para>
|
||
</refsect1>
|
||
|
||
<refsect1 role="parameters">
|
||
&reftitle.parameters;
|
||
<para>
|
||
<variablelist>
|
||
<varlistentry>
|
||
<term><parameter>priority1</parameter></term>
|
||
<listitem>
|
||
<para>
|
||
Приоритет первого узла.
|
||
</para>
|
||
</listitem>
|
||
</varlistentry>
|
||
<varlistentry>
|
||
<term><parameter>priority2</parameter></term>
|
||
<listitem>
|
||
<para>
|
||
Приоритет второго узла.
|
||
</para>
|
||
</listitem>
|
||
</varlistentry>
|
||
</variablelist>
|
||
</para>
|
||
</refsect1>
|
||
|
||
<refsect1 role="returnvalues">
|
||
&reftitle.returnvalues;
|
||
<para>
|
||
Результат сравнения, положительное число, когда <parameter>priority1</parameter>
|
||
больше <parameter>priority2</parameter>, 0 если они равны, и отрицательное число
|
||
в остальных случаях.
|
||
</para>
|
||
<note>
|
||
<para>
|
||
При добавлении нескольких элементов с одинаковым приоритетом точный порядок
|
||
следования этих элементов в очереди не определён.
|
||
</para>
|
||
</note>
|
||
</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
|
||
-->
|