Changeset 895 for branches/heur


Ignore:
Timestamp:
Mar 11, 2008 2:56:39 PM (11 years ago)
Author:
jpgoncal
Message:

Store branching object in CbcNOdeInfo.

Location:
branches/heur/Cbc/src
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/heur/Cbc/src/CbcNode.cpp

    r881 r895  
    5252  numberRows_(0),
    5353  numberBranchesLeft_(0),
    54   active_(7)
     54  active_(7),
     55  branch_(NULL)
    5556{
    5657#ifdef CHECK_NODE
     
    7778    numberRows_ = parent_->numberRows_+parent_->numberCuts_;
    7879    //parent_->increment();
     80#if 0
     81    branch_ = parent_->owner()->branchingObject()->clone();
     82#endif
    7983  }
    8084}
     
    9094  numberRows_(rhs.numberRows_),
    9195  numberBranchesLeft_(rhs.numberBranchesLeft_),
    92   active_(rhs.active_)
     96  active_(rhs.active_),
     97  branch_(rhs.branch_)
    9398{
    9499#ifdef CHECK_NODE
     
    128133  if (parent_) {
    129134    numberRows_ = parent_->numberRows_+parent_->numberCuts_;
     135#if 0
     136    branch_ = parent_->owner()->branchingObject()->clone();
     137#endif
    130138  }
    131139}
  • branches/heur/Cbc/src/CbcNode.hpp

    r854 r895  
    229229  inline void unmark()
    230230  { active_ &= ~8;}
     231
     232  /// Branching object for the parent
     233  inline const OsiBranchingObject * parentBranchingObject() const
     234  { return branch_;}
    231235protected:
    232236
     
    272276  */
    273277  int active_;
     278
     279  /// Copy of the branching object of the parent when the node is created
     280  OsiBranchingObject * branch_;
    274281     
    275282private:
     
    635642  inline void setBranchingObject(OsiBranchingObject * branchingObject)
    636643  { branch_ = branchingObject;}
    637   /// The node number
     644  /// The node number 
    638645  inline int nodeNumber() const
    639646  { return nodeNumber_;}
Note: See TracChangeset for help on using the changeset viewer.