00001 /*************************************************************************** 00002 * @file gnn_random_order.h 00003 * @brief Random order for datasets header file. 00004 * 00005 * @date : 30-05-04 18:14 00006 * @author : Pedro Ortega C. <peortega@dcc.uchile.cl> 00007 * Copyright 2003 Pedro Ortega C. 00008 ****************************************************************************/ 00009 /* 00010 * This program is free software; you can redistribute it and/or modify 00011 * it under the terms of the GNU General Public License as published by 00012 * the Free Software Foundation; either version 2 of the License, or 00013 * (at your option) any later version. 00014 * 00015 * This program is distributed in the hope that it will be useful, 00016 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00017 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00018 * GNU Library General Public License for more details. 00019 * 00020 * You should have received a copy of the GNU General Public License 00021 * along with this program; if not, write to the Free Software 00022 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 00023 */ 00024 00025 #ifndef _GNN_RANDOM_ORDER_H_ 00026 #define _GNN_RANDOM_ORDER_H_ 00027 00028 00029 00030 /******************************************/ 00031 /* Include Files */ 00032 /******************************************/ 00033 00034 #include <gsl/gsl_permutation.h> 00035 #include "gnn_dataset.h" 00036 #include "gnn_input.h" 00037 00038 00039 00040 /******************************************/ 00041 /* Typedefs */ 00042 /******************************************/ 00043 00044 /** 00045 * @brief The datatype for a random order sampler. 00046 * @ingroup gnn_random_order_doc 00047 * 00048 * This is the datatype for a dataset random order sampler. It extends 00049 * the basic \ref gnn_dataset structure to include three additional pointers to the input pattern, output 00050 * pattern and pattern weights samplers. 00051 */ 00052 typedef struct _gnn_random_order gnn_random_order; 00053 00054 struct _gnn_random_order 00055 { 00056 gnn_dataset set; /**< The underlying \ref gnn_dataset structure. */ 00057 gnn_dataset *data; /**< A pointer to a dataset. */ 00058 gsl_permutation *perm; /**< The permutation. */ 00059 }; 00060 00061 00062 00063 /******************************************/ 00064 /* Public Interface */ 00065 /******************************************/ 00066 00067 gnn_dataset * 00068 gnn_random_order_new (gnn_dataset *data); 00069 00070 gnn_dataset * 00071 gnn_random_order_from_inputs_new (gnn_input *inputs, 00072 gnn_input *outputs, 00073 gnn_input *weightsFile); 00074 00075 gnn_dataset * 00076 gnn_random_order_from_file_new (const char *inputsFile, 00077 const char *outputsFile, 00078 const char *weightsFile); 00079 00080 gnn_dataset * 00081 gnn_random_order_get_dataset (gnn_dataset *set); 00082 00083 #endif /* _GNN_RANDOM_ORDER_H_ */ 00084 00085 00086
1.2.18