thegooglecodearchive / healpy

Automatically exported from code.google.com/p/healpy
GNU General Public License v2.0
0 stars 0 forks source link

code duplication in healpy_pixel_lib.cc; refactoring #39

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
A lot of code in healpy_pixel_lib.cc is duplicated for NEST and RING schemes.
I attach the patch with the refactored code reducing duplication.

The idea of the patch: Instead of functions ang2ipix_nest, ang2ipix_ring etc. I 
define the template function ang2ipix<Helpix_Ordering_Scheme> etc.
Therefore ang2ipix_nest becomes ang2ipix<NEST> etc.   

I did a little bit of testing, and it seems that the patch doesn't break 
anything.

Original issue reported on code.google.com by koposov on 22 Jul 2010 at 4:12

Attachments:

GoogleCodeExporter commented 9 years ago
Applied as revision 158.

Original comment by martin.r...@gmx.de on 25 Jan 2011 at 10:35