gsl_permutation.h

Go to the documentation of this file.
00001 
00002 
00003 //
00015 
00016 //  This permutation class has been adapted from the gslwrap project.
00017 //  It is a C++ wrapper for the GNU Scientific Library
00018 //  Copyright (C) 2001 Ramin Nakisa
00019 
00020 //  This program is free software; you can redistribute it and/or modify
00021 //  it under the terms of the GNU General Public License as published by
00022 //  the Free Software Foundation; either version 2 of the License, or
00023 //  (at your option) any later version.
00024 
00025 //  This program is distributed in the hope that it will be useful,
00026 //  but WITHOUT ANY WARRANTY; without even the implied warranty of
00027 //  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00028 //  GNU General Public License for more details.
00029 
00030 //  You should have received a copy of the GNU General Public License
00031 //  along with this program; if not, write to the Free Software
00032 //  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
00033 
00034 #ifndef _GSL_PERMUTATION_H
00035 #define _GSL_PERMUTATION_H
00036 
00037 #include<assert.h>
00038 #include<gsl/gsl_permutation.h>
00039 
00041 //
00042 
00043 class permutation
00044 {
00045         friend class matrix;
00046         friend class matrix_int;
00047         
00048 private:
00049 
00051 //
00052 
00053         gsl_permutation *gsldata;
00054         
00055 public:
00056 
00058 //
00066 //
00067 
00068         permutation(size_t n,bool clear=true);
00069 
00071 //
00072         
00073         permutation();
00074         
00076 //
00078 //
00079 
00080     ~permutation();
00081         
00083 //
00085 //
00086         void resize(size_t n);
00087         
00089 //
00090         
00091         gsl_permutation       *gslperm_obj()       {assert(gsldata);return gsldata;} 
00092 
00094 //
00095 
00096         const gsl_permutation *gslperm_obj() const {assert(gsldata);return gsldata;}
00097 
00098 };
00099 
00100 #endif // GSL_PERMUTATION_H
00101 
All Classes Files Functions Variables Typedefs Friends Defines