Ignore:
Timestamp:
Jul 2, 2009 12:26:49 PM (10 years ago)
Author:
forrest
Message:

chnages for speed and alternate factorization

File:
1 edited

Legend:

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

    r1371 r1376  
    1212class ClpSimplex;
    1313class ClpNetworkBasis;
     14class CoinOtherFactorization;
    1415#ifndef CLP_MULTIPLE_FACTORIZATIONS
    1516#ifdef CLP_OSL
     
    1920#endif
    2021#endif   
    21 #if CLP_MULTIPLE_FACTORIZATIONS == 1
     22#ifdef CLP_MULTIPLE_FACTORIZATIONS
    2223#include "CoinDenseFactorization.hpp"
    23 typedef CoinDenseFactorization CoinSmallFactorization;
    24 typedef CoinOslFactorization CoinSmallFactorization;
    25 #elif CLP_MULTIPLE_FACTORIZATIONS == 2
    26 #include "CoinSimpFactorization.hpp"
    27 typedef CoinSimpFactorization CoinSmallFactorization;
    28 typedef CoinOslFactorization CoinSmallFactorization;
    29 #elif CLP_MULTIPLE_FACTORIZATIONS == 3
    30 #include "CoinDenseFactorization.hpp"
    31 #include "CoinSimpFactorization.hpp"
    32 #define CoinOslFactorization CoinDenseFactorization
    33 #elif CLP_MULTIPLE_FACTORIZATIONS == 4
    34 #include "CoinDenseFactorization.hpp"
    35 #include "CoinSimpFactorization.hpp"
    36 #include "CoinOslFactorization.hpp"
    3724#endif
    3825
     
    8067  ClpFactorization(const ClpFactorization&,int denseIfSmaller=0);
    8168#ifdef CLP_MULTIPLE_FACTORIZATIONS   
    82    /** The copy constructor from an CoinSmallFactorization. */
    83    ClpFactorization(const CoinSmallFactorization&);
     69   /** The copy constructor from an CoinOtherFactorization. */
     70   ClpFactorization(const CoinOtherFactorization&);
    8471#endif
    8572   ClpFactorization& operator=(const ClpFactorization&);
     
    10289                      int pivotRow,
    10390                      double pivotCheck ,
    104                       bool checkBeforeModifying=false);
     91                      bool checkBeforeModifying=false,
     92                      double acceptablePivot=1.0e-8);
    10593  //@}
    10694
     
    226214  /// Level of detail of messages
    227215  inline int messageLevel (  ) const {
    228     if (coinFactorizationA_) return coinFactorizationA_->messageLevel();  else return 0 ;
     216    if (coinFactorizationA_) return coinFactorizationA_->messageLevel();  else return 1 ;
    229217  }
    230218  /// Set level of detail of messages
     
    234222  /// Get rid of all memory
    235223  inline void clearArrays()
    236   { if (coinFactorizationA_) coinFactorizationA_->clearArrays();}
     224  { if (coinFactorizationA_)
     225      coinFactorizationA_->clearArrays();
     226    else if (coinFactorizationB_)
     227      coinFactorizationB_->clearArrays();
     228  }
    237229  /// Number of Rows after factorization
    238230  inline int numberRows (  ) const {
     
    247239  /// Pivot tolerance
    248240  inline double pivotTolerance (  ) const {
    249     if (coinFactorizationA_) return coinFactorizationA_->pivotTolerance();  else return 1.0e-8 ;
     241    if (coinFactorizationA_) return coinFactorizationA_->pivotTolerance();  else if (coinFactorizationB_) return coinFactorizationB_->pivotTolerance();return 1.0e-8 ;
    250242  }
    251243  /// Set pivot tolerance
    252244  inline void pivotTolerance (  double value) {
    253245    if (coinFactorizationA_) coinFactorizationA_->pivotTolerance(value);
     246    else if (coinFactorizationB_) coinFactorizationB_->pivotTolerance(value);
    254247  }
    255248  /// Allows change of pivot accuracy check 1.0 == none >1.0 relaxed
     
    267260  /// Delete all stuff (leaves as after CoinFactorization())
    268261  inline void almostDestructor()
    269   { if (coinFactorizationA_) coinFactorizationA_->almostDestructor(); }
     262  { if (coinFactorizationA_)
     263      coinFactorizationA_->almostDestructor();
     264    else if (coinFactorizationB_)
     265      coinFactorizationB_->clearArrays();
     266  }
    270267  /// Returns areaFactor but adjusted for dense
    271268  inline double adjustedAreaFactor() const
     
    366363  /// Pointer to CoinFactorization
    367364  CoinFactorization * coinFactorizationA_;
    368   /// Pointer to CoinSmallFactorization
    369   CoinSmallFactorization * coinFactorizationB_;
     365  /// Pointer to CoinOtherFactorization
     366  CoinOtherFactorization * coinFactorizationB_;
    370367  /// If nonzero force use of 1,dense 2,small 3,osl
    371368  int forceB_;
Note: See TracChangeset for help on using the changeset viewer.