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

    r2271 r2385  
    1515
    1616public:
    17      /**@name Virtual methods that the derived classes provides  */
    18      /**@{*/
    19      /** Orders rows and saves pointer to matrix.and model.
     17  /**@name Virtual methods that the derived classes provides  */
     18  /**@{*/
     19  /** Orders rows and saves pointer to matrix.and model.
    2020      Returns non-zero if not enough memory */
    21      virtual int order(ClpInterior * model) ;
    22      /** Does Symbolic factorization given permutation.
     21  virtual int order(ClpInterior *model);
     22  /** Does Symbolic factorization given permutation.
    2323         This is called immediately after order.  If user provides this then
    2424         user must provide factorize and solve.  Otherwise the default factorization is used
    2525         returns non-zero if not enough memory */
    26      virtual int symbolic();
    27      /** Factorize - filling in rowsDropped and returning number dropped.
     26  virtual int symbolic();
     27  /** Factorize - filling in rowsDropped and returning number dropped.
    2828         If return code negative then out of memory */
    29      virtual int factorize(const CoinWorkDouble * diagonal, int * rowsDropped) ;
    30      /** Uses factorization to solve. */
    31      virtual void solve (CoinWorkDouble * region) ;
    32      /**@}*/
     29  virtual int factorize(const CoinWorkDouble *diagonal, int *rowsDropped);
     30  /** Uses factorization to solve. */
     31  virtual void solve(CoinWorkDouble *region);
     32  /**@}*/
    3333
    34      /**@name Non virtual methods for ClpCholeskyDense  */
    35      /**@{*/
    36      /** Reserves space.
     34  /**@name Non virtual methods for ClpCholeskyDense  */
     35  /**@{*/
     36  /** Reserves space.
    3737         If factor not NULL then just uses passed space
    3838      Returns non-zero if not enough memory */
    39      int reserveSpace(const ClpCholeskyBase * factor, int numberRows) ;
    40      /** Returns space needed */
    41      int space( int numberRows) const;
    42      /** part 2 of Factorize - filling in rowsDropped */
    43      void factorizePart2(int * rowsDropped) ;
    44      /** part 2 of Factorize - filling in rowsDropped - blocked */
    45      void factorizePart3(int * rowsDropped) ;
    46      /** Forward part of solve */
    47      void solveF1(longDouble * a, int n, CoinWorkDouble * region);
    48      void solveF2(longDouble * a, int n, CoinWorkDouble * region, CoinWorkDouble * region2);
    49      /** Backward part of solve */
    50      void solveB1(longDouble * a, int n, CoinWorkDouble * region);
    51      void solveB2(longDouble * a, int n, CoinWorkDouble * region, CoinWorkDouble * region2);
    52      int bNumber(const longDouble * array, int &, int&);
    53      /** A */
    54      inline longDouble * aMatrix() const {
    55           return sparseFactor_;
    56      }
    57      /** Diagonal */
    58      inline longDouble * diagonal() const {
    59           return diagonal_;
    60      }
    61      /**@}*/
     39  int reserveSpace(const ClpCholeskyBase *factor, int numberRows);
     40  /** Returns space needed */
     41  int space(int numberRows) const;
     42  /** part 2 of Factorize - filling in rowsDropped */
     43  void factorizePart2(int *rowsDropped);
     44  /** part 2 of Factorize - filling in rowsDropped - blocked */
     45  void factorizePart3(int *rowsDropped);
     46  /** Forward part of solve */
     47  void solveF1(longDouble *a, int n, CoinWorkDouble *region);
     48  void solveF2(longDouble *a, int n, CoinWorkDouble *region, CoinWorkDouble *region2);
     49  /** Backward part of solve */
     50  void solveB1(longDouble *a, int n, CoinWorkDouble *region);
     51  void solveB2(longDouble *a, int n, CoinWorkDouble *region, CoinWorkDouble *region2);
     52  int bNumber(const longDouble *array, int &, int &);
     53  /** A */
     54  inline longDouble *aMatrix() const
     55  {
     56    return sparseFactor_;
     57  }
     58  /** Diagonal */
     59  inline longDouble *diagonal() const
     60  {
     61    return diagonal_;
     62  }
     63  /**@}*/
    6264
    63 
    64      /**@name Constructors, destructor */
    65      /**@{*/
    66      /** Default constructor. */
    67      ClpCholeskyDense();
    68      /** Destructor  */
    69      virtual ~ClpCholeskyDense();
    70      /** Copy */
    71      ClpCholeskyDense(const ClpCholeskyDense&);
    72      /** Assignment */
    73      ClpCholeskyDense& operator=(const ClpCholeskyDense&);
    74      /** Clone */
    75      virtual ClpCholeskyBase * clone() const ;
    76      /**@}*/
    77 
     65  /**@name Constructors, destructor */
     66  /**@{*/
     67  /** Default constructor. */
     68  ClpCholeskyDense();
     69  /** Destructor  */
     70  virtual ~ClpCholeskyDense();
     71  /** Copy */
     72  ClpCholeskyDense(const ClpCholeskyDense &);
     73  /** Assignment */
     74  ClpCholeskyDense &operator=(const ClpCholeskyDense &);
     75  /** Clone */
     76  virtual ClpCholeskyBase *clone() const;
     77  /**@}*/
    7878
    7979private:
    80      /**@name Data members */
    81      /**@{*/
    82      /** Just borrowing space */
    83      bool borrowSpace_;
    84      /**@}*/
     80  /**@name Data members */
     81  /**@{*/
     82  /** Just borrowing space */
     83  bool borrowSpace_;
     84  /**@}*/
    8585};
    8686
    8787/* structure for C */
    8888typedef struct {
    89      longDouble * diagonal_;
    90      longDouble * a;
    91      longDouble * work;
    92      int * rowsDropped;
    93      double doubleParameters_[1]; /* corresponds to 10 */
    94      int integerParameters_[2]; /* corresponds to 34, nThreads */
    95      int n;
    96      int numberBlocks;
     89  longDouble *diagonal_;
     90  longDouble *a;
     91  longDouble *work;
     92  int *rowsDropped;
     93  double doubleParameters_[1]; /* corresponds to 10 */
     94  int integerParameters_[2]; /* corresponds to 34, nThreads */
     95  int n;
     96  int numberBlocks;
    9797} ClpCholeskyDenseC;
    9898
    9999extern "C" {
    100      void ClpCholeskySpawn(void *);
     100void ClpCholeskySpawn(void *);
    101101}
    102102/**Non leaf recursive factor */
    103 void
    104 ClpCholeskyCfactor(ClpCholeskyDenseC * thisStruct,
    105                    longDouble * a, int n, int numberBlocks,
    106                    longDouble * diagonal, longDouble * work, int * rowsDropped);
     103void ClpCholeskyCfactor(ClpCholeskyDenseC *thisStruct,
     104  longDouble *a, int n, int numberBlocks,
     105  longDouble *diagonal, longDouble *work, int *rowsDropped);
    107106
    108107/**Non leaf recursive triangle rectangle update */
    109 void
    110 ClpCholeskyCtriRec(ClpCholeskyDenseC * thisStruct,
    111                    longDouble * aTri, int nThis,
    112                    longDouble * aUnder, longDouble * diagonal,
    113                    longDouble * work,
    114                    int nLeft, int iBlock, int jBlock,
    115                    int numberBlocks);
     108void ClpCholeskyCtriRec(ClpCholeskyDenseC *thisStruct,
     109  longDouble *aTri, int nThis,
     110  longDouble *aUnder, longDouble *diagonal,
     111  longDouble *work,
     112  int nLeft, int iBlock, int jBlock,
     113  int numberBlocks);
    116114/**Non leaf recursive rectangle triangle update */
    117 void
    118 ClpCholeskyCrecTri(ClpCholeskyDenseC * thisStruct,
    119                    longDouble * aUnder, int nTri, int nDo,
    120                    int iBlock, int jBlock, longDouble * aTri,
    121                    longDouble * diagonal, longDouble * work,
    122                    int numberBlocks);
     115void ClpCholeskyCrecTri(ClpCholeskyDenseC *thisStruct,
     116  longDouble *aUnder, int nTri, int nDo,
     117  int iBlock, int jBlock, longDouble *aTri,
     118  longDouble *diagonal, longDouble *work,
     119  int numberBlocks);
    123120/** Non leaf recursive rectangle rectangle update,
    124121    nUnder is number of rows in iBlock,
    125122    nUnderK is number of rows in kBlock
    126123*/
    127 void
    128 ClpCholeskyCrecRec(ClpCholeskyDenseC * thisStruct,
    129                    longDouble * above, int nUnder, int nUnderK,
    130                    int nDo, longDouble * aUnder, longDouble *aOther,
    131                    longDouble * work,
    132                    int iBlock, int jBlock,
    133                    int numberBlocks);
     124void ClpCholeskyCrecRec(ClpCholeskyDenseC *thisStruct,
     125  longDouble *above, int nUnder, int nUnderK,
     126  int nDo, longDouble *aUnder, longDouble *aOther,
     127  longDouble *work,
     128  int iBlock, int jBlock,
     129  int numberBlocks);
    134130/**Leaf recursive factor */
    135 void
    136 ClpCholeskyCfactorLeaf(ClpCholeskyDenseC * thisStruct,
    137                        longDouble * a, int n,
    138                        longDouble * diagonal, longDouble * work,
    139                        int * rowsDropped);
     131void ClpCholeskyCfactorLeaf(ClpCholeskyDenseC *thisStruct,
     132  longDouble *a, int n,
     133  longDouble *diagonal, longDouble *work,
     134  int *rowsDropped);
    140135/**Leaf recursive triangle rectangle update */
    141 void
    142 ClpCholeskyCtriRecLeaf(/*ClpCholeskyDenseC * thisStruct,*/
    143      longDouble * aTri, longDouble * aUnder,
    144      longDouble * diagonal, longDouble * work,
    145      int nUnder);
     136void ClpCholeskyCtriRecLeaf(/*ClpCholeskyDenseC * thisStruct,*/
     137  longDouble *aTri, longDouble *aUnder,
     138  longDouble *diagonal, longDouble *work,
     139  int nUnder);
    146140/**Leaf recursive rectangle triangle update */
    147 void
    148 ClpCholeskyCrecTriLeaf(/*ClpCholeskyDenseC * thisStruct, */
    149      longDouble * aUnder, longDouble * aTri,
    150      /*longDouble * diagonal,*/ longDouble * work, int nUnder);
     141void ClpCholeskyCrecTriLeaf(/*ClpCholeskyDenseC * thisStruct, */
     142  longDouble *aUnder, longDouble *aTri,
     143  /*longDouble * diagonal,*/ longDouble *work, int nUnder);
    151144/** Leaf recursive rectangle rectangle update,
    152145    nUnder is number of rows in iBlock,
    153146    nUnderK is number of rows in kBlock
    154147*/
    155 void
    156 ClpCholeskyCrecRecLeaf(/*ClpCholeskyDenseC * thisStruct, */
    157      const longDouble * COIN_RESTRICT above,
    158      const longDouble * COIN_RESTRICT aUnder,
    159      longDouble * COIN_RESTRICT aOther,
    160      const longDouble * COIN_RESTRICT work,
    161      int nUnder);
     148void ClpCholeskyCrecRecLeaf(/*ClpCholeskyDenseC * thisStruct, */
     149  const longDouble *COIN_RESTRICT above,
     150  const longDouble *COIN_RESTRICT aUnder,
     151  longDouble *COIN_RESTRICT aOther,
     152  const longDouble *COIN_RESTRICT work,
     153  int nUnder);
    162154#endif
     155
     156/* vi: softtabstop=2 shiftwidth=2 expandtab tabstop=2
     157*/
Note: See TracChangeset for help on using the changeset viewer.