size_lin_log.hh
Go to the documentation of this file.
00001 //=====================================================
00002 // File   :  size_lin_log.hh
00003 // Author :  L. Plagne <laurent.plagne@edf.fr)>        
00004 // Copyright (C) EDF R&D,  mar déc 3 18:59:37 CET 2002
00005 //=====================================================
00006 // 
00007 // This program is free software; you can redistribute it and/or
00008 // modify it under the terms of the GNU General Public License
00009 // as published by the Free Software Foundation; either version 2
00010 // of the License, or (at your option) any later version.
00011 // 
00012 // This program is distributed in the hope that it will be useful,
00013 // but WITHOUT ANY WARRANTY; without even the implied warranty of
00014 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00015 // GNU General Public License for more details.
00016 // You should have received a copy of the GNU General Public License
00017 // along with this program; if not, write to the Free Software
00018 // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
00019 // 
00020 #ifndef SIZE_LIN_LOG
00021 #define SIZE_LIN_LOG
00022 
00023 #include "size_log.hh"
00024 
00025 template<class Vector>
00026 void size_lin_log(const int nb_point, const int size_min, const int size_max, Vector & X)
00027 {
00028   int ten=10;
00029   int nine=9;
00030 
00031   X.resize(nb_point);
00032 
00033   if (nb_point>ten){
00034 
00035     for (int i=0;i<nine;i++){
00036       
00037       X[i]=i+1;
00038 
00039     }
00040 
00041     Vector log_size;
00042     size_log(nb_point-nine,ten,size_max,log_size);
00043 
00044     for (int i=0;i<nb_point-nine;i++){
00045       
00046       X[i+nine]=log_size[i];
00047 
00048     }
00049   }
00050   else{
00051 
00052     for (int i=0;i<nb_point;i++){
00053       
00054       X[i]=i+1;
00055 
00056     }
00057   }
00058 
00059  //  for (int i=0;i<nb_point;i++){
00060     
00061 //        INFOS("computed sizes : X["<<i<<"]="<<X[i]);
00062     
00063 //   }
00064 
00065 }
00066   
00067 #endif
00068     
00069 
00070 


re_vision
Author(s): Dorian Galvez-Lopez
autogenerated on Sun Jan 5 2014 11:32:29