[Coin-discuss] const generateCuts(...)

JP Fasano jpfasano at us.ibm.com
Sun Jun 8 13:22:44 EDT 2003




>Anyone knows how to resolve this problem
>except for declaring an overloaded non-const generateCuts(...)?

You could declare the member data that you are changing to be "mutable".

JP Fasano
jpfasano at us.ibm.com
(914)945-1324  (tie line 862-1324)
COIN www.coin-or.org


|---------+------------------------------------------------>
|         |           Yan Xu <yax2 at lehigh.edu>             |
|         |           Sent by:                             |
|         |           coin-discuss-admin at www-124.southbury.|
|         |           usf.ibm.com                          |
|         |                                                |
|         |                                                |
|         |           06/07/2003 11:50 PM                  |
|         |           Please respond to coin-discuss       |
|         |                                                |
|---------+------------------------------------------------>
  >----------------------------------------------------------------------------------------------|
  |                                                                                              |
  |       To:       coin-discuss at www-124.southbury.usf.ibm.com                                   |
  |       cc:                                                                                    |
  |       Subject:  [Coin-discuss] const generateCuts(...)                                       |
  |                                                                                              |
  >----------------------------------------------------------------------------------------------|




Hi, I am trying to derive a cut generator and have a problem with
generateCuts(...). It is decared as a constant member function, like

CglCutGenerator::generateCuts(const OsiSolverInterface & si, OsiCuts &
cs) const

which means that generateCuts does not change the data of the class.
But, I do not see the reason why it can not modify the date of the class.

My generateCuts(...) does need the ability to change the data in the
class for certain reasons. Anyone knows how to resolve this problem
except for declaring an overloaded non-const generateCuts(...)? Thanks.

--
Yan Xu
PhD Student                                     | Tel:   610-758-4042
Department of Instrial and Systems Engineering  | Fax:   610-758-4886
Lehigh University                               | Email: yax2 at lehigh.edu



_______________________________________________
Coin-discuss mailing list
Coin-discuss at www-124.ibm.com
http://www-124.ibm.com/developerworks/oss/mailman/listinfo/coin-discuss






More information about the Coin-discuss mailing list