alm.cc

Go to the documentation of this file.
00001 /*
00002  *  This file is part of Healpix_cxx.
00003  *
00004  *  Healpix_cxx is free software; you can redistribute it and/or modify
00005  *  it under the terms of the GNU General Public License as published by
00006  *  the Free Software Foundation; either version 2 of the License, or
00007  *  (at your option) any later version.
00008  *
00009  *  Healpix_cxx is distributed in the hope that it will be useful,
00010  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
00011  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00012  *  GNU General Public License for more details.
00013  *
00014  *  You should have received a copy of the GNU General Public License
00015  *  along with Healpix_cxx; if not, write to the Free Software
00016  *  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
00017  *
00018  *  For more information about HEALPix, see http://healpix.sourceforge.net
00019  */
00020 
00021 /*
00022  *  Healpix_cxx is being developed at the Max-Planck-Institut fuer Astrophysik
00023  *  and financially supported by the Deutsches Zentrum fuer Luft- und Raumfahrt
00024  *  (DLR).
00025  */
00026 
00027 /*! \file alm.cc
00028  *  Class for storing spherical harmonic coefficients.
00029  *
00030  *  Copyright (C) 2003-2011 Max-Planck-Society
00031  *  \author Martin Reinecke
00032  */
00033 
00034 #include "alm.h"
00035 
00036 using namespace std;
00037 
00038 //static
00039 tsize Alm_Base::Num_Alms (int l, int m)
00040   {
00041   planck_assert(m<=l,"mmax must not be larger than lmax");
00042   return ((m+1)*(m+2))/2 + (m+1)*(l-m);
00043   }
00044 
00045 void Alm_Base::swap (Alm_Base &other)
00046   {
00047   std::swap(lmax, other.lmax);
00048   std::swap(mmax, other.mmax);
00049   std::swap(tval, other.tval);
00050   }

Generated on Thu Oct 8 14:48:52 2015 for Healpix C++