You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
psblas3/docs/html/node48.html

101 lines
3.0 KiB
HTML

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
<!--Converted with LaTeX2HTML 2012 (1.2)
original version by: Nikos Drakos, CBLU, University of Leeds
* revised and updated by: Marcus Hennecke, Ross Moore, Herb Swan
* with significant contributions from:
Jens Lippmann, Marek Rouchal, Martin Wilck and others -->
<HTML>
<HEAD>
<TITLE>Heap data structure</TITLE>
<META NAME="description" CONTENT="Heap data structure">
<META NAME="keywords" CONTENT="userhtml">
<META NAME="resource-type" CONTENT="document">
<META NAME="distribution" CONTENT="global">
<META NAME="Generator" CONTENT="LaTeX2HTML v2012">
<META HTTP-EQUIV="Content-Style-Type" CONTENT="text/css">
<LINK REL="STYLESHEET" HREF="userhtml.css">
<LINK REL="previous" HREF="node47.html">
<LINK REL="up" HREF="node9.html">
<LINK REL="next" HREF="node49.html">
</HEAD>
<BODY >
<!--Navigation Panel-->
<A NAME="tex2html826"
HREF="node49.html">
<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next" SRC="next.png"></A>
<A NAME="tex2html822"
HREF="node9.html">
<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up" SRC="up.png"></A>
<A NAME="tex2html818"
HREF="node47.html">
<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous" SRC="prev.png"></A>
<A NAME="tex2html824"
HREF="node1.html">
<IMG WIDTH="65" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="contents" SRC="contents.png"></A>
<BR>
<B> Next:</B> <A NAME="tex2html827"
HREF="node49.html">Computational routines</A>
<B> Up:</B> <A NAME="tex2html823"
HREF="node9.html">Data Structures and Classes</A>
<B> Previous:</B> <A NAME="tex2html819"
HREF="node47.html">Preconditioner data structure</A>
&nbsp; <B> <A NAME="tex2html825"
HREF="node1.html">Contents</A></B>
<BR>
<BR>
<!--End of Navigation Panel-->
<H2><A NAME="SECTION00045000000000000000">
Heap data structure</A>
</H2>
<P>
Among the tools routines of sec.&nbsp;<A HREF="node68.html#sec:toolsrout">6</A>, we have a number
of sorting utilities; the heap sort is implemented in terms of heaps
having the following signatures:
<DL>
<DT><STRONG><TT>psb_T_heap</TT></STRONG></DT>
<DD>: a heap containing elements of type T, where T
can be <code>i,s,c,d,z</code> for integer, real and complex data;
</DD>
<DT><STRONG><TT>psb_T_idx_heap</TT></STRONG></DT>
<DD>: a heap containing elements of type T, as
above, together with an integer index.
</DD>
</DL>
Given a heap object, the following methods are defined on it:
<DL>
<DT><STRONG>init</STRONG></DT>
<DD>Initialize memory; also choose ascending or descending
order;
</DD>
<DT><STRONG>howmany</STRONG></DT>
<DD>Current heap occupancy;
</DD>
<DT><STRONG>insert</STRONG></DT>
<DD>Add an item (or an item and its index);
</DD>
<DT><STRONG>get_first</STRONG></DT>
<DD>Remove and return the first element;
</DD>
<DT><STRONG>dump</STRONG></DT>
<DD>Print on file;
</DD>
<DT><STRONG>free</STRONG></DT>
<DD>Release memory.
</DD>
</DL>
These objects are used in MLD2P4 to implement the factorization
algorithms.
<P>
<BR><HR>
</BODY>
</HTML>