source: trunk/Clp/src/ClpDummyMatrix.cpp @ 2385

Last change on this file since 2385 was 2385, checked in by unxusr, 4 months ago

formatting

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 7.1 KB
Line 
1/* $Id: ClpDummyMatrix.cpp 2385 2019-01-06 19:43:06Z unxusr $ */
2// Copyright (C) 2003, International Business Machines
3// Corporation and others.  All Rights Reserved.
4// This code is licensed under the terms of the Eclipse Public License (EPL).
5
6#include <cstdio>
7
8#include "CoinPragma.hpp"
9
10#include "ClpSimplex.hpp"
11#include "ClpDummyMatrix.hpp"
12#include "ClpFactorization.hpp"
13#include "ClpMessage.hpp"
14
15//#############################################################################
16// Constructors / Destructor / Assignment
17//#############################################################################
18
19//-------------------------------------------------------------------
20// Default Constructor
21//-------------------------------------------------------------------
22ClpDummyMatrix::ClpDummyMatrix()
23  : ClpMatrixBase()
24{
25  setType(14);
26  numberRows_ = 0;
27  numberColumns_ = 0;
28  numberElements_ = 0;
29}
30
31/* Constructor from data */
32ClpDummyMatrix::ClpDummyMatrix(int numberColumns, int numberRows,
33  int numberElements)
34  : ClpMatrixBase()
35{
36  setType(14);
37  numberRows_ = numberRows;
38  numberColumns_ = numberColumns;
39  numberElements_ = numberElements;
40}
41//-------------------------------------------------------------------
42// Copy constructor
43//-------------------------------------------------------------------
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();
57}
58
59//-------------------------------------------------------------------
60// Destructor
61//-------------------------------------------------------------------
62ClpDummyMatrix::~ClpDummyMatrix()
63{
64}
65
66//----------------------------------------------------------------
67// Assignment operator
68//-------------------------------------------------------------------
69ClpDummyMatrix &
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;
79}
80//-------------------------------------------------------------------
81// Clone
82//-------------------------------------------------------------------
83ClpMatrixBase *ClpDummyMatrix::clone() const
84{
85  return new ClpDummyMatrix(*this);
86}
87
88/* Returns a new matrix in reverse order without gaps */
89ClpMatrixBase *
90ClpDummyMatrix::reverseOrderedCopy() const
91{
92  std::cerr << "reverseOrderedCopy not supported - ClpDummyMatrix" << std::endl;
93  abort();
94  return NULL;
95}
96//unscaled versions
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();
124}
125/* Return <code>x * A + y</code> in <code>z</code>.
126        Squashes small elements and knows about ClpSimplex */
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();
134}
135/* Return <code>x *A in <code>z</code> but
136   just for indices in y */
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();
144}
145/// returns number of elements in column part of basis,
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();
162}
163/* Unpacks a column into an CoinIndexedvector
164 */
165void ClpDummyMatrix::unpack(const ClpSimplex *, CoinIndexedVector *,
166  int) const
167{
168  std::cerr << "unpack not supported - ClpDummyMatrix" << std::endl;
169  abort();
170}
171/* Unpacks a column into an CoinIndexedvector
172** in packed foramt
173Note that model is NOT const.  Bounds and objective could
174be modified if doing column generation (just for this variable) */
175void ClpDummyMatrix::unpackPacked(ClpSimplex *,
176  CoinIndexedVector *,
177  int) const
178{
179  std::cerr << "unpackPacked not supported - ClpDummyMatrix" << std::endl;
180  abort();
181}
182/* Adds multiple of a column into an CoinIndexedvector
183      You can use quickAdd to add to vector */
184void ClpDummyMatrix::add(const ClpSimplex *, CoinIndexedVector *,
185  int, double) const
186{
187  std::cerr << "add not supported - ClpDummyMatrix" << std::endl;
188  abort();
189}
190/* Adds multiple of a column into an array */
191void ClpDummyMatrix::add(const ClpSimplex *, double *,
192  int, double) const
193{
194  std::cerr << "add not supported - ClpDummyMatrix" << std::endl;
195  abort();
196}
197
198// Return a complete CoinPackedMatrix
199CoinPackedMatrix *
200ClpDummyMatrix::getPackedMatrix() const
201{
202  std::cerr << "getPackedMatrix not supported - ClpDummyMatrix" << std::endl;
203  abort();
204  return NULL;
205}
206/* A vector containing the elements in the packed matrix. Note that there
207   might be gaps in this list, entries that do not belong to any
208   major-dimension vector. To get the actual elements one should look at
209   this vector together with vectorStarts and vectorLengths. */
210const double *
211ClpDummyMatrix::getElements() const
212{
213  std::cerr << "getElements not supported - ClpDummyMatrix" << std::endl;
214  abort();
215  return NULL;
216}
217
218const CoinBigIndex *
219ClpDummyMatrix::getVectorStarts() const
220{
221  std::cerr << "getVectorStarts not supported - ClpDummyMatrix" << std::endl;
222  abort();
223  return NULL;
224}
225/* The lengths of the major-dimension vectors. */
226const int *
227ClpDummyMatrix::getVectorLengths() const
228{
229  std::cerr << "get VectorLengths not supported - ClpDummyMatrix" << std::endl;
230  abort();
231  return NULL;
232}
233/* Delete the columns whose indices are listed in <code>indDel</code>. */
234void ClpDummyMatrix::deleteCols(const int, const int *)
235{
236  std::cerr << "deleteCols not supported - ClpDummyMatrix" << std::endl;
237  abort();
238}
239/* Delete the rows whose indices are listed in <code>indDel</code>. */
240void ClpDummyMatrix::deleteRows(const int, const int *)
241{
242  std::cerr << "deleteRows not supported - ClpDummyMatrix" << std::endl;
243  abort();
244}
245const int *
246ClpDummyMatrix::getIndices() const
247{
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 TracBrowser for help on using the repository browser.