NAME

Meta::Ds::Oset - Ordered hash data structure.

COPYRIGHT

Copyright (C) 2001 Mark Veltzer; All rights reserved.

LICENSE

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111, USA.

DETAILS

MANIFEST: Oset.pm PROJECT: meta

SYNOPSIS

package foo; use Meta::Ds::Oset qw(); my($oset)=Meta::Ds::Oset-new();> $oset-insert("mark");>

DESCRIPTION

This is a set object which is also ordered. This means you can access the n'th element. You get performance penalties in this implementation (especially upon removal of elements) so if you dont need the ordered feature please use the Meta::Ds::Set class.

EXPORTS

new($) insert($$) remove($$) has($$) hasnt($$) check_elem($$) check_not_elem($$) print($$) size($) elem($$)

FUNCTION DOCUMENTATION

new($)

Gives you a new Oset object.

insert($$)

This inserts a new element into the Set. If the element is already an element it is not an error.

remove($$)

This removes an element from the Set. If the element is not an element of the set it is not an error.

has($$)

This returns whether a specific element is a member of the set.

hasnt($$)

This returns whether a specific element is not a member of the set.

check_elem($$)

Thie method receives: 0. An Oset object. 1. An element to check fore. This method makes sure that the element is a member of the set and dies if it is not.

check_not_elem($$)

Thie method receives: 0. An Oset object. 1. An element to check fore. This method makes sure that the element is a member of the set and dies if it is not.

print($$)

This will print the Oset object to the specified file for you.

size($)

This method returns the size of the set.

elem($$)

This method receives: 0. An Oset object. 1. A location. And retrieves the element at that location.

BUGS

None.

AUTHOR

Mark Veltzer <mark2776@yahoo.com>

HISTORY

start of revision info 1 Tue Jan 9 22:40:39 2001 MV add enumerated types to options 2 Wed Jan 10 12:05:55 2001 MV more on tests/more checks to perl 3 Thu Jan 11 09:43:58 2001 MV fix all tests change 4 Fri Jan 12 15:53:19 2001 MV change new methods to have prototypes 5 Sat Jan 13 08:28:57 2001 MV UI for Opts.pm 6 Sun Jan 28 02:34:56 2001 MV perl code quality 7 Sun Jan 28 13:51:26 2001 MV more perl quality 8 Tue Jan 30 03:03:17 2001 MV more perl quality 9 Wed Jan 31 15:28:22 2001 MV get basic Simul up and running 10 Sat Feb 3 23:41:08 2001 MV perl documentation 11 Mon Feb 5 03:21:02 2001 MV more perl quality 12 Tue Feb 6 01:04:52 2001 MV perl qulity code 13 Tue Feb 6 07:02:13 2001 MV more perl code quality 14 Tue Feb 6 22:19:51 2001 MV revision change 14 Thu Feb 8 00:23:21 2001 MV betern general cook schemes end of revision info

SEE ALSO

Nothing.

TODO

-how can we ease the performance penalties of the removal of elements ?