NAME
Math::PartialOrder::Std - standard iterative class for partial orders (datatype hierarchies).
SYNOPSIS
use Math::PartialOrder::Std;
# ... any Math::PartialOrder::Base method
REQUIRES
Math::PartialOrder, Carp, Exporter
DESCRIPTION
Math::PartialOrder::Std is a Math::PartialOrder::Base implementation for rooted finite partial orders (datatype hierarchies) which uses hash-references to store and manipulate hierarchy information. The hashrefs used have keys which are eq
to their values.
Math::PartialOrder::Std inherits from Math::PartialOrder::Base, and implements all required methods described in Math::PartialOrder::Base.
METHODS
Construction & Initialization
new( {root=>$r} )
Creates and returns a new Math::PartialOrder::Std object rooted at $r, which defaults to 'BOTTOM'.
Additional Hierarchy Methods
_ancestors($type)
Returns the ancestors of $type as a hash reference.
_descendants($type)
Returns the descendants of $type as a hash reference.
_minimize(\%hash)
Destructively minimizes the values of the hash-reference \%hash. Returns \%hash.
_maximize(\%hash)
Destructively maximizes the values of the hash-reference \%hash. Returns \%hash.
Hierarchy Maintainence: Low-level Accessors/Manipulators
_types()
Returns the hashref whose values represent all of the types in the hierarchy.
_root(), _root($r)
Get/set the root of the hierarchy.
_parents()
,_parents($type)
With no arguments, returns a reference to a hash keyed by type whose values are hashrefs representing the parents of the keying type.
With one argument, returns the hashref representing the parents of $type.
_children()
,_children($type)
With no arguments, returns a reference to a hash keyed by type whose values are hashrefs representing the children of the keying type.
With one argument, returns the hashref representing the children of $type.
_attributes()
,_attributes($type)
,_attributes($type, $hashref)
With no arguments, returns a reference to a hash of attribute-hashes keyed by type. With one argument, returns a reference to the attributes for $type. With 2 arguments, sets the attributes for $type to $hashref.
ACKNOWLEDGEMENTS
perl by Larry Wall.
Usage of hash-references as sets draws heavily on Jarkko Hietaniemi's Set::Scalar module.
AUTHOR
Bryan Jurish <jurish@ling.uni-potsdam.de>
COPYRIGHT
Copyright (c) 2001, Bryan Jurish. All rights reserved.
This package is free software. You may redistribute it and/or modify it under the same terms as Perl itself.
SEE ALSO
perl(1). Math::PartialOrder(3pm). Math::PartialOrder::Base(3pm). Math::PartialOrder::Caching(3pm). Math::PartialOrder::LRUCaching(3pm). Math::PartialOrder::CMasked(3pm). Math::PartialOrder::CEnum(3pm). Math::PartialOrder::Loader(3pm). Set::Scalar(3pm).