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

    r1910 r2385  
    33// Corporation and others, Copyright (C) 2012, FasterCoin.  All Rights Reserved.
    44// This code is licensed under the terms of the Eclipse Public License (EPL).
    5 
    65
    76/*
     
    2524
    2625public:
    27 
    2826  /**@name Constructors and destructor and copy */
    2927  //@{
    3028  /// Default constructor
    31   CoinAbcAnyFactorization (  );
    32   /// Copy constructor 
    33   CoinAbcAnyFactorization ( const CoinAbcAnyFactorization &other);
    34  
     29  CoinAbcAnyFactorization();
     30  /// Copy constructor
     31  CoinAbcAnyFactorization(const CoinAbcAnyFactorization &other);
     32
    3533  /// Destructor
    36   virtual ~CoinAbcAnyFactorization (  );
     34  virtual ~CoinAbcAnyFactorization();
    3735  /// = copy
    38   CoinAbcAnyFactorization & operator = ( const CoinAbcAnyFactorization & other );
    39  
     36  CoinAbcAnyFactorization &operator=(const CoinAbcAnyFactorization &other);
     37
    4038  /// Clone
    41   virtual CoinAbcAnyFactorization * clone() const = 0;
     39  virtual CoinAbcAnyFactorization *clone() const = 0;
    4240  //@}
    4341
    4442  /**@name general stuff such as status */
    45   //@{ 
     43  //@{
    4644  /// Returns status
    47   inline int status (  ) const {
     45  inline int status() const
     46  {
    4847    return status_;
    4948  }
    5049  /// Sets status
    51   inline void setStatus (  int value)
    52   {  status_=value;  }
     50  inline void setStatus(int value)
     51  {
     52    status_ = value;
     53  }
    5354  /// Returns number of pivots since factorization
    54   inline int pivots (  ) const {
     55  inline int pivots() const
     56  {
    5557    return numberPivots_;
    5658  }
    57 #if ABC_PARALLEL==2
     59#if ABC_PARALLEL == 2
    5860  /// Says parallel
    5961  inline void setParallelMode(int value)
    60   {parallelMode_=value;};
     62  {
     63    parallelMode_ = value;
     64  };
    6165#endif
    6266  /// Sets number of pivots since factorization
    63   inline void setPivots (  int value )
    64   { numberPivots_=value; }
     67  inline void setPivots(int value)
     68  {
     69    numberPivots_ = value;
     70  }
    6571  /// Returns number of slacks
    66   inline int numberSlacks (  ) const {
     72  inline int numberSlacks() const
     73  {
    6774    return numberSlacks_;
    6875  }
    6976  /// Sets number of slacks
    70   inline void setNumberSlacks (  int value )
    71   { numberSlacks_=value; }
     77  inline void setNumberSlacks(int value)
     78  {
     79    numberSlacks_ = value;
     80  }
    7281  /// Set number of Rows after factorization
    7382  inline void setNumberRows(int value)
    74   { numberRows_ = value; }
     83  {
     84    numberRows_ = value;
     85  }
    7586  /// Number of Rows after factorization
    76   inline int numberRows (  ) const {
     87  inline int numberRows() const
     88  {
    7789    return numberRows_;
    7890  }
    7991  /// Number of dense rows after factorization
    80   inline CoinSimplexInt numberDense (  ) const {
     92  inline CoinSimplexInt numberDense() const
     93  {
    8194    return numberDense_;
    8295  }
    8396  /// Number of good columns in factorization
    84   inline int numberGoodColumns (  ) const {
     97  inline int numberGoodColumns() const
     98  {
    8599    return numberGoodU_;
    86100  }
    87101  /// Allows change of pivot accuracy check 1.0 == none >1.0 relaxed
    88102  inline void relaxAccuracyCheck(double value)
    89   { relaxCheck_ = value;}
     103  {
     104    relaxCheck_ = value;
     105  }
    90106  inline double getAccuracyCheck() const
    91   { return relaxCheck_;}
     107  {
     108    return relaxCheck_;
     109  }
    92110  /// Maximum number of pivots between factorizations
    93   inline int maximumPivots (  ) const {
    94     return maximumPivots_ ;
     111  inline int maximumPivots() const
     112  {
     113    return maximumPivots_;
    95114  }
    96115  /// Set maximum pivots
    97   virtual void maximumPivots (  int value );
     116  virtual void maximumPivots(int value);
    98117
    99118  /// Pivot tolerance
    100   inline double pivotTolerance (  ) const {
    101     return pivotTolerance_ ;
    102   }
    103   void pivotTolerance (  double value );
     119  inline double pivotTolerance() const
     120  {
     121    return pivotTolerance_;
     122  }
     123  void pivotTolerance(double value);
    104124  /// Minimum pivot tolerance
    105   inline double minimumPivotTolerance (  ) const {
    106     return minimumPivotTolerance_ ;
    107   }
    108   void minimumPivotTolerance (  double value );
    109   virtual CoinFactorizationDouble * pivotRegion() const
    110   { return NULL;}
     125  inline double minimumPivotTolerance() const
     126  {
     127    return minimumPivotTolerance_;
     128  }
     129  void minimumPivotTolerance(double value);
     130  virtual CoinFactorizationDouble *pivotRegion() const
     131  {
     132    return NULL;
     133  }
    111134  /// Area factor
    112   inline double areaFactor (  ) const {
    113     return areaFactor_ ;
    114   }
    115   inline void areaFactor ( CoinSimplexDouble value ) {
    116     areaFactor_=value;
     135  inline double areaFactor() const
     136  {
     137    return areaFactor_;
     138  }
     139  inline void areaFactor(CoinSimplexDouble value)
     140  {
     141    areaFactor_ = value;
    117142  }
    118143  /// Zero tolerance
    119   inline double zeroTolerance (  ) const {
    120     return zeroTolerance_ ;
    121   }
    122   void zeroTolerance (  double value );
     144  inline double zeroTolerance() const
     145  {
     146    return zeroTolerance_;
     147  }
     148  void zeroTolerance(double value);
    123149  /// Returns array to put basis elements in
    124   virtual CoinFactorizationDouble * elements() const;
    125   /// Returns pivot row 
    126   virtual int * pivotRow() const;
     150  virtual CoinFactorizationDouble *elements() const;
     151  /// Returns pivot row
     152  virtual int *pivotRow() const;
    127153  /// Returns work area
    128   virtual CoinFactorizationDouble * workArea() const;
     154  virtual CoinFactorizationDouble *workArea() const;
    129155  /// Returns int work area
    130   virtual int * intWorkArea() const;
     156  virtual int *intWorkArea() const;
    131157  /// Number of entries in each row
    132   virtual int * numberInRow() const;
     158  virtual int *numberInRow() const;
    133159  /// Number of entries in each column
    134   virtual int * numberInColumn() const;
     160  virtual int *numberInColumn() const;
    135161  /// Returns array to put basis starts in
    136   virtual CoinBigIndex * starts() const;
     162  virtual CoinBigIndex *starts() const;
    137163  /// Returns permute back
    138   virtual int * permuteBack() const;
     164  virtual int *permuteBack() const;
    139165  /// Sees whether to go sparse
    140166  virtual void goSparse() {}
    141167#ifndef NDEBUG
    142   virtual inline void checkMarkArrays() const {}
     168  virtual inline void checkMarkArrays() const
     169  {
     170  }
    143171#endif
    144172  /** Get solve mode e.g. 0 C++ code, 1 Lapack, 2 choose
     
    147175  */
    148176  inline int solveMode() const
    149   { return solveMode_ ;}
     177  {
     178    return solveMode_;
     179  }
    150180  /** Set solve mode e.g. 0 C++ code, 1 Lapack, 2 choose
    151181      If 4 set then values pass
     
    153183  */
    154184  inline void setSolveMode(int value)
    155   { solveMode_ = value;}
     185  {
     186    solveMode_ = value;
     187  }
    156188  /// Returns true if wants tableauColumn in replaceColumn
    157189  virtual bool wantsTableauColumn() const;
     
    160192      whereFrom is 0 for factorize and 1 for replaceColumn
    161193  */
    162   virtual void setUsefulInformation(const int * info,int whereFrom);
     194  virtual void setUsefulInformation(const int *info, int whereFrom);
    163195  /// Get rid of all memory
    164196  virtual void clearArrays() {}
    165197  //@}
    166198  /**@name virtual general stuff such as permutation */
    167   //@{ 
     199  //@{
    168200  /// Returns array to put basis indices in
    169   virtual int * indices() const = 0;
     201  virtual int *indices() const = 0;
    170202  /// Returns permute in
    171   virtual int * permute() const = 0;
     203  virtual int *permute() const = 0;
    172204  /// Returns pivotColumn or permute
    173   virtual int * pivotColumn() const;
     205  virtual int *pivotColumn() const;
    174206  /// Total number of elements in factorization
    175   virtual int numberElements (  ) const = 0;
     207  virtual int numberElements() const = 0;
    176208  //@}
    177209  /**@name Do factorization - public */
    178210  //@{
    179211  /// Gets space for a factorization
    180   virtual void getAreas ( int numberRows,
    181                   int numberColumns,
    182                   CoinBigIndex maximumL,
    183                   CoinBigIndex maximumU ) = 0;
    184  
     212  virtual void getAreas(int numberRows,
     213    int numberColumns,
     214    CoinBigIndex maximumL,
     215    CoinBigIndex maximumU)
     216    = 0;
     217
    185218  /// PreProcesses column ordered copy of basis
    186   virtual void preProcess ( ) = 0;
     219  virtual void preProcess() = 0;
    187220  /** Does most of factorization returning status
    188221      0 - OK
     
    190223      -1 - singular - use numberGoodColumns and redo
    191224  */
    192   virtual int factor (AbcSimplex * model) = 0;
     225  virtual int factor(AbcSimplex *model) = 0;
    193226#ifdef EARLY_FACTORIZE
    194227  /// Returns -2 if can't, -1 if singular, -99 memory, 0 OK
    195   virtual int factorize (AbcSimplex * /*model*/, CoinIndexedVector & /*stuff*/)
    196   { return -2;}
     228  virtual int factorize(AbcSimplex * /*model*/, CoinIndexedVector & /*stuff*/)
     229  {
     230    return -2;
     231  }
    197232#endif
    198233  /// Does post processing on valid factorization - putting variables on correct rows
    199   virtual void postProcess(const int * sequence, int * pivotVariable) = 0;
     234  virtual void postProcess(const int *sequence, int *pivotVariable) = 0;
    200235  /// Makes a non-singular basis by replacing variables
    201   virtual void makeNonSingular(int * sequence) = 0;
     236  virtual void makeNonSingular(int *sequence) = 0;
    202237  //@}
    203238
     
    226261#ifdef EARLY_FACTORIZE
    227262  /// 0 success, -1 can't +1 accuracy problems
    228   virtual int replaceColumns ( const AbcSimplex * /*model*/,
    229                                CoinIndexedVector & /*stuff*/,
    230                                int /*firstPivot*/,int /*lastPivot*/,bool /*cleanUp*/)
    231   { return -1;}
    232 #endif
    233 #ifdef ABC_LONG_FACTORIZATION
     263  virtual int replaceColumns(const AbcSimplex * /*model*/,
     264    CoinIndexedVector & /*stuff*/,
     265    int /*firstPivot*/, int /*lastPivot*/, bool /*cleanUp*/)
     266  {
     267    return -1;
     268  }
     269#endif
     270#ifdef ABC_LONG_FACTORIZATION
    234271  /// Clear all hidden arrays
    235272  virtual void clearHiddenArrays() {}
     
    239276      Fills in region for use later
    240277      partial update already in U */
    241   virtual
    242 #ifdef ABC_LONG_FACTORIZATION
    243   long
    244 #endif
    245   double checkReplacePart1 ( CoinIndexedVector * /*regionSparse*/,
    246                                      int /*pivotRow*/)
    247   {return 0.0;}
    248   virtual
    249 #ifdef ABC_LONG_FACTORIZATION
    250   long
    251 #endif
    252   double checkReplacePart1 ( CoinIndexedVector * /*regionSparse*/,
    253                                      CoinIndexedVector * /*partialUpdate*/,
    254                                      int /*pivotRow*/)
    255   {return 0.0;}
    256   virtual void checkReplacePart1a ( CoinIndexedVector * /* regionSparse */,
    257                                     int /*pivotRow*/)
    258   {}
    259   virtual double checkReplacePart1b (CoinIndexedVector * /*regionSparse*/,
    260                                      int /*pivotRow*/)
    261   {return 0.0;}
     278  virtual
     279#ifdef ABC_LONG_FACTORIZATION
     280    long
     281#endif
     282    double
     283    checkReplacePart1(CoinIndexedVector * /*regionSparse*/,
     284      int /*pivotRow*/)
     285  {
     286    return 0.0;
     287  }
     288  virtual
     289#ifdef ABC_LONG_FACTORIZATION
     290    long
     291#endif
     292    double
     293    checkReplacePart1(CoinIndexedVector * /*regionSparse*/,
     294      CoinIndexedVector * /*partialUpdate*/,
     295      int /*pivotRow*/)
     296  {
     297    return 0.0;
     298  }
     299  virtual void checkReplacePart1a(CoinIndexedVector * /* regionSparse */,
     300    int /*pivotRow*/)
     301  {
     302  }
     303  virtual double checkReplacePart1b(CoinIndexedVector * /*regionSparse*/,
     304    int /*pivotRow*/)
     305  {
     306    return 0.0;
     307  }
    262308  /** Checks if can replace one Column to basis,
    263309      returns 0=OK, 1=Probably OK, 2=singular, 3=no room, 5 max pivots */
    264   virtual int checkReplacePart2 ( int pivotRow,
    265                                   double btranAlpha,
    266                                   double ftranAlpha,
    267 #ifdef ABC_LONG_FACTORIZATION
    268                                   long
    269 #endif
    270                                   double ftAlpha,
    271                                   double acceptablePivot = 1.0e-8) = 0;
     310  virtual int checkReplacePart2(int pivotRow,
     311    double btranAlpha,
     312    double ftranAlpha,
     313#ifdef ABC_LONG_FACTORIZATION
     314    long
     315#endif
     316    double ftAlpha,
     317    double acceptablePivot = 1.0e-8)
     318    = 0;
    272319  /** Replaces one Column to basis,
    273320      partial update already in U */
    274   virtual void replaceColumnPart3 ( const AbcSimplex * model,
    275                       CoinIndexedVector * regionSparse,
    276                       CoinIndexedVector * tableauColumn,
    277                       int pivotRow,
    278 #ifdef ABC_LONG_FACTORIZATION
    279                                     long
    280 #endif
    281                        double alpha ) = 0;
     321  virtual void replaceColumnPart3(const AbcSimplex *model,
     322    CoinIndexedVector *regionSparse,
     323    CoinIndexedVector *tableauColumn,
     324    int pivotRow,
     325#ifdef ABC_LONG_FACTORIZATION
     326    long
     327#endif
     328    double alpha)
     329    = 0;
    282330  /** Replaces one Column to basis,
    283331      partial update in vector */
    284   virtual void replaceColumnPart3 ( const AbcSimplex * model,
    285                                     CoinIndexedVector * regionSparse,
    286                                     CoinIndexedVector * tableauColumn,
    287                                     CoinIndexedVector * partialUpdate,
    288                                     int pivotRow,
    289 #ifdef ABC_LONG_FACTORIZATION
    290                                   long
    291 #endif
    292                                     double alpha )=0;
     332  virtual void replaceColumnPart3(const AbcSimplex *model,
     333    CoinIndexedVector *regionSparse,
     334    CoinIndexedVector *tableauColumn,
     335    CoinIndexedVector *partialUpdate,
     336    int pivotRow,
     337#ifdef ABC_LONG_FACTORIZATION
     338    long
     339#endif
     340    double alpha)
     341    = 0;
    293342  //@}
    294343
     
    300349      number returned is negative if no room
    301350  */
    302   virtual int updateColumnFT ( CoinIndexedVector & regionSparse) = 0;
    303   virtual int updateColumnFTPart1 ( CoinIndexedVector & regionSparse) = 0;
    304   virtual void updateColumnFTPart2 ( CoinIndexedVector & regionSparse) = 0;
    305   virtual void updateColumnFT ( CoinIndexedVector & regionSparseFT,
    306                                 CoinIndexedVector & partialUpdate,
    307                                 int which)=0;
     351  virtual int updateColumnFT(CoinIndexedVector &regionSparse) = 0;
     352  virtual int updateColumnFTPart1(CoinIndexedVector &regionSparse) = 0;
     353  virtual void updateColumnFTPart2(CoinIndexedVector &regionSparse) = 0;
     354  virtual void updateColumnFT(CoinIndexedVector &regionSparseFT,
     355    CoinIndexedVector &partialUpdate,
     356    int which)
     357    = 0;
    308358  /** This version has same effect as above with FTUpdate==false
    309359      so number returned is always >=0 */
    310   virtual int updateColumn ( CoinIndexedVector & regionSparse) const = 0;
     360  virtual int updateColumn(CoinIndexedVector &regionSparse) const = 0;
    311361  /// does FTRAN on two unpacked columns
    312   virtual int updateTwoColumnsFT(CoinIndexedVector & regionFT,
    313                                     CoinIndexedVector & regionOther) = 0;
     362  virtual int updateTwoColumnsFT(CoinIndexedVector &regionFT,
     363    CoinIndexedVector &regionOther)
     364    = 0;
    314365  /** Updates one column (BTRAN) from unpacked regionSparse
    315366  */
    316   virtual int updateColumnTranspose ( CoinIndexedVector & regionSparse) const = 0;
     367  virtual int updateColumnTranspose(CoinIndexedVector &regionSparse) const = 0;
    317368  /** This version does FTRAN on array when indices not set up */
    318   virtual void updateFullColumn ( CoinIndexedVector & regionSparse) const = 0;
     369  virtual void updateFullColumn(CoinIndexedVector &regionSparse) const = 0;
    319370  /** Updates one column (BTRAN) from unpacked regionSparse
    320371  */
    321   virtual void updateFullColumnTranspose ( CoinIndexedVector & regionSparse) const = 0;
     372  virtual void updateFullColumnTranspose(CoinIndexedVector &regionSparse) const = 0;
    322373  /** Updates one column for dual steepest edge weights (FTRAN) */
    323   virtual void updateWeights ( CoinIndexedVector & regionSparse) const=0;
     374  virtual void updateWeights(CoinIndexedVector &regionSparse) const = 0;
    324375  /** Updates one column (FTRAN) */
    325   virtual void updateColumnCpu ( CoinIndexedVector & regionSparse,int whichCpu) const;
     376  virtual void updateColumnCpu(CoinIndexedVector &regionSparse, int whichCpu) const;
    326377  /** Updates one column (BTRAN) */
    327   virtual void updateColumnTransposeCpu ( CoinIndexedVector & regionSparse,int whichCpu) const;
    328   //@}
    329 
    330 ////////////////// data //////////////////
     378  virtual void updateColumnTransposeCpu(CoinIndexedVector &regionSparse, int whichCpu) const;
     379  //@}
     380
     381  ////////////////// data //////////////////
    331382protected:
    332 
    333383  /**@name data */
    334384  //@{
     
    341391  /// Zero tolerance
    342392  double zeroTolerance_;
    343   //#ifndef slackValue_ 
     393  //#ifndef slackValue_
    344394#define slackValue2_ 1.0
    345395  //#endif
     
    364414  /// Maximum rows ever (i.e. use to copy arrays etc)
    365415  int maximumRows_;
    366 #if ABC_PARALLEL==2
     416#if ABC_PARALLEL == 2
    367417  int parallelMode_;
    368418#endif
    369   /// Pivot row 
    370   int * pivotRow_;
     419  /// Pivot row
     420  int *pivotRow_;
    371421  /** Elements of factorization and updates
    372422      length is maxR*maxR+maxSpace
    373423      will always be long enough so can have nR*nR ints in maxSpace
    374424  */
    375   CoinFactorizationDouble * elements_;
    376   /// Work area of numberRows_ 
    377   CoinFactorizationDouble * workArea_;
     425  CoinFactorizationDouble *elements_;
     426  /// Work area of numberRows_
     427  CoinFactorizationDouble *workArea_;
    378428  /** Solve mode e.g. 0 C++ code, 1 Lapack, 2 choose
    379429      If 4 set then values pass
     
    390440 */
    391441
    392 
    393 
    394442class CoinAbcDenseFactorization : public CoinAbcAnyFactorization {
    395    friend void CoinAbcDenseFactorizationUnitTest( const std::string & mpsDir );
     443  friend void CoinAbcDenseFactorizationUnitTest(const std::string &mpsDir);
    396444
    397445public:
    398 
    399446  /**@name Constructors and destructor and copy */
    400447  //@{
    401448  /// Default constructor
    402   CoinAbcDenseFactorization (  );
    403   /// Copy constructor 
    404   CoinAbcDenseFactorization ( const CoinAbcDenseFactorization &other);
    405  
     449  CoinAbcDenseFactorization();
     450  /// Copy constructor
     451  CoinAbcDenseFactorization(const CoinAbcDenseFactorization &other);
     452
    406453  /// Destructor
    407   virtual ~CoinAbcDenseFactorization (  );
     454  virtual ~CoinAbcDenseFactorization();
    408455  /// = copy
    409   CoinAbcDenseFactorization & operator = ( const CoinAbcDenseFactorization & other );
     456  CoinAbcDenseFactorization &operator=(const CoinAbcDenseFactorization &other);
    410457  /// Clone
    411   virtual CoinAbcAnyFactorization * clone() const ;
     458  virtual CoinAbcAnyFactorization *clone() const;
    412459  //@}
    413460
     
    415462  //@{
    416463  /// Gets space for a factorization
    417   virtual void getAreas ( int numberRows,
    418                   int numberColumns,
    419                   CoinBigIndex maximumL,
    420                   CoinBigIndex maximumU );
    421  
     464  virtual void getAreas(int numberRows,
     465    int numberColumns,
     466    CoinBigIndex maximumL,
     467    CoinBigIndex maximumU);
     468
    422469  /// PreProcesses column ordered copy of basis
    423   virtual void preProcess ( );
     470  virtual void preProcess();
    424471  /** Does most of factorization returning status
    425472      0 - OK
     
    427474      -1 - singular - use numberGoodColumns and redo
    428475  */
    429   virtual int factor (AbcSimplex * model);
     476  virtual int factor(AbcSimplex *model);
    430477  /// Does post processing on valid factorization - putting variables on correct rows
    431   virtual void postProcess(const int * sequence, int * pivotVariable);
     478  virtual void postProcess(const int *sequence, int *pivotVariable);
    432479  /// Makes a non-singular basis by replacing variables
    433   virtual void makeNonSingular(int * sequence);
     480  virtual void makeNonSingular(int *sequence);
    434481  //@}
    435482
    436483  /**@name general stuff such as number of elements */
    437   //@{ 
     484  //@{
    438485  /// Total number of elements in factorization
    439   virtual inline int numberElements (  ) const {
    440     return numberRows_*(numberRows_+numberPivots_);
     486  virtual inline int numberElements() const
     487  {
     488    return numberRows_ * (numberRows_ + numberPivots_);
    441489  }
    442490  /// Returns maximum absolute value in factorization
     
    451499      If skipBtranU is false will do btran part
    452500   partial update already in U */
    453   virtual int replaceColumn ( CoinIndexedVector * regionSparse,
    454                       int pivotRow,
    455                       double pivotCheck ,
    456                               bool skipBtranU=false,
    457                               double acceptablePivot=1.0e-8);
     501  virtual int replaceColumn(CoinIndexedVector *regionSparse,
     502    int pivotRow,
     503    double pivotCheck,
     504    bool skipBtranU = false,
     505    double acceptablePivot = 1.0e-8);
    458506  /** Checks if can replace one Column to basis,
    459507      returns 0=OK, 1=Probably OK, 2=singular, 3=no room, 5 max pivots */
    460   virtual int checkReplacePart2 ( int pivotRow,
    461                                   double btranAlpha,
    462                                   double ftranAlpha,
    463 #ifdef ABC_LONG_FACTORIZATION 
    464                                   long
    465 #endif
    466                                   double ftAlpha,
    467                                   double acceptablePivot = 1.0e-8) ;
     508  virtual int checkReplacePart2(int pivotRow,
     509    double btranAlpha,
     510    double ftranAlpha,
     511#ifdef ABC_LONG_FACTORIZATION
     512    long
     513#endif
     514    double ftAlpha,
     515    double acceptablePivot = 1.0e-8);
    468516  /** Replaces one Column to basis,
    469517      partial update already in U */
    470   virtual void replaceColumnPart3 ( const AbcSimplex * model,
    471                       CoinIndexedVector * regionSparse,
    472                       CoinIndexedVector * tableauColumn,
    473                       int pivotRow,
    474 #ifdef ABC_LONG_FACTORIZATION 
    475                                     long
    476 #endif
    477                        double alpha );
     518  virtual void replaceColumnPart3(const AbcSimplex *model,
     519    CoinIndexedVector *regionSparse,
     520    CoinIndexedVector *tableauColumn,
     521    int pivotRow,
     522#ifdef ABC_LONG_FACTORIZATION
     523    long
     524#endif
     525    double alpha);
    478526  /** Replaces one Column to basis,
    479527      partial update in vector */
    480   virtual void replaceColumnPart3 ( const AbcSimplex * model,
    481                                     CoinIndexedVector * regionSparse,
    482                                     CoinIndexedVector * tableauColumn,
    483                                     CoinIndexedVector * /*partialUpdate*/,
    484                                     int pivotRow,
    485 #ifdef ABC_LONG_FACTORIZATION
    486                                     long
    487 #endif
    488                                     double alpha )
    489   { replaceColumnPart3(model,regionSparse,tableauColumn,pivotRow,alpha);}
     528  virtual void replaceColumnPart3(const AbcSimplex *model,
     529    CoinIndexedVector *regionSparse,
     530    CoinIndexedVector *tableauColumn,
     531    CoinIndexedVector * /*partialUpdate*/,
     532    int pivotRow,
     533#ifdef ABC_LONG_FACTORIZATION
     534    long
     535#endif
     536    double alpha)
     537  {
     538    replaceColumnPart3(model, regionSparse, tableauColumn, pivotRow, alpha);
     539  }
    490540  //@}
    491541
     
    497547      number returned is negative if no room
    498548  */
    499   virtual int updateColumnFT ( CoinIndexedVector & regionSparse)
    500   {return updateColumn(regionSparse);}
    501   virtual int updateColumnFTPart1 ( CoinIndexedVector & regionSparse)
    502   {return updateColumn(regionSparse);}
    503   virtual void updateColumnFTPart2 ( CoinIndexedVector & /*regionSparse*/)
    504   {}
    505   virtual void updateColumnFT ( CoinIndexedVector & regionSparseFT,CoinIndexedVector & /*partialUpdate*/,int /*which*/)
    506   { updateColumnFT(regionSparseFT);}
     549  virtual int updateColumnFT(CoinIndexedVector &regionSparse)
     550  {
     551    return updateColumn(regionSparse);
     552  }
     553  virtual int updateColumnFTPart1(CoinIndexedVector &regionSparse)
     554  {
     555    return updateColumn(regionSparse);
     556  }
     557  virtual void updateColumnFTPart2(CoinIndexedVector & /*regionSparse*/)
     558  {
     559  }
     560  virtual void updateColumnFT(CoinIndexedVector &regionSparseFT, CoinIndexedVector & /*partialUpdate*/, int /*which*/)
     561  {
     562    updateColumnFT(regionSparseFT);
     563  }
    507564  /** This version has same effect as above with FTUpdate==false
    508565      so number returned is always >=0 */
    509   virtual int updateColumn ( CoinIndexedVector & regionSparse) const;
     566  virtual int updateColumn(CoinIndexedVector &regionSparse) const;
    510567  /// does FTRAN on two unpacked columns
    511   virtual int updateTwoColumnsFT(CoinIndexedVector & regionFT,
    512                                     CoinIndexedVector & regionOther);
     568  virtual int updateTwoColumnsFT(CoinIndexedVector &regionFT,
     569    CoinIndexedVector &regionOther);
    513570  /** Updates one column (BTRAN) from unpacked regionSparse
    514571  */
    515   virtual int updateColumnTranspose ( CoinIndexedVector & regionSparse) const;
     572  virtual int updateColumnTranspose(CoinIndexedVector &regionSparse) const;
    516573  /** This version does FTRAN on array when indices not set up */
    517   virtual void updateFullColumn ( CoinIndexedVector & regionSparse) const
    518   {updateColumn(regionSparse);}
     574  virtual void updateFullColumn(CoinIndexedVector &regionSparse) const
     575  {
     576    updateColumn(regionSparse);
     577  }
    519578  /** Updates one column (BTRAN) from unpacked regionSparse
    520579  */
    521   virtual void updateFullColumnTranspose ( CoinIndexedVector & regionSparse) const
    522   {updateColumnTranspose(regionSparse);}
     580  virtual void updateFullColumnTranspose(CoinIndexedVector &regionSparse) const
     581  {
     582    updateColumnTranspose(regionSparse);
     583  }
    523584  /** Updates one column for dual steepest edge weights (FTRAN) */
    524   virtual void updateWeights ( CoinIndexedVector & regionSparse) const;
     585  virtual void updateWeights(CoinIndexedVector &regionSparse) const;
    525586  //@}
    526587  /// *** Below this user may not want to know about
     
    531592  /// Get rid of all memory
    532593  inline void clearArrays()
    533   { gutsOfDestructor();}
     594  {
     595    gutsOfDestructor();
     596  }
    534597  /// Returns array to put basis indices in
    535   virtual inline int * indices() const
    536   { return reinterpret_cast<int *> (elements_+numberRows_*numberRows_);}
     598  virtual inline int *indices() const
     599  {
     600    return reinterpret_cast< int * >(elements_ + numberRows_ * numberRows_);
     601  }
    537602  /// Returns permute in
    538   virtual inline int * permute() const
    539   { return NULL;/*pivotRow_*/;}
    540   //@}
    541 
    542   /// The real work of desstructor
     603  virtual inline int *permute() const
     604  {
     605    return NULL; /*pivotRow_*/
     606    ;
     607  }
     608  //@}
     609
     610  /// The real work of desstructor
    543611  void gutsOfDestructor();
    544612  /// The real work of constructor
     
    552620      returns 0=OK, 1=Probably OK, 2=singular */
    553621  int checkPivot(double saveFromU, double oldPivot) const;
    554 ////////////////// data //////////////////
     622  ////////////////// data //////////////////
    555623protected:
    556624  /// Maximum length of iterating area
     
    564632};
    565633#endif
     634
     635/* vi: softtabstop=2 shiftwidth=2 expandtab tabstop=2
     636*/
Note: See TracChangeset for help on using the changeset viewer.