lemon/glpk.h
changeset 1065 490d89913a17
parent 877 141f9c0db4a3
child 1076 97d978243703
     1.1 --- a/lemon/glpk.h	Thu Feb 28 23:45:39 2013 +0100
     1.2 +++ b/lemon/glpk.h	Mon Jul 15 08:33:08 2013 +0200
     1.3 @@ -115,6 +115,8 @@
     1.4  
     1.5      virtual void _messageLevel(MessageLevel level);
     1.6  
     1.7 +    virtual void _write(std::string file, std::string format) const;
     1.8 +
     1.9    private:
    1.10  
    1.11      static void freeEnv();
    1.12 @@ -144,6 +146,19 @@
    1.13      ///Returns the variable identifier understood by GLPK.
    1.14      int lpxCol(Col c) const { return cols(id(c)); }
    1.15  
    1.16 +#ifdef DOXYGEN
    1.17 +    /// Write the problem or the solution to a file in the given format
    1.18 +    
    1.19 +    /// This function writes the problem or the solution
    1.20 +    /// to a file in the given format.
    1.21 +    /// Trying to write in an unsupported format will trigger
    1.22 +    /// \ref UnsupportedFormatError.
    1.23 +    /// \param file The file path
    1.24 +    /// \param format The output file format.
    1.25 +    /// Supportted formats are "MPS" and "LP".
    1.26 +    void write(std::string file, std::string format = "MPS") const {}
    1.27 +#endif
    1.28 +
    1.29    };
    1.30  
    1.31    /// \brief Interface for the GLPK LP solver