Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

heap::elem::num(3pm) [debian man page]

Heap::Elem::Num(3pm)					User Contributed Perl Documentation				      Heap::Elem::Num(3pm)

NAME
Heap::Elem::Num - Numeric Heap Elements SYNOPSIS
use Heap::Elem::Num( NumElem ); use Heap::Fibonacci; my $heap = Heap::Fibonacci->new; my $elem; foreach $i ( 1..100 ) { $elem = NumElem( $i ); $heap->add( $elem ); } while( defined( $elem = $heap->extract_top ) ) { print "Smallest is ", $elem->val, " "; } DESCRIPTION
Heap::Elem::Num is used to wrap numeric values into an element that can be managed on a heap. The top of the heap will have the smallest element still remaining. (See Heap::Elem::NumRev if you want the heap to always return the largest element.) The details of the Elem interface are described in Heap::Elem. The details of using a Heap interface are described in Heap. AUTHOR
John Macdonald, john@perlwolf.com COPYRIGHT
Copyright 1998-2007, O'Reilly & Associates. This code is distributed under the same copyright terms as perl itself. SEE ALSO
Heap(3), Heap::Elem(3), Heap::Elem::NumRev(3). perl v5.8.8 2007-10-23 Heap::Elem::Num(3pm)

Check Out this Related Man Page

Heap::Elem::NumRev(3pm) 				User Contributed Perl Documentation				   Heap::Elem::NumRev(3pm)

NAME
Heap::Elem::NumRev - Reversed Numeric Heap Elements SYNOPSIS
use Heap::Elem::NumRev( NumRElem ); use Heap::Fibonacci; my $heap = Heap::Fibonacci->new; my $elem; foreach $i ( 1..100 ) { $elem = NumRElem( $i ); $heap->add( $elem ); } while( defined( $elem = $heap->extract_top ) ) { print "Largest is ", $elem->val, " "; } DESCRIPTION
Heap::Elem::NumRev is used to wrap numeric values into an element that can be managed on a heap. The top of the heap will have the largest element still remaining. (See Heap::Elem::Num if you want the heap to always return the smallest element.) The details of the Elem interface are described in Heap::Elem. The details of using a Heap interface are described in Heap. AUTHOR
John Macdonald, john@perlwolf.com COPYRIGHT
Copyright 1998-2007, O'Reilly & Associates. This code is distributed under the same copyright terms as perl itself. SEE ALSO
Heap(3), Heap::Elem(3), Heap::Elem::Num(3). perl v5.8.8 2007-10-23 Heap::Elem::NumRev(3pm)
Man Page

15 More Discussions You Might Find Interesting

1. Filesystems, Disks and Memory

heap size!

I'm a new guy to this field and I'm learning a lot about UNIX! Can any explan to me what exactly does 'heap size' mean and how can i increase the size for AIX 4.3.3? (2 Replies)
Discussion started by: i2admin
2 Replies

2. Shell Programming and Scripting

Fibonacci series

Need code to run the Fibonacci series from 0 to 10 (16 Replies)
Discussion started by: nycol
16 Replies

3. AIX

AIX 5.3 Heap Memory with SAP

Any idea whether this parameter can be set / adjusted and where please? (3 Replies)
Discussion started by: johnf
3 Replies

4. Shell Programming and Scripting

If statement not working

I understand this question probably poses some child like stupidity, but I can't get this if statement to work for love or money. #!/bin/ksh echo "Input either 1 or 2" read Num if ; then echo "Message 1" if ; then echo "Message 2" else echo "false" fi $ ksh decisions Input either 1... (6 Replies)
Discussion started by: Hazmeister
6 Replies

5. Shell Programming and Scripting

How to grab the value of field before the line reached

