/usr/src/RPM/BUILD/CoinAlps-1.4.4/Alps/src/AlpsSolution.h
Go to the documentation of this file.
00001 /*===========================================================================*
00002  * This file is part of the Abstract Library for Parallel Search (ALPS).     *
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  *===========================================================================*/
00022 
00023 #ifndef AlpsSolution_h_
00024 #define AlpsSolution_h_
00025 
00026 #include <iosfwd>
00027 #include <map>
00028 #include <vector>
00029 
00030 #include "AlpsKnowledge.h"
00031 #include "AlpsTreeNode.h" // to get AlpsNodeIndex_t
00032 
00033 //#############################################################################
00034 
00035 class AlpsSolution : public AlpsKnowledge { 
00036 
00037  private:
00039     AlpsSolution(const AlpsSolution&);
00040     AlpsSolution& operator=(const AlpsSolution&);
00041 
00043     int index_;
00044     
00046     int depth_;
00047 
00048  public:
00049     
00051     AlpsSolution() :
00052        index_(-1),
00053        depth_(-1)
00054     {
00055        setType(AlpsKnowledgeTypeSolution);
00056     }
00057 
00059     AlpsSolution(const AlpsNodeIndex_t i, const int d) :
00060        index_(i),
00061        depth_(d)
00062     {
00063        setType(AlpsKnowledgeTypeSolution);
00064     }
00065 
00067     virtual ~AlpsSolution() {}
00068 
00070     AlpsNodeIndex_t getIndex() { return index_; }
00071     
00073     void setIndex(const AlpsNodeIndex_t i) { index_ = i; }
00074     
00076     int getDepth() { return depth_; }
00077     
00079     void setDepth(const int d) { depth_ = d; }
00080     
00082     virtual void print(std::ostream& os) const{
00083         os << "WARNING: No solution print function is defined." << std::endl;
00084     }
00085 };
00086 
00087 #endif