- Main Page
- Modules
- Namespaces
- Classes
- Files
- Related Pages

- File List
- File Members

# /home/coin/SVN-release/Bcps-0.91.0/Bcps/examples/Blis/BlisPseudo.h

Go to the documentation of this file.

    00001 /*===========================================================================*
    00002  * This file is part of the Bcps Linear Solver (BLIS).                       *
    00003  *                                                                           *
    00004  * BLIS is distributed under the Common 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-2005, International Business Machines                  *
    00021  * Corporation, Lehigh University, Yan Xu, Ted Ralphs, Matthew Salzman and   *
    00022  * others. All Rights Reserved.                                              *
    00023  *===========================================================================*/
    00024
    00025 #ifndef BlisPseudo_h_
    00026 #define BlisPseudo_h_
    00027
    00028 #include "CoinError.hpp"
    00029
    00030 //#############################################################################
    00031
    00032 class BlisPseudocost
    00033 {
    00034  private:
    00036     double weight_;
    00037
    00039     int upCount_;
    00040
    00042     double upCost_;
    00043
    00045     int downCount_;
    00046
    00048     double downCost_;
    00049
    00054     double score_;
    00055
    00056  public:
    00058     BlisPseudocost() :
    00059         weight_(1.0),
    00060         upCount_(0),
    00061         upCost_(0.0),
    00062         downCount_(0),
    00063         downCost_(0.0),
    00064         score_(0.0)
    00065         {}
    00066
    00068     BlisPseudocost(double uc,
    00069                    int un,
    00070                    double dc,
    00071                    int dn,
    00072                    double s)
    00073         :
    00074         weight_(1.0),
    00075         upCount_(un),
    00076         upCost_(uc),
    00077         downCount_(dn),
    00078         downCost_(dc),
    00079         score_(s)
    00080         {}
    00081
    00083     void setWeight(double w) {
    00084         if (w < 0.0 || w > 1.0) {
    00085             throw CoinError("weight is not in range [0,1]", "setWeight",
    00086                             "BlisPseudo");
    00087         }
    00088         weight_= w;
    00089     }
    00090
    00092     void update(const int dir,
    00093                 const double parentObjValue,
    00094                 const double objValue,
    00095                 const double solValue);
    00096
    00098     void update(const int dir,
    00099                 const double objDiff,
    00100                 const double solValue);
    00101
    00103     int getUpCount() { return upCount_; }
    00104
    00106     double getUpCost() { return upCost_; }
    00107
    00109     int getDownCount() { return downCount_; }
    00110
    00112     double getDownCost() { return downCost_; }
    00113
    00115     double getScore() { return score_; }
    00116 };
    00117
    00118 #endif