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/ClpNetworkBasis.hpp

    r2271 r2385  
    2323 */
    2424
    25 
    2625class ClpNetworkBasis {
    2726
    2827public:
     28  /**@name Constructors and destructor and copy */
     29  //@{
     30  /// Default constructor
     31  ClpNetworkBasis();
     32  /// Constructor from CoinFactorization
     33  ClpNetworkBasis(const ClpSimplex *model,
     34    int numberRows, const CoinFactorizationDouble *pivotRegion,
     35    const int *permuteBack, const int *startColumn,
     36    const int *numberInColumn,
     37    const int *indexRow, const CoinFactorizationDouble *element);
     38  /// Copy constructor
     39  ClpNetworkBasis(const ClpNetworkBasis &other);
    2940
    30      /**@name Constructors and destructor and copy */
    31      //@{
    32      /// Default constructor
    33      ClpNetworkBasis (  );
    34      /// Constructor from CoinFactorization
    35      ClpNetworkBasis(const ClpSimplex * model,
    36                      int numberRows, const CoinFactorizationDouble * pivotRegion,
    37                      const int * permuteBack, const int * startColumn,
    38                      const int * numberInColumn,
    39                      const int * indexRow, const CoinFactorizationDouble * element);
    40      /// Copy constructor
    41      ClpNetworkBasis ( const ClpNetworkBasis &other);
     41  /// Destructor
     42  ~ClpNetworkBasis();
     43  /// = copy
     44  ClpNetworkBasis &operator=(const ClpNetworkBasis &other);
     45  //@}
    4246
    43      /// Destructor
    44      ~ClpNetworkBasis (  );
    45      /// = copy
    46      ClpNetworkBasis & operator = ( const ClpNetworkBasis & other );
    47      //@}
    48 
    49      /**@name Do factorization */
    50      //@{
    51      /** When part of LP - given by basic variables.
     47  /**@name Do factorization */
     48  //@{
     49  /** When part of LP - given by basic variables.
    5250     Actually does factorization.
    5351     Arrays passed in have non negative value to say basic.
     
    5755     and ones thrown out have -1
    5856     returns 0 -okay, -1 singular, -2 too many in basis */
    59      int factorize ( const ClpMatrixBase * matrix,
    60                      int rowIsBasic[], int columnIsBasic[]);
    61      //@}
     57  int factorize(const ClpMatrixBase *matrix,
     58    int rowIsBasic[], int columnIsBasic[]);
     59  //@}
    6260
    63      /**@name rank one updates which do exist */
    64      //@{
     61  /**@name rank one updates which do exist */
     62  //@{
    6563
    66      /** Replaces one Column to basis,
     64  /** Replaces one Column to basis,
    6765      returns 0=OK, 1=Probably OK, 2=singular!!
    6866     */
    69      int replaceColumn ( CoinIndexedVector * column,
    70                          int pivotRow);
    71      //@}
     67  int replaceColumn(CoinIndexedVector *column,
     68    int pivotRow);
     69  //@}
    7270
    73      /**@name various uses of factorization (return code number elements)
     71  /**@name various uses of factorization (return code number elements)
    7472      which user may want to know about */
    75      //@{
    76      /** Updates one column (FTRAN) from region,
     73  //@{
     74  /** Updates one column (FTRAN) from region,
    7775         Returns pivot value if "pivotRow" >=0
    7876     */
    79      double updateColumn ( CoinIndexedVector * regionSparse,
    80                            CoinIndexedVector * regionSparse2,
    81                            int pivotRow);
    82      /** Updates one column (FTRAN) to/from array
     77  double updateColumn(CoinIndexedVector *regionSparse,
     78    CoinIndexedVector *regionSparse2,
     79    int pivotRow);
     80  /** Updates one column (FTRAN) to/from array
    8381         ** For large problems you should ALWAYS know where the nonzeros
    8482         are, so please try and migrate to previous method after you
    8583         have got code working using this simple method - thank you!
    8684         (the only exception is if you know input is dense e.g. rhs) */
    87      int updateColumn (  CoinIndexedVector * regionSparse,
    88                          double array[] ) const;
    89      /** Updates one column transpose (BTRAN)
     85  int updateColumn(CoinIndexedVector *regionSparse,
     86    double array[]) const;
     87  /** Updates one column transpose (BTRAN)
    9088         ** For large problems you should ALWAYS know where the nonzeros
    9189         are, so please try and migrate to previous method after you
     
    9391         (the only exception is if you know input is dense e.g. dense objective)
    9492         returns number of nonzeros */
    95      int updateColumnTranspose (  CoinIndexedVector * regionSparse,
    96                                   double array[] ) const;
    97      /** Updates one column (BTRAN) from region2 */
    98      int updateColumnTranspose (  CoinIndexedVector * regionSparse,
    99                                   CoinIndexedVector * regionSparse2) const;
    100      //@}
    101 ////////////////// data //////////////////
     93  int updateColumnTranspose(CoinIndexedVector *regionSparse,
     94    double array[]) const;
     95  /** Updates one column (BTRAN) from region2 */
     96  int updateColumnTranspose(CoinIndexedVector *regionSparse,
     97    CoinIndexedVector *regionSparse2) const;
     98  //@}
     99  ////////////////// data //////////////////
    102100private:
    103 
    104      // checks looks okay
    105      void check();
    106      // prints data
    107      void print();
    108      /**@name data */
    109      //@{
     101  // checks looks okay
     102  void check();
     103  // prints data
     104  void print();
     105  /**@name data */
     106  //@{
    110107#ifndef COIN_FAST_CODE
    111      /// Whether slack value is  +1 or -1
    112      double slackValue_;
     108  /// Whether slack value is  +1 or -1
     109  double slackValue_;
    113110#endif
    114      /// Number of Rows in factorization
    115      int numberRows_;
    116      /// Number of Columns in factorization
    117      int numberColumns_;
    118      /// model
    119      const ClpSimplex * model_;
    120      /// Parent for each column
    121      int * parent_;
    122      /// Descendant
    123      int * descendant_;
    124      /// Pivot row
    125      int * pivot_;
    126      /// Right sibling
    127      int * rightSibling_;
    128      /// Left sibling
    129      int * leftSibling_;
    130      /// Sign of pivot
    131      double * sign_;
    132      /// Stack
    133      int * stack_;
    134      /// Permute into array
    135      int * permute_;
    136      /// Permute back array
    137      int * permuteBack_;
    138      /// Second stack
    139      int * stack2_;
    140      /// Depth
    141      int * depth_;
    142      /// To mark rows
    143      char * mark_;
    144      //@}
     111  /// Number of Rows in factorization
     112  int numberRows_;
     113  /// Number of Columns in factorization
     114  int numberColumns_;
     115  /// model
     116  const ClpSimplex *model_;
     117  /// Parent for each column
     118  int *parent_;
     119  /// Descendant
     120  int *descendant_;
     121  /// Pivot row
     122  int *pivot_;
     123  /// Right sibling
     124  int *rightSibling_;
     125  /// Left sibling
     126  int *leftSibling_;
     127  /// Sign of pivot
     128  double *sign_;
     129  /// Stack
     130  int *stack_;
     131  /// Permute into array
     132  int *permute_;
     133  /// Permute back array
     134  int *permuteBack_;
     135  /// Second stack
     136  int *stack2_;
     137  /// Depth
     138  int *depth_;
     139  /// To mark rows
     140  char *mark_;
     141  //@}
    145142};
    146143#endif
     144
     145/* vi: softtabstop=2 shiftwidth=2 expandtab tabstop=2
     146*/
Note: See TracChangeset for help on using the changeset viewer.