00001 /* 00002 * Copyright (c) 2007. The BATI team. All right reserved. 00003 * 00004 * This file is part of BATI library. 00005 * 00006 * BATI library is free software: you can redistribute it and/or modify 00007 * it under the terms of the GNU General Public License as published by 00008 * the Free Software Foundation, either version 3 of the License, or 00009 * (at your option) any later version. 00010 * 00011 * BATI library is distributed in the hope that it will be useful, 00012 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00013 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00014 * GNU General Public License for more details. 00015 * 00016 * You should have received a copy of the GNU General Public License 00017 * along with BATI library. If not, see <http://www.gnu.org/licenses/>. 00018 */ 00019 00020 /* ********* traitement de données d'apprentissages **************************/ 00021 /* */ 00022 /* */ 00023 /* */ 00024 /* Derniere modif : Lavinia DARLEA, 27/07/06 */ 00025 /* ****************************************************************************/ 00026 00027 /* pas de code avant cette ligne*/ 00028 #ifndef __trait_donnes 00029 #define __trait_donnes 00030 00031 #include "image.h" 00032 #include "proto2D.h" 00033 #include "format_learning_set_from_imau1.h" 00034 00035 00036 00037 //the variable type responsible for the rules and the quadrangles from which they were extracted 00038 typedef struct { 00039 char *fisin; 00040 char *fisout1; 00041 char *fisout2; 00042 int nb_class; 00043 int nb_attr; 00044 int *nb_pts; 00045 double lefrght[2][2]; 00046 double updown[2][2]; 00047 double slopes[4]; 00048 double n[4]; 00049 double func_app1[2][3]; 00050 double func_app2[2][3]; 00051 } lgr_d; 00052 00053 //the chaining list that contains the points marked as belonging to the contour (not the convex hull!) 00054 typedef double pct; 00055 typedef struct elem_contour { 00056 pct x; 00057 pct y; 00058 struct elem_contour *next; 00059 struct elem_contour *ant; 00060 } elem_contour; 00061 00062 00063 param *traitement_donnees_lect(lgr_d *a, param *ptp, char *debq); 00064 int traitement_donnees_init(lgr_d a, learning_set *ls); 00065 int traitement_donnees_calc(learning_set ls, lgr_d a); 00066 00067 float minim(float a, float b); 00068 float dmin(learning_set ls, int pos_start, int pos_stop, int att); 00069 00070 00071 00072 /*pas de code apres cette ligne */ 00073 #endif