00001 /*===========================================================================* 00002 * This file is part of the Bcps Linear Solver (BLIS). * 00003 * * 00004 * ALPS is distributed under the Eclipse Public License as part of the * 00005 * COIN-OR repository (http://www.coin-or.org). * 00006 * * 00007 * Authors: * 00008 * * 00009 * Yan Xu, Lehigh University * 00010 * Ted Ralphs, Lehigh University * 00011 * * 00012 * Conceptual Design: * 00013 * * 00014 * Yan Xu, Lehigh University * 00015 * Ted Ralphs, Lehigh University * 00016 * Laszlo Ladanyi, IBM T.J. Watson Research Center * 00017 * Matthew Saltzman, Clemson University * 00018 * * 00019 * * 00020 * Copyright (C) 2001-2013, Lehigh University, Yan Xu, and Ted Ralphs. * 00021 * All Rights Reserved. * 00022 *===========================================================================*/ 00023 00024 #ifndef BlisSolution_h_ 00025 #define BlisSolution_h_ 00026 00027 #include "Alps.h" 00028 #include "BcpsSolution.h" 00029 00030 //############################################################################# 00034 //############################################################################# 00035 00036 class BlisSolution : public BcpsSolution { 00037 00038 protected: 00039 00040 public: 00041 00043 BlisSolution() 00044 : 00045 BcpsSolution() 00046 {} 00047 00049 BlisSolution(int s, const double *values, double objValue) 00050 : 00051 BcpsSolution(s, values, objValue) 00052 {} 00053 00055 virtual ~BlisSolution() { } 00056 00059 // BlisIpSolution* testIntegrality(const double etol = 1e-5) const; 00060 00062 virtual AlpsEncoded* encode() const { 00063 AlpsEncoded* encoded = new AlpsEncoded(AlpsKnowledgeTypeSolution); 00064 encodeBcps(encoded); 00065 // Nothing to do for Blis part. 00066 return encoded; 00067 } 00068 00070 virtual AlpsKnowledge* decode(AlpsEncoded& encoded) const { 00071 BlisSolution * sol = new BlisSolution(); 00072 sol->decodeBcps(encoded); 00073 return sol; 00074 } 00075 00076 }; 00077 00078 //############################################################################# 00079 //############################################################################# 00080 00081 #endif