00001 //===================================================== 00002 // File : init_function.hh 00003 // Author : L. Plagne <laurent.plagne@edf.fr)> 00004 // Copyright (C) EDF R&D, lun sep 30 14:23:18 CEST 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 INIT_FUNCTION_HH 00021 #define INIT_FUNCTION_HH 00022 00023 double simple_function(int index) 00024 { 00025 return index; 00026 } 00027 00028 double simple_function(int index_i, int index_j) 00029 { 00030 return index_i+index_j; 00031 } 00032 00033 double pseudo_random(int index) 00034 { 00035 return std::rand()/double(RAND_MAX); 00036 } 00037 00038 double pseudo_random(int index_i, int index_j) 00039 { 00040 return std::rand()/double(RAND_MAX); 00041 } 00042 00043 00044 double null_function(int index) 00045 { 00046 return 0.0; 00047 } 00048 00049 double null_function(int index_i, int index_j) 00050 { 00051 return 0.0; 00052 } 00053 00054 #endif