dbl_write_lp.h

Go to the documentation of this file.
00001 /****************************************************************************/
00002 /*                                                                          */
00003 /*  This file is part of QSopt_ex.                                          */
00004 /*                                                                          */
00005 /*  (c) Copyright 2006 by David Applegate, William Cook, Sanjeeb Dash,      */
00006 /*  and Daniel Espinoza                                                     */
00007 /*                                                                          */
00008 /*  Sanjeeb Dash ownership of copyright in QSopt_ex is derived from his     */
00009 /*  copyright in QSopt.                                                     */
00010 /*                                                                          */
00011 /*  This code may be used under the terms of the GNU General Public License */
00012 /*  (Version 2.1 or later) as published by the Free Software Foundation.    */
00013 /*                                                                          */
00014 /*  Alternatively, use is granted for research purposes only.               */
00015 /*                                                                          */
00016 /*  It is your choice of which of these two licenses you are operating      */
00017 /*  under.                                                                  */
00018 /*                                                                          */
00019 /*  We make no guarantees about the correctness or usefulness of this code. */
00020 /*                                                                          */
00021 /****************************************************************************/
00022 
00023 /*  RCS_INFO = "$RCSfile: wr_lp.h,v $ $Revision: 1.2 $ $Date: 2003/11/05 16:57:39 $"; */
00024 #ifndef dbl_WRITE_LP_STATE_H
00025 #define dbl_WRITE_LP_STATE_H
00026 
00027 /****************************************************************************/
00028 /*                                                                          */
00029 /*               Routines to support writing of LP files                    */
00030 /*                                                                          */
00031 /****************************************************************************/
00032 
00033 /* 
00034  * -) anything after '\' is comment 
00035  * -) variables consist of a-z A-Z 0-9!"#$%(),;.?@_`'{}|~ 
00036  *    don't start with a digit or '.'
00037  */
00038 #include "dbl_iqsutil.h"
00039 
00040 typedef struct dbl_ILLwrite_lp_state
00041 {
00042   char buf[ILL_namebufsize];
00043   char *p;
00044   int startlen;
00045   int total;
00046 }
00047 dbl_ILLwrite_lp_state;
00048 
00049 extern void dbl_ILLwrite_lp_state_init (
00050   dbl_ILLwrite_lp_state * line,
00051   const char *str);
00052 extern void dbl_ILLwrite_lp_state_append (
00053   dbl_ILLwrite_lp_state * line,
00054   const char *str);
00055 extern void dbl_ILLwrite_lp_state_append_coef (
00056   dbl_ILLwrite_lp_state * line,
00057   double v,
00058   int cnt);
00059 
00060       /* append number sign ('+', '-') iff cnt > 0 or v < 0.0  
00061        * append number iff v != 1.0, v != -1.0  
00062        */
00063 extern void dbl_ILLwrite_lp_state_append_number (
00064   dbl_ILLwrite_lp_state * line,
00065   double v);
00066 extern void dbl_ILLwrite_lp_state_save_start (
00067   dbl_ILLwrite_lp_state * line);
00068 extern void dbl_ILLwrite_lp_state_start (
00069   dbl_ILLwrite_lp_state * line);
00070 
00071 #endif

Generated on Thu Mar 29 09:32:29 2012 for QSopt_ex by  doxygen 1.4.7