Bryan Jurish > Math-PartialOrder-0.01 > Math::PartialOrder::Std
Module Version: 0.01

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'.

• `_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>