00001 // This matrix class is a C++ wrapper for the GNU Scientific Library
00002 // Copyright (C) ULP-IPB Strasbourg
00003
00004 // This program 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 // 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 General Public License for more details.
00013
00014 // You should have received a copy of the GNU General Public License
00015 // along with this program; if not, write to the Free Software
00016 // Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
00017
00018 #ifndef _permutation_h
00019 #define _permutation_h
00020
00021 #include<gsl/gsl_permutation.h>
00022
00023 namespace gsl
00024 {
00025 class permutation
00026 {
00027 friend class matrix;
00028 friend class matrix_float;
00029 friend class matrix_int;
00030
00031 gsl_permutation *gsldata;
00032 public:
00033 permutation(size_t n,bool clear=true)
00034 {
00035 gsldata=(clear ? gsl_permutation_calloc(n) : gsl_permutation_alloc(n));
00036 }
00037 permutation():gsldata(NULL){;}
00038 void resize(size_t n){gsldata= gsl_permutation_calloc(n);}
00039 };
00040 }
00041 #endif// _permutation_h
1.2.8.1 written by Dimitri van Heesch,
© 1997-2001