Toggle navigation
SCIP Optimization Suite
SCIP
SoPlex
ZIMPL
UG
GCG
Documentation
SoPlex 6.0.3
SoPlex 5.0.2
SoPlex 4.0.2
SoPlex 3.1.0
SoPlex 3.0.1
SoPlex 2.2.1
SoPlex
Sequential object-oriented simPlex
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Groups
Pages
soplex-repo
src
spxfileio.cpp
Go to the documentation of this file.
1
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
2
/* */
3
/* This file is part of the class library */
4
/* SoPlex --- the Sequential object-oriented simPlex. */
5
/* */
6
/* Copyright (C) 1996-2015 Konrad-Zuse-Zentrum */
7
/* fuer Informationstechnik Berlin */
8
/* */
9
/* SoPlex is distributed under the terms of the ZIB Academic Licence. */
10
/* */
11
/* You should have received a copy of the ZIB Academic License */
12
/* along with SoPlex; see the file COPYING. If not email to soplex@zib.de. */
13
/* */
14
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
15
16
#include <assert.h>
17
18
#include "
spxdefines.h
"
19
#include "
spxsolver.h
"
20
#include "
spxfileio.h
"
21
22
namespace
soplex
23
{
24
bool
SPxSolver::readBasisFile
(
25
const
char
* filename,
26
const
NameSet
* rowNames,
27
const
NameSet
* colNames)
28
{
29
30
spxifstream
file(filename);
31
32
if
(!file)
33
return
false
;
34
35
return
readBasis
(file, rowNames, colNames);
36
}
37
38
bool
SPxSolver::writeBasisFile
39
(
const
char
* filename,
40
const
NameSet
* rowNames,
41
const
NameSet
* colNames,
42
const
bool
cpxFormat )
const
43
{
44
std::ofstream file(filename);
45
46
if
(!file)
47
return
false
;
48
49
writeBasis(file, rowNames, colNames);
50
51
return
true
;
52
}
53
54
}
// namespace soplex