k-dot-p 0.1

fast_complex.h++

Go to the documentation of this file.
00001 /*
00002   Copyright (C) 2009 Joseph Pingenot
00003 
00004   This program is free software: you can redistribute it and/or modify
00005   it under the terms of the GNU Affero General Public License as published by
00006   the Free Software Foundation, either version 3 of the License, or
00007   (at your option) any later version.
00008 
00009   This program 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 Affero General Public License for more details.
00013 
00014   You should have received a copy of the GNU Affero General Public License
00015   along with this program.  If not, see <http://www.gnu.org/licenses/>.
00016 
00017 */
00018 
00019 #ifndef FAST_COMPLEX_HXX__
00020 #define FAST_COMPLEX_HXX__
00021 
00022 namespace kdotp {
00023   namespace libmodelxx {
00024 
00025     /*This is just a struct. It avoids adding in the function pointers and
00026      * what-not of a full class.
00027      *This is intended to be used in large arrays, because it avoids all of this
00028      *  overhead.*/
00029     typedef struct fast_complex_ {
00030       double re;
00031       double im;
00032     } fast_complex;
00033 
00034     void conjugate_in_place(fast_complex& fc);
00035 
00036     void conjugate(const fast_complex& fc, fast_complex& result);
00037 
00038 
00039   }
00040 }
00041 
00042 #endif
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Defines