AlpsNodeDesc.h
Go to the documentation of this file.
1 /*===========================================================================*
2  * This file is part of the Abstract Library for Parallel Search (ALPS). *
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  *===========================================================================*/
22 
23 #ifndef AlpsNodeDesc_h_
24 #define AlpsNodeDesc_h_
25 
26 //#include "AlpsModel.h"
27 
28 class AlpsModel;
29 
30 //#############################################################################
34 //#############################################################################
35 class AlpsNodeDesc {
36 
37  protected:
38 
40  // Should allow change model due to presolve
42 
43  public:
44 
47  { model_ = m; }
48 
49  virtual ~AlpsNodeDesc() {}
50 
51  inline AlpsModel* getModel() const { return model_; }
52  inline void setModel(AlpsModel* m) { model_ = m; }
53 
55  virtual AlpsReturnStatus encode(AlpsEncoded *encoded) const {
57  // Should never be called.
58  assert(0);
59  return status;
60  }
61 
63  virtual AlpsReturnStatus decode(AlpsEncoded &encoded) {
65  assert(0);
66  return status;
67  }
68 };
69 
70 #endif
void setModel(AlpsModel *m)
Definition: AlpsNodeDesc.h:52
AlpsReturnStatus
Definition: Alps.h:118
virtual AlpsReturnStatus decode(AlpsEncoded &encoded)
Unpack a node description from an encoded.
Definition: AlpsNodeDesc.h:63
virtual AlpsReturnStatus encode(AlpsEncoded *encoded) const
Pack node description into an encoded.
Definition: AlpsNodeDesc.h:55
This data structure is to contain the packed form of an encodable knowledge.
Definition: AlpsEncoded.h:25
virtual ~AlpsNodeDesc()
Definition: AlpsNodeDesc.h:49
AlpsModel * getModel() const
Definition: AlpsNodeDesc.h:51
AlpsNodeDesc(AlpsModel *m)
Definition: AlpsNodeDesc.h:46
AlpsModel * model_
A pointer to model.
Definition: AlpsNodeDesc.h:41
A class to refer to the description of a search tree node.
Definition: AlpsNodeDesc.h:35