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 00021 /*pas de code avant cette ligne*/ 00022 #ifndef __choquet 00023 #define __choquet 00024 00025 #include <stdio.h> 00026 #include <string.h> 00027 #include <stdlib.h> 00028 #include "image.h" /* types des donnees manipulees dans ima2D */ 00029 #include "proto2D.h" /* descripteurs et prototypes des fonctions de ima2D */ 00030 00031 00032 00033 00034 /* constantes */ 00035 #define TAILLE_NOM_FICHIER 20 00036 #define AUCUNE_ERREUR 0 00037 #define ERREUR_CHOQUET_FILE 1 00038 #define ERREUR_CHOQUET_LIGNE_MATRICE 2 00039 #define ERREUR_CHOQUET_COLONNE_MATRICE 3 00040 #define ERREUR_CHOQUET_NU 4 00041 #define ERREUR_CHOQUET_INTERACTION 5 00042 00043 00044 /* definition des types */ 00045 typedef float *parametre; 00046 00051 typedef struct { 00052 char fichier[TAILLE_NOM_FICHIER]; 00053 int nbcoeff; 00054 int erreur; 00055 parametre *ptparam; 00056 }choquet_interaction_t; 00057 00058 00059 /* declaration des fonctions : prototypes */ 00060 00061 /*lecture du nom du fichier contenant les parametres*/ 00062 param *choquet_interaction_lect(choquet_interaction_t *desc, param *ptp, char *debq); 00063 00064 /*initialisation des valeurs des parametres*/ 00065 int choquet_interaction_init(choquet_interaction_t *choquet_interaction_desc); 00066 00067 /*calcul de la valeur de l integrale de Choquet pour une serie de valeurs donnee*/ 00068 int choquet_interaction_calc(choquet_interaction_t *choquet_interaction_desc,float *donnee,float *resultat); 00069 00070 /* liberation de l'espace memoire */ 00071 int choquet_interaction_ferm(choquet_interaction_t *desc4); 00072 00073 00074 /*pas de code apres cette ligne*/ 00075 #endif