Ignore:
Timestamp:
Feb 26, 2010 12:27:59 PM (9 years ago)
Author:
mjs
Message:

Formatted .cpp, .hpp, .c, .h files with "astyle -A4 -p". This matches the formatting used in the grand CBC reorganization.

File:
1 edited

Legend:

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

    r1502 r1525  
    1919
    2020public:
    21     /**@name Useful methods */
    22     //@{
    23     /// Return a complete CoinPackedMatrix
    24     virtual CoinPackedMatrix * getPackedMatrix() const;
    25     /** Whether the packed matrix is column major ordered or not. */
    26     virtual bool isColOrdered() const {
    27         return true;
    28     }
    29     /** Number of entries in the packed matrix. */
    30     virtual  CoinBigIndex getNumElements() const {
    31         return numberElements_;
    32     }
    33     /** Number of columns. */
    34     virtual int getNumCols() const {
    35         return numberColumns_;
    36     }
    37     /** Number of rows. */
    38     virtual int getNumRows() const {
    39         return numberRows_;
    40     }
     21     /**@name Useful methods */
     22     //@{
     23     /// Return a complete CoinPackedMatrix
     24     virtual CoinPackedMatrix * getPackedMatrix() const;
     25     /** Whether the packed matrix is column major ordered or not. */
     26     virtual bool isColOrdered() const {
     27          return true;
     28     }
     29     /** Number of entries in the packed matrix. */
     30     virtual  CoinBigIndex getNumElements() const {
     31          return numberElements_;
     32     }
     33     /** Number of columns. */
     34     virtual int getNumCols() const {
     35          return numberColumns_;
     36     }
     37     /** Number of rows. */
     38     virtual int getNumRows() const {
     39          return numberRows_;
     40     }
    4141
    42     /** A vector containing the elements in the packed matrix. Note that there
    43      might be gaps in this list, entries that do not belong to any
    44      major-dimension vector. To get the actual elements one should look at
    45      this vector together with vectorStarts and vectorLengths. */
    46     virtual const double * getElements() const;
    47     /** A vector containing the minor indices of the elements in the packed
    48          matrix. Note that there might be gaps in this list, entries that do not
    49          belong to any major-dimension vector. To get the actual elements one
    50          should look at this vector together with vectorStarts and
    51          vectorLengths. */
    52     virtual const int * getIndices() const;
     42     /** A vector containing the elements in the packed matrix. Note that there
     43      might be gaps in this list, entries that do not belong to any
     44      major-dimension vector. To get the actual elements one should look at
     45      this vector together with vectorStarts and vectorLengths. */
     46     virtual const double * getElements() const;
     47     /** A vector containing the minor indices of the elements in the packed
     48          matrix. Note that there might be gaps in this list, entries that do not
     49          belong to any major-dimension vector. To get the actual elements one
     50          should look at this vector together with vectorStarts and
     51          vectorLengths. */
     52     virtual const int * getIndices() const;
    5353
    54     virtual const CoinBigIndex * getVectorStarts() const;
    55     /** The lengths of the major-dimension vectors. */
    56     virtual const int * getVectorLengths() const;
     54     virtual const CoinBigIndex * getVectorStarts() const;
     55     /** The lengths of the major-dimension vectors. */
     56     virtual const int * getVectorLengths() const;
    5757
    58     /** Delete the columns whose indices are listed in <code>indDel</code>. */
    59     virtual void deleteCols(const int numDel, const int * indDel);
    60     /** Delete the rows whose indices are listed in <code>indDel</code>. */
    61     virtual void deleteRows(const int numDel, const int * indDel);
    62     /** Returns a new matrix in reverse order without gaps */
    63     virtual ClpMatrixBase * reverseOrderedCopy() const;
    64     /// Returns number of elements in column part of basis
    65     virtual CoinBigIndex countBasis(const int * whichColumn,
    66                                     int & numberColumnBasic);
    67     /// Fills in column part of basis
    68     virtual void fillBasis(ClpSimplex * model,
    69                            const int * whichColumn,
    70                            int & numberColumnBasic,
    71                            int * row, int * start,
    72                            int * rowCount, int * columnCount,
    73                            CoinFactorizationDouble * element);
    74     /** Unpacks a column into an CoinIndexedvector
    75      */
    76     virtual void unpack(const ClpSimplex * model, CoinIndexedVector * rowArray,
    77                         int column) const ;
    78     /** Unpacks a column into an CoinIndexedvector
    79      ** in packed foramt
    80         Note that model is NOT const.  Bounds and objective could
    81         be modified if doing column generation (just for this variable) */
    82     virtual void unpackPacked(ClpSimplex * model,
    83                               CoinIndexedVector * rowArray,
    84                               int column) const;
    85     /** Adds multiple of a column into an CoinIndexedvector
    86         You can use quickAdd to add to vector */
    87     virtual void add(const ClpSimplex * model, CoinIndexedVector * rowArray,
    88                      int column, double multiplier) const ;
    89     /** Adds multiple of a column into an array */
    90     virtual void add(const ClpSimplex * model, double * array,
    91                      int column, double multiplier) const;
    92     /// Allow any parts of a created CoinMatrix to be deleted
    93     /// Allow any parts of a created CoinPackedMatrix to be deleted
    94     virtual void releasePackedMatrix() const {}
    95     //@}
     58     /** Delete the columns whose indices are listed in <code>indDel</code>. */
     59     virtual void deleteCols(const int numDel, const int * indDel);
     60     /** Delete the rows whose indices are listed in <code>indDel</code>. */
     61     virtual void deleteRows(const int numDel, const int * indDel);
     62     /** Returns a new matrix in reverse order without gaps */
     63     virtual ClpMatrixBase * reverseOrderedCopy() const;
     64     /// Returns number of elements in column part of basis
     65     virtual CoinBigIndex countBasis(const int * whichColumn,
     66                                     int & numberColumnBasic);
     67     /// Fills in column part of basis
     68     virtual void fillBasis(ClpSimplex * model,
     69                            const int * whichColumn,
     70                            int & numberColumnBasic,
     71                            int * row, int * start,
     72                            int * rowCount, int * columnCount,
     73                            CoinFactorizationDouble * element);
     74     /** Unpacks a column into an CoinIndexedvector
     75      */
     76     virtual void unpack(const ClpSimplex * model, CoinIndexedVector * rowArray,
     77                         int column) const ;
     78     /** Unpacks a column into an CoinIndexedvector
     79      ** in packed foramt
     80         Note that model is NOT const.  Bounds and objective could
     81         be modified if doing column generation (just for this variable) */
     82     virtual void unpackPacked(ClpSimplex * model,
     83                               CoinIndexedVector * rowArray,
     84                               int column) const;
     85     /** Adds multiple of a column into an CoinIndexedvector
     86         You can use quickAdd to add to vector */
     87     virtual void add(const ClpSimplex * model, CoinIndexedVector * rowArray,
     88                      int column, double multiplier) const ;
     89     /** Adds multiple of a column into an array */
     90     virtual void add(const ClpSimplex * model, double * array,
     91                      int column, double multiplier) const;
     92     /// Allow any parts of a created CoinMatrix to be deleted
     93     /// Allow any parts of a created CoinPackedMatrix to be deleted
     94     virtual void releasePackedMatrix() const {}
     95     //@}
    9696
    97     /**@name Matrix times vector methods */
    98     //@{
    99     /** Return <code>y + A * scalar *x</code> in <code>y</code>.
    100         @pre <code>x</code> must be of size <code>numColumns()</code>
    101         @pre <code>y</code> must be of size <code>numRows()</code> */
    102     virtual void times(double scalar,
    103                        const double * x, double * y) const;
    104     /// And for scaling
    105     virtual void times(double scalar,
    106                        const double * x, double * y,
    107                        const double * rowScale,
    108                        const double * columnScale) const;
    109     /** Return <code>y + x * scalar * A</code> in <code>y</code>.
    110         @pre <code>x</code> must be of size <code>numRows()</code>
    111         @pre <code>y</code> must be of size <code>numColumns()</code> */
    112     virtual void transposeTimes(double scalar,
    113                                 const double * x, double * y) const;
    114     /// And for scaling
    115     virtual void transposeTimes(double scalar,
    116                                 const double * x, double * y,
    117                                 const double * rowScale,
    118                                 const double * columnScale) const;
     97     /**@name Matrix times vector methods */
     98     //@{
     99     /** Return <code>y + A * scalar *x</code> in <code>y</code>.
     100         @pre <code>x</code> must be of size <code>numColumns()</code>
     101         @pre <code>y</code> must be of size <code>numRows()</code> */
     102     virtual void times(double scalar,
     103                        const double * x, double * y) const;
     104     /// And for scaling
     105     virtual void times(double scalar,
     106                        const double * x, double * y,
     107                        const double * rowScale,
     108                        const double * columnScale) const;
     109     /** Return <code>y + x * scalar * A</code> in <code>y</code>.
     110         @pre <code>x</code> must be of size <code>numRows()</code>
     111         @pre <code>y</code> must be of size <code>numColumns()</code> */
     112     virtual void transposeTimes(double scalar,
     113                                 const double * x, double * y) const;
     114     /// And for scaling
     115     virtual void transposeTimes(double scalar,
     116                                 const double * x, double * y,
     117                                 const double * rowScale,
     118                                 const double * columnScale) const;
    119119
    120     using ClpMatrixBase::transposeTimes ;
    121     /** Return <code>x * scalar * A + y</code> in <code>z</code>.
    122     Can use y as temporary array (will be empty at end)
    123     Note - If x packed mode - then z packed mode */
    124     virtual void transposeTimes(const ClpSimplex * model, double scalar,
    125                                 const CoinIndexedVector * x,
    126                                 CoinIndexedVector * y,
    127                                 CoinIndexedVector * z) const;
    128     /** Return <code>x *A</code> in <code>z</code> but
    129     just for indices in y.
    130     Note - If x packed mode - then z packed mode
    131     Squashes small elements and knows about ClpSimplex */
    132     virtual void subsetTransposeTimes(const ClpSimplex * model,
    133                                       const CoinIndexedVector * x,
    134                                       const CoinIndexedVector * y,
    135                                       CoinIndexedVector * z) const;
    136     //@}
     120     using ClpMatrixBase::transposeTimes ;
     121     /** Return <code>x * scalar * A + y</code> in <code>z</code>.
     122     Can use y as temporary array (will be empty at end)
     123     Note - If x packed mode - then z packed mode */
     124     virtual void transposeTimes(const ClpSimplex * model, double scalar,
     125                                 const CoinIndexedVector * x,
     126                                 CoinIndexedVector * y,
     127                                 CoinIndexedVector * z) const;
     128     /** Return <code>x *A</code> in <code>z</code> but
     129     just for indices in y.
     130     Note - If x packed mode - then z packed mode
     131     Squashes small elements and knows about ClpSimplex */
     132     virtual void subsetTransposeTimes(const ClpSimplex * model,
     133                                       const CoinIndexedVector * x,
     134                                       const CoinIndexedVector * y,
     135                                       CoinIndexedVector * z) const;
     136     //@}
    137137
    138     /**@name Other */
    139     //@{
    140     //@}
     138     /**@name Other */
     139     //@{
     140     //@}
    141141
    142142
    143     /**@name Constructors, destructor */
    144     //@{
    145     /** Default constructor. */
    146     ClpDummyMatrix();
    147     /// Constructor with data
    148     ClpDummyMatrix(int numberColumns, int numberRows,
    149                    int numberElements);
    150     /** Destructor */
    151     virtual ~ClpDummyMatrix();
    152     //@}
     143     /**@name Constructors, destructor */
     144     //@{
     145     /** Default constructor. */
     146     ClpDummyMatrix();
     147     /// Constructor with data
     148     ClpDummyMatrix(int numberColumns, int numberRows,
     149                    int numberElements);
     150     /** Destructor */
     151     virtual ~ClpDummyMatrix();
     152     //@}
    153153
    154     /**@name Copy method */
    155     //@{
    156     /** The copy constructor. */
    157     ClpDummyMatrix(const ClpDummyMatrix&);
    158     /** The copy constructor from an CoinDummyMatrix. */
    159     ClpDummyMatrix(const CoinPackedMatrix&);
     154     /**@name Copy method */
     155     //@{
     156     /** The copy constructor. */
     157     ClpDummyMatrix(const ClpDummyMatrix&);
     158     /** The copy constructor from an CoinDummyMatrix. */
     159     ClpDummyMatrix(const CoinPackedMatrix&);
    160160
    161     ClpDummyMatrix& operator=(const ClpDummyMatrix&);
    162     /// Clone
    163     virtual ClpMatrixBase * clone() const ;
    164     //@}
     161     ClpDummyMatrix& operator=(const ClpDummyMatrix&);
     162     /// Clone
     163     virtual ClpMatrixBase * clone() const ;
     164     //@}
    165165
    166166
    167167protected:
    168     /**@name Data members
    169        The data members are protected to allow access for derived classes. */
    170     //@{
    171     /// Number of rows
    172     int numberRows_;
    173     /// Number of columns
    174     int numberColumns_;
    175     /// Number of elements
    176     int numberElements_;
     168     /**@name Data members
     169        The data members are protected to allow access for derived classes. */
     170     //@{
     171     /// Number of rows
     172     int numberRows_;
     173     /// Number of columns
     174     int numberColumns_;
     175     /// Number of elements
     176     int numberElements_;
    177177
    178     //@}
     178     //@}
    179179};
    180180
Note: See TracChangeset for help on using the changeset viewer.