Ignore:
Timestamp:
Feb 26, 2010 12:27:59 PM (10 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/ClpCholeskyDense.hpp

    r1502 r1525  
    1111
    1212public:
    13     /**@name Virtual methods that the derived classes provides  */
    14     /**@{*/
    15     /** Orders rows and saves pointer to matrix.and model.
    16      Returns non-zero if not enough memory */
    17     virtual int order(ClpInterior * model) ;
    18     /** Does Symbolic factorization given permutation.
    19         This is called immediately after order.  If user provides this then
    20         user must provide factorize and solve.  Otherwise the default factorization is used
    21         returns non-zero if not enough memory */
    22     virtual int symbolic();
    23     /** Factorize - filling in rowsDropped and returning number dropped.
    24         If return code negative then out of memory */
    25     virtual int factorize(const CoinWorkDouble * diagonal, int * rowsDropped) ;
    26     /** Uses factorization to solve. */
    27     virtual void solve (CoinWorkDouble * region) ;
    28     /**@}*/
     13     /**@name Virtual methods that the derived classes provides  */
     14     /**@{*/
     15     /** Orders rows and saves pointer to matrix.and model.
     16      Returns non-zero if not enough memory */
     17     virtual int order(ClpInterior * model) ;
     18     /** Does Symbolic factorization given permutation.
     19         This is called immediately after order.  If user provides this then
     20         user must provide factorize and solve.  Otherwise the default factorization is used
     21         returns non-zero if not enough memory */
     22     virtual int symbolic();
     23     /** Factorize - filling in rowsDropped and returning number dropped.
     24         If return code negative then out of memory */
     25     virtual int factorize(const CoinWorkDouble * diagonal, int * rowsDropped) ;
     26     /** Uses factorization to solve. */
     27     virtual void solve (CoinWorkDouble * region) ;
     28     /**@}*/
    2929
    30     /**@name Non virtual methods for ClpCholeskyDense  */
    31     /**@{*/
    32     /** Reserves space.
    33         If factor not NULL then just uses passed space
    34      Returns non-zero if not enough memory */
    35     int reserveSpace(const ClpCholeskyBase * factor, int numberRows) ;
    36     /** Returns space needed */
    37     CoinBigIndex space( int numberRows) const;
    38     /** part 2 of Factorize - filling in rowsDropped */
    39     void factorizePart2(int * rowsDropped) ;
    40     /** part 2 of Factorize - filling in rowsDropped - blocked */
    41     void factorizePart3(int * rowsDropped) ;
    42     /** Forward part of solve */
    43     void solveF1(longDouble * a, int n, CoinWorkDouble * region);
    44     void solveF2(longDouble * a, int n, CoinWorkDouble * region, CoinWorkDouble * region2);
    45     /** Backward part of solve */
    46     void solveB1(longDouble * a, int n, CoinWorkDouble * region);
    47     void solveB2(longDouble * a, int n, CoinWorkDouble * region, CoinWorkDouble * region2);
    48     int bNumber(const longDouble * array, int &, int&);
    49     /** A */
    50     inline longDouble * aMatrix() const {
    51         return sparseFactor_;
    52     }
    53     /** Diagonal */
    54     inline longDouble * diagonal() const {
    55         return diagonal_;
    56     }
    57     /**@}*/
     30     /**@name Non virtual methods for ClpCholeskyDense  */
     31     /**@{*/
     32     /** Reserves space.
     33         If factor not NULL then just uses passed space
     34      Returns non-zero if not enough memory */
     35     int reserveSpace(const ClpCholeskyBase * factor, int numberRows) ;
     36     /** Returns space needed */
     37     CoinBigIndex space( int numberRows) const;
     38     /** part 2 of Factorize - filling in rowsDropped */
     39     void factorizePart2(int * rowsDropped) ;
     40     /** part 2 of Factorize - filling in rowsDropped - blocked */
     41     void factorizePart3(int * rowsDropped) ;
     42     /** Forward part of solve */
     43     void solveF1(longDouble * a, int n, CoinWorkDouble * region);
     44     void solveF2(longDouble * a, int n, CoinWorkDouble * region, CoinWorkDouble * region2);
     45     /** Backward part of solve */
     46     void solveB1(longDouble * a, int n, CoinWorkDouble * region);
     47     void solveB2(longDouble * a, int n, CoinWorkDouble * region, CoinWorkDouble * region2);
     48     int bNumber(const longDouble * array, int &, int&);
     49     /** A */
     50     inline longDouble * aMatrix() const {
     51          return sparseFactor_;
     52     }
     53     /** Diagonal */
     54     inline longDouble * diagonal() const {
     55          return diagonal_;
     56     }
     57     /**@}*/
    5858
    5959
    60     /**@name Constructors, destructor */
    61     /**@{*/
    62     /** Default constructor. */
    63     ClpCholeskyDense();
    64     /** Destructor  */
    65     virtual ~ClpCholeskyDense();
    66     /** Copy */
    67     ClpCholeskyDense(const ClpCholeskyDense&);
    68     /** Assignment */
    69     ClpCholeskyDense& operator=(const ClpCholeskyDense&);
    70     /** Clone */
    71     virtual ClpCholeskyBase * clone() const ;
    72     /**@}*/
     60     /**@name Constructors, destructor */
     61     /**@{*/
     62     /** Default constructor. */
     63     ClpCholeskyDense();
     64     /** Destructor  */
     65     virtual ~ClpCholeskyDense();
     66     /** Copy */
     67     ClpCholeskyDense(const ClpCholeskyDense&);
     68     /** Assignment */
     69     ClpCholeskyDense& operator=(const ClpCholeskyDense&);
     70     /** Clone */
     71     virtual ClpCholeskyBase * clone() const ;
     72     /**@}*/
    7373
    7474
    7575private:
    76     /**@name Data members */
    77     /**@{*/
    78     /** Just borrowing space */
    79     bool borrowSpace_;
    80     /**@}*/
     76     /**@name Data members */
     77     /**@{*/
     78     /** Just borrowing space */
     79     bool borrowSpace_;
     80     /**@}*/
    8181};
    8282
    8383/* structure for C */
    8484typedef struct {
    85     longDouble * diagonal_;
    86     longDouble * a;
    87     longDouble * work;
    88     int * rowsDropped;
    89     double doubleParameters_[1]; /* corresponds to 10 */
    90     int integerParameters_[2]; /* corresponds to 34, nThreads */
    91     int n;
    92     int numberBlocks;
     85     longDouble * diagonal_;
     86     longDouble * a;
     87     longDouble * work;
     88     int * rowsDropped;
     89     double doubleParameters_[1]; /* corresponds to 10 */
     90     int integerParameters_[2]; /* corresponds to 34, nThreads */
     91     int n;
     92     int numberBlocks;
    9393} ClpCholeskyDenseC;
    9494
    9595extern "C" {
    96     void ClpCholeskySpawn(void *);
     96     void ClpCholeskySpawn(void *);
    9797}
    9898/**Non leaf recursive factor */
     
    137137void
    138138ClpCholeskyCtriRecLeaf(/*ClpCholeskyDenseC * thisStruct,*/
    139     longDouble * aTri, longDouble * aUnder,
    140     longDouble * diagonal, longDouble * work,
    141     int nUnder);
     139     longDouble * aTri, longDouble * aUnder,
     140     longDouble * diagonal, longDouble * work,
     141     int nUnder);
    142142/**Leaf recursive rectangle triangle update */
    143143void
    144144ClpCholeskyCrecTriLeaf(/*ClpCholeskyDenseC * thisStruct, */
    145     longDouble * aUnder, longDouble * aTri,
    146     /*longDouble * diagonal,*/ longDouble * work, int nUnder);
     145     longDouble * aUnder, longDouble * aTri,
     146     /*longDouble * diagonal,*/ longDouble * work, int nUnder);
    147147/** Leaf recursive rectangle rectangle update,
    148148    nUnder is number of rows in iBlock,
     
    151151void
    152152ClpCholeskyCrecRecLeaf(/*ClpCholeskyDenseC * thisStruct, */
    153     const longDouble * COIN_RESTRICT above,
    154     const longDouble * COIN_RESTRICT aUnder,
    155     longDouble * COIN_RESTRICT aOther,
    156     const longDouble * COIN_RESTRICT work,
    157     int nUnder);
     153     const longDouble * COIN_RESTRICT above,
     154     const longDouble * COIN_RESTRICT aUnder,
     155     longDouble * COIN_RESTRICT aOther,
     156     const longDouble * COIN_RESTRICT work,
     157     int nUnder);
    158158#endif
Note: See TracChangeset for help on using the changeset viewer.