BlisSolution.h
Go to the documentation of this file.
1 /*===========================================================================*
2  * This file is part of the Bcps Linear Solver (BLIS). *
3  * *
4  * ALPS is distributed under the Eclipse Public License as part of the *
5  * COIN-OR repository (http://www.coin-or.org). *
6  * *
7  * Authors: *
8  * *
9  * Yan Xu, Lehigh University *
10  * Ted Ralphs, Lehigh University *
11  * *
12  * Conceptual Design: *
13  * *
14  * Yan Xu, Lehigh University *
15  * Ted Ralphs, Lehigh University *
16  * Laszlo Ladanyi, IBM T.J. Watson Research Center *
17  * Matthew Saltzman, Clemson University *
18  * *
19  * *
20  * Copyright (C) 2001-2013, Lehigh University, Yan Xu, and Ted Ralphs. *
21  * All Rights Reserved. *
22  *===========================================================================*/
23 
24 #ifndef BlisSolution_h_
25 #define BlisSolution_h_
26 
27 #include "Alps.h"
28 #include "BcpsSolution.h"
29 
30 //#############################################################################
34 //#############################################################################
35 
36 class BlisSolution : public BcpsSolution {
37 
38  protected:
39 
40  public:
41 
44  :
45  BcpsSolution()
46  {}
47 
49  BlisSolution(int s, const double *values, double objValue)
50  :
51  BcpsSolution(s, values, objValue)
52  {}
53 
55  virtual ~BlisSolution() { }
56 
59  // BlisIpSolution* testIntegrality(const double etol = 1e-5) const;
60 
62  virtual AlpsEncoded* encode() const {
64  encodeBcps(encoded);
65  // Nothing to do for Blis part.
66  return encoded;
67  }
68 
70  virtual AlpsKnowledge* decode(AlpsEncoded& encoded) const {
71  BlisSolution * sol = new BlisSolution();
72  sol->decodeBcps(encoded);
73  return sol;
74  }
75 
76 };
77 
78 //#############################################################################
79 //#############################################################################
80 
81 #endif
virtual AlpsKnowledge * decode(AlpsEncoded &encoded) const
The method that decodes the solution from a encoded object.
Definition: BlisSolution.h:70
AlpsReturnStatus decodeBcps(AlpsEncoded &encoded)
Unpack Bcps part of solution from an encoded objects.
This class holds the solution objects.
Definition: BcpsSolution.h:34
This data structure is to contain the packed form of an encodable knowledge.
Definition: AlpsEncoded.h:25
virtual ~BlisSolution()
Destructor.
Definition: BlisSolution.h:55
virtual AlpsEncoded * encode() const
Check if IP feasible.
Definition: BlisSolution.h:62
AlpsReturnStatus encodeBcps(AlpsEncoded *encoded) const
Pack Bcps part of solution into an encoded objects.
This class contains the solutions generated by the LP solver (either primal or dual.
Definition: BlisSolution.h:36
The abstract base class of any user-defined class that Alps has to know about in order to encode/deco...
Definition: AlpsKnowledge.h:51
BlisSolution(int s, const double *values, double objValue)
Useful constructor.
Definition: BlisSolution.h:49
BlisSolution()
Default constructor.
Definition: BlisSolution.h:43