Hello. I'm preparing to submit some work to CPAN, but I can't figure out
what is the best namespace for it. Please advise.
The purpose of the module(s) is to sort a set of objects @s relative to some
standard object $obj via comparison of known enumerated values @v for that
attribute using a "compatibility matrix" $m.
For example, assume I have defined a perl object Person.pm which has a
single method "sign" which always returns one of the 12 astrological signs,
such "aries" or "taurus". Assume further that I (or another more
'knowledgeable' person) have defined a 12x12 matrix (graph) which defines
the compatibility of each sign relative to each other sign. The value at
each edge gives the attractor or detractor for that association. For
example the edges:
aries->aries = 100 # an aries is 'compatible' with another aries
aries->taurus = 30 # arieses like tauruses
taurus->aries = -40 # but the converse is not true
would make up 3 of the 144 total edges in this matrix $m.
The main module 'Comparator.pm' object takes an array of People.pm (with
method 'sign') objects like (joe bob larry sue jen jill). and a matrix which
gives the compatibility for attribute 'sign'.
Then say I want to know who might be the best date for my friend 'Mortimer',
another Person.pm object (forget the fact that I probably want to sort on
more than one attribute in this case). The comparator->sort($mortimer)
gives me back an array of who might be the best date for him.
At first I was thinking it should go under the Graph::ObjectComparator or
something like that, but the more I realize it's not really a graph datatype
although it uses graph 'technology'. An obvious candidate is something
under Sort, (like Sort::Object or Sort::AttributedObject) but it's not one
of the classic sort algorithms (that I know of) and I wonder whether it's
too non-general to justify going under Sort.
Another idea is something under Object, (like Object::Compare or
Object::Comparator or Object::AttributeCompare).
Please help!
--Paul
johnston-dot-p-at-worldnet-dot-att-dot-net
# -------------------------------
# Paul Johnston
# [EMAIL PROTECTED]
# phone internal: x4016
# phone external: call main switchboard at
# 650-378-6500 and request to be connected
# to x4016
# -------------------------------