Ignore:
Timestamp:
Jan 6, 2019 2:43:06 PM (4 months ago)
Author:
unxusr
Message:

formatting

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Clp/src/ClpDummyMatrix.cpp

    r2271 r2385  
    2020// Default Constructor
    2121//-------------------------------------------------------------------
    22 ClpDummyMatrix::ClpDummyMatrix ()
    23      : ClpMatrixBase()
    24 {
    25      setType(14);
    26      numberRows_ = 0;
    27      numberColumns_ = 0;
    28      numberElements_ = 0;
     22ClpDummyMatrix::ClpDummyMatrix()
     23  : ClpMatrixBase()
     24{
     25  setType(14);
     26  numberRows_ = 0;
     27  numberColumns_ = 0;
     28  numberElements_ = 0;
    2929}
    3030
    3131/* Constructor from data */
    3232ClpDummyMatrix::ClpDummyMatrix(int numberColumns, int numberRows,
    33                                int numberElements)
    34      : ClpMatrixBase()
    35 {
    36      setType(14);
    37      numberRows_ = numberRows;
    38      numberColumns_ = numberColumns;
    39      numberElements_ = numberElements;
     33  int numberElements)
     34  : ClpMatrixBase()
     35{
     36  setType(14);
     37  numberRows_ = numberRows;
     38  numberColumns_ = numberColumns;
     39  numberElements_ = numberElements;
    4040}
    4141//-------------------------------------------------------------------
    4242// Copy constructor
    4343//-------------------------------------------------------------------
    44 ClpDummyMatrix::ClpDummyMatrix (const ClpDummyMatrix & rhs)
    45      : ClpMatrixBase(rhs)
    46 {
    47      numberRows_ = rhs.numberRows_;
    48      numberColumns_ = rhs.numberColumns_;
    49      numberElements_ = rhs.numberElements_;
    50 }
    51 
    52 ClpDummyMatrix::ClpDummyMatrix (const CoinPackedMatrix & )
    53      : ClpMatrixBase()
    54 {
    55      std::cerr << "Constructor from CoinPackedMatrix nnot supported - ClpDummyMatrix" << std::endl;
    56      abort();
     44ClpDummyMatrix::ClpDummyMatrix(const ClpDummyMatrix &rhs)
     45  : ClpMatrixBase(rhs)
     46{
     47  numberRows_ = rhs.numberRows_;
     48  numberColumns_ = rhs.numberColumns_;
     49  numberElements_ = rhs.numberElements_;
     50}
     51
     52ClpDummyMatrix::ClpDummyMatrix(const CoinPackedMatrix &)
     53  : ClpMatrixBase()
     54{
     55  std::cerr << "Constructor from CoinPackedMatrix nnot supported - ClpDummyMatrix" << std::endl;
     56  abort();
    5757}
    5858
     
    6060// Destructor
    6161//-------------------------------------------------------------------
    62 ClpDummyMatrix::~ClpDummyMatrix ()
     62ClpDummyMatrix::~ClpDummyMatrix()
    6363{
    6464}
     
    6868//-------------------------------------------------------------------
    6969ClpDummyMatrix &
    70 ClpDummyMatrix::operator=(const ClpDummyMatrix& rhs)
    71 {
    72      if (this != &rhs) {
    73           ClpMatrixBase::operator=(rhs);
    74           numberRows_ = rhs.numberRows_;
    75           numberColumns_ = rhs.numberColumns_;
    76           numberElements_ = rhs.numberElements_;
    77      }
    78      return *this;
     70ClpDummyMatrix::operator=(const ClpDummyMatrix &rhs)
     71{
     72  if (this != &rhs) {
     73    ClpMatrixBase::operator=(rhs);
     74    numberRows_ = rhs.numberRows_;
     75    numberColumns_ = rhs.numberColumns_;
     76    numberElements_ = rhs.numberElements_;
     77  }
     78  return *this;
    7979}
    8080//-------------------------------------------------------------------
    8181// Clone
    8282//-------------------------------------------------------------------
    83 ClpMatrixBase * ClpDummyMatrix::clone() const
    84 {
    85      return new ClpDummyMatrix(*this);
     83ClpMatrixBase *ClpDummyMatrix::clone() const
     84{
     85  return new ClpDummyMatrix(*this);
    8686}
    8787
     
    9090ClpDummyMatrix::reverseOrderedCopy() const
    9191{
    92      std::cerr << "reverseOrderedCopy not supported - ClpDummyMatrix" << std::endl;
    93      abort();
    94      return NULL;
     92  std::cerr << "reverseOrderedCopy not supported - ClpDummyMatrix" << std::endl;
     93  abort();
     94  return NULL;
    9595}
    9696//unscaled versions
    97 void
    98 ClpDummyMatrix::times(double ,
    99                       const double * , double * ) const
    100 {
    101      std::cerr << "times not supported - ClpDummyMatrix" << std::endl;
    102      abort();
    103 }
    104 void
    105 ClpDummyMatrix::transposeTimes(double ,
    106                                const double * , double * ) const
    107 {
    108      std::cerr << "transposeTimes not supported - ClpDummyMatrix" << std::endl;
    109      abort();
    110 }
    111 void
    112 ClpDummyMatrix::times(double ,
    113                       const double * , double * ,
    114                       const double * ,
    115                       const double * ) const
    116 {
    117      std::cerr << "timesnot supported - ClpDummyMatrix" << std::endl;
    118      abort();
    119 }
    120 void
    121 ClpDummyMatrix::transposeTimes( double,
    122                                 const double * , double * ,
    123                                 const double * ,
    124                                 const double * ) const
    125 {
    126      std::cerr << "transposeTimesnot supported - ClpDummyMatrix" << std::endl;
    127      abort();
     97void ClpDummyMatrix::times(double,
     98  const double *, double *) const
     99{
     100  std::cerr << "times not supported - ClpDummyMatrix" << std::endl;
     101  abort();
     102}
     103void ClpDummyMatrix::transposeTimes(double,
     104  const double *, double *) const
     105{
     106  std::cerr << "transposeTimes not supported - ClpDummyMatrix" << std::endl;
     107  abort();
     108}
     109void ClpDummyMatrix::times(double,
     110  const double *, double *,
     111  const double *,
     112  const double *) const
     113{
     114  std::cerr << "timesnot supported - ClpDummyMatrix" << std::endl;
     115  abort();
     116}
     117void ClpDummyMatrix::transposeTimes(double,
     118  const double *, double *,
     119  const double *,
     120  const double *) const
     121{
     122  std::cerr << "transposeTimesnot supported - ClpDummyMatrix" << std::endl;
     123  abort();
    128124}
    129125/* Return <code>x * A + y</code> in <code>z</code>.
    130126        Squashes small elements and knows about ClpSimplex */
    131 void
    132 ClpDummyMatrix::transposeTimes(const ClpSimplex * , double ,
    133                                const CoinIndexedVector * ,
    134                                CoinIndexedVector * ,
    135                                CoinIndexedVector * ) const
    136 {
    137      std::cerr << "transposeTimes not supported - ClpDummyMatrix" << std::endl;
    138      abort();
     127void ClpDummyMatrix::transposeTimes(const ClpSimplex *, double,
     128  const CoinIndexedVector *,
     129  CoinIndexedVector *,
     130  CoinIndexedVector *) const
     131{
     132  std::cerr << "transposeTimes not supported - ClpDummyMatrix" << std::endl;
     133  abort();
    139134}
    140135/* Return <code>x *A in <code>z</code> but
    141136   just for indices in y */
    142 void
    143 ClpDummyMatrix::subsetTransposeTimes(const ClpSimplex * ,
    144                                      const CoinIndexedVector * ,
    145                                      const CoinIndexedVector * ,
    146                                      CoinIndexedVector * ) const
    147 {
    148      std::cerr << "subsetTransposeTimes not supported - ClpDummyMatrix" << std::endl;
    149      abort();
     137void ClpDummyMatrix::subsetTransposeTimes(const ClpSimplex *,
     138  const CoinIndexedVector *,
     139  const CoinIndexedVector *,
     140  CoinIndexedVector *) const
     141{
     142  std::cerr << "subsetTransposeTimes not supported - ClpDummyMatrix" << std::endl;
     143  abort();
    150144}
    151145/// returns number of elements in column part of basis,
    152 int
    153 ClpDummyMatrix::countBasis(const int * ,
    154                            int & )
    155 {
    156      std::cerr << "countBasis not supported - ClpDummyMatrix" << std::endl;
    157      abort();
    158      return 0;
    159 }
    160 void
    161 ClpDummyMatrix::fillBasis(ClpSimplex * ,
    162                           const int * ,
    163                           int & ,
    164                           int * , int * ,
    165                           int * , int * ,
    166                           CoinFactorizationDouble * )
    167 {
    168      std::cerr << "fillBasis not supported - ClpDummyMatrix" << std::endl;
    169      abort();
     146int ClpDummyMatrix::countBasis(const int *,
     147  int &)
     148{
     149  std::cerr << "countBasis not supported - ClpDummyMatrix" << std::endl;
     150  abort();
     151  return 0;
     152}
     153void ClpDummyMatrix::fillBasis(ClpSimplex *,
     154  const int *,
     155  int &,
     156  int *, int *,
     157  int *, int *,
     158  CoinFactorizationDouble *)
     159{
     160  std::cerr << "fillBasis not supported - ClpDummyMatrix" << std::endl;
     161  abort();
    170162}
    171163/* Unpacks a column into an CoinIndexedvector
    172164 */
    173 void
    174 ClpDummyMatrix::unpack(const ClpSimplex * , CoinIndexedVector * ,
    175                        int ) const
    176 {
    177      std::cerr << "unpack not supported - ClpDummyMatrix" << std::endl;
    178      abort();
     165void ClpDummyMatrix::unpack(const ClpSimplex *, CoinIndexedVector *,
     166  int) const
     167{
     168  std::cerr << "unpack not supported - ClpDummyMatrix" << std::endl;
     169  abort();
    179170}
    180171/* Unpacks a column into an CoinIndexedvector
     
    182173Note that model is NOT const.  Bounds and objective could
    183174be modified if doing column generation (just for this variable) */
    184 void
    185 ClpDummyMatrix::unpackPacked(ClpSimplex * ,
    186                              CoinIndexedVector * ,
    187                              int ) const
    188 {
    189      std::cerr << "unpackPacked not supported - ClpDummyMatrix" << std::endl;
    190      abort();
     175void ClpDummyMatrix::unpackPacked(ClpSimplex *,
     176  CoinIndexedVector *,
     177  int) const
     178{
     179  std::cerr << "unpackPacked not supported - ClpDummyMatrix" << std::endl;
     180  abort();
    191181}
    192182/* Adds multiple of a column into an CoinIndexedvector
    193183      You can use quickAdd to add to vector */
    194 void
    195 ClpDummyMatrix::add(const ClpSimplex * , CoinIndexedVector * ,
    196                     int , double ) const
    197 {
    198      std::cerr << "add not supported - ClpDummyMatrix" << std::endl;
    199      abort();
     184void ClpDummyMatrix::add(const ClpSimplex *, CoinIndexedVector *,
     185  int, double) const
     186{
     187  std::cerr << "add not supported - ClpDummyMatrix" << std::endl;
     188  abort();
    200189}
    201190/* Adds multiple of a column into an array */
    202 void
    203 ClpDummyMatrix::add(const ClpSimplex * , double * ,
    204                     int , double ) const
    205 {
    206      std::cerr << "add not supported - ClpDummyMatrix" << std::endl;
    207      abort();
     191void ClpDummyMatrix::add(const ClpSimplex *, double *,
     192  int, double) const
     193{
     194  std::cerr << "add not supported - ClpDummyMatrix" << std::endl;
     195  abort();
    208196}
    209197
     
    212200ClpDummyMatrix::getPackedMatrix() const
    213201{
    214      std::cerr << "getPackedMatrix not supported - ClpDummyMatrix" << std::endl;
    215      abort();
    216      return NULL;
     202  std::cerr << "getPackedMatrix not supported - ClpDummyMatrix" << std::endl;
     203  abort();
     204  return NULL;
    217205}
    218206/* A vector containing the elements in the packed matrix. Note that there
     
    223211ClpDummyMatrix::getElements() const
    224212{
    225      std::cerr << "getElements not supported - ClpDummyMatrix" << std::endl;
    226      abort();
    227      return NULL;
     213  std::cerr << "getElements not supported - ClpDummyMatrix" << std::endl;
     214  abort();
     215  return NULL;
    228216}
    229217
     
    231219ClpDummyMatrix::getVectorStarts() const
    232220{
    233      std::cerr << "getVectorStarts not supported - ClpDummyMatrix" << std::endl;
    234      abort();
    235      return NULL;
     221  std::cerr << "getVectorStarts not supported - ClpDummyMatrix" << std::endl;
     222  abort();
     223  return NULL;
    236224}
    237225/* The lengths of the major-dimension vectors. */
     
    239227ClpDummyMatrix::getVectorLengths() const
    240228{
    241      std::cerr << "get VectorLengths not supported - ClpDummyMatrix" << std::endl;
    242      abort();
    243      return NULL;
     229  std::cerr << "get VectorLengths not supported - ClpDummyMatrix" << std::endl;
     230  abort();
     231  return NULL;
    244232}
    245233/* Delete the columns whose indices are listed in <code>indDel</code>. */
    246 void ClpDummyMatrix::deleteCols(const int , const int * )
    247 {
    248      std::cerr << "deleteCols not supported - ClpDummyMatrix" << std::endl;
    249      abort();
     234void ClpDummyMatrix::deleteCols(const int, const int *)
     235{
     236  std::cerr << "deleteCols not supported - ClpDummyMatrix" << std::endl;
     237  abort();
    250238}
    251239/* Delete the rows whose indices are listed in <code>indDel</code>. */
    252 void ClpDummyMatrix::deleteRows(const int , const int * )
    253 {
    254      std::cerr << "deleteRows not supported - ClpDummyMatrix" << std::endl;
    255      abort();
     240void ClpDummyMatrix::deleteRows(const int, const int *)
     241{
     242  std::cerr << "deleteRows not supported - ClpDummyMatrix" << std::endl;
     243  abort();
    256244}
    257245const int *
    258246ClpDummyMatrix::getIndices() const
    259247{
    260      std::cerr << "getIndices not supported - ClpDummyMatrix" << std::endl;
    261      abort();
    262      return NULL;
    263 }
     248  std::cerr << "getIndices not supported - ClpDummyMatrix" << std::endl;
     249  abort();
     250  return NULL;
     251}
     252
     253/* vi: softtabstop=2 shiftwidth=2 expandtab tabstop=2
     254*/
Note: See TracChangeset for help on using the changeset viewer.