00001 /* MTgomory "multi tableau gomory cut" provides an implementation for gomory 00002 * cuts derived from multiple tableau rows in the spirit of the work of 00003 * Andersen et al (IPCO 2007), Cornuejols (es presented in George Nemhauser 00004 * Birthday Conference in Atlanta 2007) and Gomory (presented in the same 00005 * conference). 00006 * 00007 * Copyright (C) 2007 Daniel Espinoza. 00008 * 00009 * This library is free software; you can redistribute it and/or modify it 00010 * under the terms of the GNU Lesser General Public License as published by the 00011 * Free Software Foundation; either version 2.1 of the License, or (at your 00012 * option) any later version. 00013 * 00014 * This library is distributed in the hope that it will be useful, but 00015 * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY 00016 * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public 00017 * License for more details. 00018 * 00019 * You should have received a copy of the GNU Lesser General Public License 00020 * along with this library; if not, write to the Free Software Foundation, 00021 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 00022 * */ 00023 /* ========================================================================= */ 00024 /** @file 00025 * @ingroup MTgomory */ 00026 /** @addtogroup MTgomory */ 00027 /** @{ */ 00028 #ifndef __MT_TABLEAU_H__ 00029 #define __MT_TABLEAU_H__ 00030 #include <strings.h> 00031 #include <stdio.h> 00032 /* ========================================================================= */ 00033 /** @brief write a tableau in row format into a file (see #MTgomoryCut for 00034 * details on the tableau information). 00035 * @param out file where to write the tableau 00036 * @param nrows number of rows in the tableau description 00037 * @param ncols number of variables in the tableau description 00038 * @param rowval array of values of the tableau. 00039 * @param rowind array of column-indices for the corresponding value in rowval. 00040 * @param rowbeg array of length nrows+1 storing the position in which position 00041 * of rowval the j-th row non-zero coefficient beggins, and in position 00042 * nrows it is stored the number of non-zeros in the description. 00043 * @param f fractional value asociated to the tableau. 00044 * */ 00045 int MTwriteRTableau(FILE*out, 00046 const int nrows, 00047 const int ncols, 00048 const double*const rowval, 00049 const int*const rowind, 00050 const int*const rowbeg, 00051 const double*const f); 00052 00053 /* ========================================================================= */ 00054 /** @brief read a tableau in row format from a file (see #MTgomoryCut for 00055 * details on the tableau information). 00056 * @param input file where to write the tableau 00057 * @param nrows number of rows in the tableau description 00058 * @param ncols number of variables in the tableau description 00059 * @param rowval array of values of the tableau. 00060 * @param rowind array of column-indices for the corresponding value in rowval. 00061 * @param rowbeg array of length nrows+1 storing the position in which position 00062 * of rowval the j-th row non-zero coefficient beggins, and in position 00063 * nrows it is stored the number of non-zeros in the description. 00064 * @param f fractional value asociated to the tableau. 00065 * @note We assume that the pointers given contain no meaningfull data 00066 * */ 00067 int MTreadRTableau(FILE*input, 00068 int*const nrows, 00069 int*const ncols, 00070 double**const rowval, 00071 int**const rowind, 00072 int**const rowbeg, 00073 double**const f); 00074 00075 00076 /* ========================================================================= */ 00077 /** @} */ 00078 /* end of mt_tableau.h */ 00079 #endif