[Swift-user] mapping a 2 dim array to a directory

Ketan Maheshwari ketancmaheshwari at gmail.com
Tue Jun 21 16:59:39 CDT 2011


Hello,

I am trying to get a 2 dim array to map to a directory with a given pattern
as follows:

The directory contains files with names as follows:

a_00
a_01
.
.
a_99
b_00
b_01
.
.
.
z_99


The mapped variable amap[i][j] should be mapped in such a way that i should
map to the prefix and j should map to the suffix part of the file.

For example: amap[2][10] should return the file c_10.

In addition the said directory is an output directory and does not exist
yet.

A one dimensional array mapping exists for this which is as follows:

file  dat_files[] < simple_mapper;
                              padding = 3,
                              location = "output",
                              prefix  = @strcat( str_root, "_" ),
                              suffix  = ".dat" >;

I looked into external mappers but could not figure out how exactly to go
for it.

Any clues?



Regards,
Ketan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/swift-user/attachments/20110621/6e1b3f59/attachment.html>


More information about the Swift-user mailing list