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

- File List
- File Members

# /home/coin/svn-release/Blis-0.93.10/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 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  * All Rights Reserved.                                                      *
    00022  *===========================================================================*/
    00023
    00024 #ifndef BlisPseudo_h_
    00025 #define BlisPseudo_h_
    00026
    00027 #include "CoinError.hpp"
    00028
    00029 //#############################################################################
    00030
    00031 class BlisPseudocost
    00032 {
    00033  private:
    00035     double weight_;
    00036
    00038     int upCount_;
    00039
    00041     double upCost_;
    00042
    00044     int downCount_;
    00045
    00047     double downCost_;
    00048
    00053     double score_;
    00054
    00055  public:
    00057     BlisPseudocost() :
    00058         weight_(1.0),
    00059         upCount_(0),
    00060         upCost_(0.0),
    00061         downCount_(0),
    00062         downCost_(0.0),
    00063         score_(0.0)
    00064         {}
    00065
    00067     BlisPseudocost(double uc,
    00068                    int un,
    00069                    double dc,
    00070                    int dn,
    00071                    double s)
    00072         :
    00073         weight_(1.0),
    00074         upCount_(un),
    00075         upCost_(uc),
    00076         downCount_(dn),
    00077         downCost_(dc),
    00078         score_(s)
    00079         {}
    00080
    00082     void setWeight(double w) {
    00083         if (w < 0.0 || w > 1.0) {
    00084             throw CoinError("weight is not in range [0,1]", "setWeight",
    00085                             "BlisPseudo");
    00086         }
    00087         weight_= w;
    00088     }
    00089
    00091     void update(const int dir,
    00092                 const double parentObjValue,
    00093                 const double objValue,
    00094                 const double solValue);
    00095
    00097     void update(const int dir,
    00098                 const double objDiff,
    00099                 const double solValue);
    00100
    00102     int getUpCount() { return upCount_; }
    00103
    00105     double getUpCost() { return upCost_; }
    00106
    00108     int getDownCount() { return downCount_; }
    00109
    00111     double getDownCost() { return downCost_; }
    00112
    00114     double getScore() { return score_; }
    00115 };
    00116
    00117 #endif