00001 /*------------------------------------------------------------------------ 00002 *--------------------- RT-WMP -------------------- 00003 *------------------------------------------------------------------------ 00004 * V7.0B 11/05/10 00005 * 00006 * 00007 * File: ./src/core/include/lqm.h 00008 * Authors: Danilo Tardioli 00009 * ---------------------------------------------------------------------- 00010 * Copyright (C) 2000-2010, Universidad de Zaragoza, SPAIN 00011 * 00012 * Contact Addresses: Danilo Tardioli dantard@unizar.es 00013 * 00014 * RT-WMP is free software; you can redistribute it and/or modify it 00015 * under the terms of the GNU General Public License as published by the 00016 * Free Software Foundation; either version 2, or (at your option) any 00017 * later version. 00018 * 00019 * RT-WMP is distributed in the hope that it will be useful, but 00020 * WITHOUT ANY WARRANTY; without even the implied warranty of 00021 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00022 * General Public License for more details. 00023 * 00024 * You should have received a copy of the GNU General Public License 00025 * distributed with RT-WMP; see file COPYING. If not, write to the 00026 * Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA 00027 * 02111-1307, USA. 00028 * 00029 * As a special exception, if you link this unit with other files to 00030 * produce an executable, this unit does not by itself cause the 00031 * resulting executable to be covered by the GNU General Public License. 00032 * This exception does not however invalidate any other reasons why the 00033 * executable file might be covered by the GNU Public License. 00034 * 00035 *----------------------------------------------------------------------*/ 00036 00037 00038 00039 #ifndef LQM_H_ 00040 #define LQM_H_ 00041 #include "config/compiler.h" 00042 void init_lqm(int m_size); 00043 void free_lqm(void); 00044 void fill_lqm(char val); 00045 //char lqm_get_val(int i, int j); 00046 void lqm_set_val(int i, int j, char val); 00047 char **lqm_get_ptr(void); 00048 void lqm_calculate_distances(void); 00049 int lqm_get_num_hops(int i, int j); 00050 int lqm_is_leaf(char id); 00051 int lqm_get_distance(char i, char j); 00052 00053 void lqm_backup(void); 00054 void lqm_restore(void); 00055 char f_lqm(char val); 00056 char ** lqm_prune(char ** lqm); 00057 void lqm_copy_to(char ** src, char ** dest); 00058 00059 char (*lqm_get_f(void))(char); 00060 void lqm_set_f( char (*f) (char)); 00061 int lqm_prob_get_path(int src, int dest, char * path); 00062 void lqm_compute_prob(char ** lqm); 00063 int lqm_prob_get_path(int src, int dest, char * path); 00064 int lqm_prob_get_val(int src, int dest); 00065 #endif /*LQM_H_*/ 00066