00001
00002
00003
00004 #include "CoinPragma.hpp"
00005
00006 #include <iostream>
00007
00008 #include "ClpMatrixBase.hpp"
00009 #include "ClpSimplex.hpp"
00010
00011
00012
00013
00014
00015
00016
00017
00018 ClpMatrixBase::ClpMatrixBase () :
00019 type_(-1)
00020 {
00021
00022 }
00023
00024
00025
00026
00027 ClpMatrixBase::ClpMatrixBase (const ClpMatrixBase & source) :
00028 type_(source.type_)
00029 {
00030
00031 }
00032
00033
00034
00035
00036 ClpMatrixBase::~ClpMatrixBase ()
00037 {
00038
00039 }
00040
00041
00042
00043
00044 ClpMatrixBase &
00045 ClpMatrixBase::operator=(const ClpMatrixBase& rhs)
00046 {
00047 if (this != &rhs) {
00048 type_ = rhs.type_;
00049 }
00050 return *this;
00051 }
00052
00053 void
00054 ClpMatrixBase::times(double scalar,
00055 const double * x, double * y,
00056 const double * rowScale,
00057 const double * columnScale) const
00058 {
00059 if (rowScale) {
00060 std::cerr<<"Scaling not supported - ClpMatrixBase"<<std::endl;
00061 abort();
00062 } else {
00063 times(scalar,x,y);
00064 }
00065 }
00066
00067 void
00068 ClpMatrixBase::transposeTimes(double scalar,
00069 const double * x, double * y,
00070 const double * rowScale,
00071 const double * columnScale) const
00072 {
00073 if (rowScale) {
00074 std::cerr<<"Scaling not supported - ClpMatrixBase"<<std::endl;
00075 abort();
00076 } else {
00077 transposeTimes(scalar,x,y);
00078 }
00079 }
00080
00081
00082
00083
00084 ClpMatrixBase *
00085 ClpMatrixBase::subsetClone (
00086 int numberRows, const int * whichRows,
00087 int numberColumns, const int * whichColumns) const
00088
00089
00090 {
00091 std::cerr<<"subsetClone not supported - ClpMatrixBase"<<std::endl;
00092 abort();
00093 return NULL;
00094 }
00095
00096
00097
00098
00099
00100 CoinBigIndex *
00101 ClpMatrixBase::dubiousWeights(const ClpSimplex * model,int * inputWeights) const
00102 {
00103 int number = model->numberRows()+model->numberColumns();
00104 CoinBigIndex * weights = new CoinBigIndex[number];
00105 int i;
00106 for (i=0;i<number;i++)
00107 weights[i]=1;
00108 return weights;
00109 }
00110
00111 void
00112 ClpMatrixBase::appendCols(int number, const CoinPackedVectorBase * const * columns)
00113 {
00114 std::cerr<<"appendCols not supported - ClpMatrixBase"<<std::endl;
00115 abort();
00116 }
00117
00118 void
00119 ClpMatrixBase::appendRows(int number, const CoinPackedVectorBase * const * rows)
00120 {
00121 std::cerr<<"appendRows not supported - ClpMatrixBase"<<std::endl;
00122 abort();
00123 }
00124
00125
00126
00127 void
00128 ClpMatrixBase::rangeOfElements(double & smallestNegative, double & largestNegative,
00129 double & smallestPositive, double & largestPositive)
00130 {
00131 smallestNegative=0.0;
00132 largestNegative=0.0;
00133 smallestPositive=0.0;
00134 largestPositive=0.0;
00135 }
00136
00137 bool
00138 ClpMatrixBase::canDoPartialPricing() const
00139 {
00140 return false;
00141 }
00142
00143 void
00144 ClpMatrixBase::partialPricing(ClpSimplex * model, int start, int end,
00145 int & bestSequence, int & numberWanted)
00146 {
00147 std::cerr<<"partialPricing not supported - ClpMatrixBase"<<std::endl;
00148 abort();
00149 }