Synopsis:

I would like to request namespace for a module "Math::MapNumbers".  This 
module maps a repeating series of numbers onto a non-repeating series of 
numbers for the purpose of organizing data (see below for detailed 
information).

I have done a fairly thorough search of the existing modules, and I have not 
found a module with similar functions.  Note that although a group of Map:: 
modules has been proposed, the Math::MapNumbers module does not overlap 
their functionality.

If you know of a module that provides the functionality I am proposing, or 
if you think that it would be better integrated into an existing module, 
please let me know.  Also, if you think that there would be a better name 
for this module (see the other names I have considered below), please 
suggest it.


Detailed Information:

The Math::MapNumbers module maps a repeating series of numbers (e.g., 1, 2, 
3) onto a non-repeating series of numbers (e.g., 0, 1, 2, 3, 4, 5, 6, 7, 8, 
9, ...).  Mapping the repeating series onto a non-repeating series allows 
you to organize your numeric data into groups of a certain size that follow 
a repeating pattern.

This is accomplished through a set of functions using the modulo (%) 
operator with various offset arguments.  The functions are pretty general, 
and something most mathematically-oriented people could come up with on 
their own, but I use them so frequently that I have packaged them into a 
module.

I can provide detailed examples of why you might want to do such a mapping, 
but a basic illustration is that you might want to count by 3's (i.e., 1, 2, 
3, 1, 2, 3, ...) but your data uses an ordinal index of 0 (i.e., 0, 1, 2, 3, 
4, 5, 6, ...) and you want '0' in your data to correspond to '1' in the 
count-by-3 series, so that your data maps as

  Your Data        Counting By 3
     0                   1
     1                   2
     2                   3
     3                   1
     4                   2
     5                   3
     6                   1
     7                   2

If your application calls for it, you can get fancy and count by 3's using 
'2, 3, 4' (or some other series), and align the series to any value in your 
original data (which does not need to be continuous) such as

  Your Data        Counting By 3 Using '2, 3, 4'
     70                  2
     71                  3
     72                  4
     73                  2
     74                  3
     75                  4
     76                  2
     77                  3
     80                  3
     83                  3


Proposed Module Name:

Right now, my proposed name for this module is Math::MapNumbers.  Other 
names that I have considered are:

  Math::RepeatSeries
  Math::MapSeries
  Math::SeriesMap
  Math::NumberMap
  Math::MapModulo
  Math::ModuloMap

If you like one of these names better, or if you can think of a more 
appropriate name yourself, please let me know.


Thanks and Best Regards,
Ernie


_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp.

Reply via email to