1 // Copyright (C) 2004, 2006 International Business Machines and others. 2 // All Rights Reserved. 3 // This code is published under the Common Public License. 4 // 5 // $Id: IpTSymScalingMethod.hpp 759 2006-07-07 03:07:08Z andreasw $ 6 // 7 // Authors: Carl Laird, Andreas Waechter IBM 2004-03-17 8 9 #ifndef __IPTSYMSCALINGMETHOD_HPP__ 10 #define __IPTSYMSCALINGMETHOD_HPP__ 11 12 #include "IpUtils.hpp" 13 #include "IpAlgStrategy.hpp" 14 15 namespace SimTKIpopt 16 { 17 18 DECLARE_STD_EXCEPTION(ERROR_IN_LINEAR_SCALING_METHOD); 19 20 /** Base class for the method for computing scaling factors for symmetric 21 * matrices in triplet format. 22 */ 23 class TSymScalingMethod: public AlgorithmStrategyObject 24 { 25 public: 26 /** @name Constructor/Destructor */ 27 //@{ TSymScalingMethod()28 TSymScalingMethod() 29 {} 30 ~TSymScalingMethod()31 ~TSymScalingMethod() 32 {} 33 //@} 34 35 /** overloaded from AlgorithmStrategyObject */ 36 virtual bool InitializeImpl(const OptionsList& options, 37 const std::string& prefix) = 0; 38 39 /** Method for computing the symmetric scaling factors, given the 40 * symmtric matrix in triplet (MA27) format. */ 41 virtual bool ComputeSymTScalingFactors(Index n, 42 Index nnz, 43 const Index* airn, 44 const Index* ajcn, 45 const Number* a, 46 Number* scaling_factors) = 0; 47 private: 48 /**@name Default Compiler Generated Methods (Hidden to avoid 49 * implicit creation/calling). These methods are not implemented 50 * and we do not want the compiler to implement them for us, so we 51 * declare them private and do not define them. This ensures that 52 * they will not be implicitly created/called. */ 53 //@{ 54 /** Copy Constructor */ 55 TSymScalingMethod(const TSymScalingMethod&); 56 57 /** Overloaded Equals Operator */ 58 void operator=(const TSymScalingMethod&); 59 }; 60 61 } // namespace Ipopt 62 63 #endif 64