Hi. I have a qury whihc I hope someone could clarify. I have a file:- Num Measure 108 0.05 12 0.45 13 0.2 19 0.5 I wanted to grep the value of 19 from Column Num which will then take the minimum value of measure (not including 19's measure value).... (3 Replies)
Discussion started by: ahjiefreak
3 Replies

6. Programming

Heap and stack

Hi, I have a basic doubt here. Consider the following code snippet: main() { int *a; . . } Here the memory for a gets allocated in heap or stack. (5 Replies)
Discussion started by: naan
5 Replies

7. Shell Programming and Scripting

Finding Heap size Command--Urgent

Hi Friends, i need a unix command to check the heap space availability on unix system as I am getting following error: Error occurred during initialization of VM Could not reserve enough space for object heap Error occurred during initialization of VM Could not reserve enough space for... (2 Replies)
Discussion started by: Anji
2 Replies

8. UNIX for Dummies Questions & Answers

Adding a character

Hi, I cant seem to figure out how I add a character to an existing one. Heres my problem. So I have a line that looks like this: >56 584848392394958586858484849393 What I want to do is add Num in front of the 56. So basically I want to recognize the > and add Num in front of the... (6 Replies)
Discussion started by: kylle345
6 Replies

9. Linux

copy_from_user does not copy from process-heap

Hello all, I need a positive reply from you. I want to copy the user-process-heap to the kernel space memory. For that, I wrote the following code but it does not copy. ---------------- code -------------- unsigned long length_of_heap_vma = < length of vma pointing to process-heap > ; void *... (2 Replies)
Discussion started by: najoshi
2 Replies

10. Shell Programming and Scripting

return a list of unique values of a column from csv format file

Hi all, I have a huge csv file with the following format of data, Num SNPs, 549997 Total SNPs,555352 Num Samples, 157 SNP, SampleID, Allele1, Allele2 A001,AB1,A,A A002,AB1,A,A A003,AB1,A,A ... ... ... I would like to write out a list of unique SNP (column 1). Could you... (3 Replies)
Discussion started by: phoeberunner
3 Replies

11. Programming

Code to write the heap into a file

Hi everybody, i am doing a project on checkpoints, where in i need to write the heap area into a file. I have got a code which i need to analyze, also asked in the forum under solaris https://www.unix.com/solaris/135483-libckpt.html The heap is implemented as a link list given by the structure... (2 Replies)
Discussion started by: holla4ni
2 Replies

12. Programming

C: Initialize "const" array from the "heap"

Hello, I am working on solving an NP-Complete problem, so it is very important that operations and data with limited integer-argument ranges be computed using immutable look-up-tables contained entirely in CPU cache. Retrieval of the look-up-table data must never leave the CPU once initially... (6 Replies)
Discussion started by: HeavyJ
6 Replies

13. UNIX for Advanced & Expert Users

grep 7th column from a file seperated with ^

Hi, Can anyone help: I want to get the 7th column of a file seperated by ^ Num:^ 1^ testdevice1^10.1.1.1^PT1X23^true^HD^175^up^false^bad Num:^ 2^ testdevice2^10.1.1.2^ST1X23^true^SN^175^up^false^bad Expected result: HD SN Appreciate your help. (2 Replies)
Discussion started by: sureshcisco
2 Replies

14. Shell Programming and Scripting

Perl code help

i'm using the below perl code to get a list of ips: my @allipsfound ; for my $elem (@gatches) { my ($ip) = split ":",$elem; print "$ip \n"; } it spits out several lines of ips. most of those ips are the same. how do i do sort and uniq in the above code to make it so that it only... (3 Replies)
Discussion started by: SkySmart
3 Replies

15. Shell Programming and Scripting

Fibonacci series -going into infinite loop

Hello, I am a beginner to shell programming. Coded the following for Fibonacci series. #!/bin/bash fib() { i=0 j=1 arr=0 arr=1 echo "enter the limit:" read n while do fo= expr $j - 1 f1=$j f2= expr $j + 1 arr= expr ${arr} + ${arr} echo ${arr} (3 Replies)
Discussion started by: Rookie222
3 Replies