- Main Page
- Classes
- Files

- File List
- File Members

# src/LinAlg/IpDenseSymMatrix.hpp

Go to the documentation of this file.

    00001 // Copyright (C) 2005, 2008 International Business Machines and others.
    00002 // All Rights Reserved.
    00003 // This code is published under the Eclipse Public License.
    00004 //
    00005 // $Id: IpDenseSymMatrix.hpp 1861 2010-12-21 21:34:47Z andreasw $
    00006 //
    00007 // Authors:  Andreas Waechter             IBM    2005-12-25
    00008
    00009 #ifndef __IPDENSESYMMATRIX_HPP__
    00010 #define __IPDENSESYMMATRIX_HPP__
    00011
    00012 #include "IpUtils.hpp"
    00013 #include "IpSymMatrix.hpp"
    00014 #include "IpMultiVectorMatrix.hpp"
    00015 #include "IpDenseVector.hpp"
    00016
    00017 namespace Ipopt
    00018 {
    00019
    00021   class DenseSymMatrixSpace;
    00022
    00025   class DenseGenMatrix;
    00026
    00031   class DenseSymMatrix : public SymMatrix
    00032   {
    00033   public:
    00034
    00037
    00040     DenseSymMatrix(const DenseSymMatrixSpace* owner_space);
    00041
    00043     ~DenseSymMatrix();
    00045
    00047     SmartPtr<DenseSymMatrix> MakeNewDenseSymMatrix() const;
    00048
    00053     Number* Values()
    00054     {
    00055       ObjectChanged();
    00056       initialized_ = true;
    00057       return values_;
    00058     }
    00059
    00063     const Number* Values() const
    00064     {
    00065       DBG_ASSERT(initialized_);
    00066       return values_;
    00067     }
    00068
    00070     void FillIdentity(Number factor=1.);
    00071
    00074     void AddMatrix(Number alpha, const DenseSymMatrix& A, Number beta);
    00075
    00079     void HighRankUpdate(bool trans, Number alpha, const DenseGenMatrix& V,
    00080                         Number beta);
    00081
    00085     void HighRankUpdateTranspose(Number alpha,
    00086                                  const MultiVectorMatrix& V1,
    00087                                  const MultiVectorMatrix& V2,
    00088                                  Number beta);
    00089
    00095     void SpecialAddForLMSR1(const DenseVector& D, const DenseGenMatrix& L);
    00096
    00097   protected:
    00100     virtual void MultVectorImpl(Number alpha, const Vector &x, Number beta,
    00101                                 Vector &y) const;
    00102
    00105     virtual bool HasValidNumbersImpl() const;
    00106
    00107     virtual void ComputeRowAMaxImpl(Vector& rows_norms, bool init) const;
    00108
    00109     virtual void PrintImpl(const Journalist& jnlst,
    00110                            EJournalLevel level,
    00111                            EJournalCategory category,
    00112                            const std::string& name,
    00113                            Index indent,
    00114                            const std::string& prefix) const;
    00116
    00117
    00118   private:
    00128     DenseSymMatrix();
    00129
    00131     DenseSymMatrix(const DenseSymMatrix&);
    00132
    00134     void operator=(const DenseSymMatrix&);
    00136
    00137     const DenseSymMatrixSpace* owner_space_;
    00138
    00141     Number* values_;
    00142
    00144     bool initialized_;
    00145   };
    00146
    00149   class DenseSymMatrixSpace : public SymMatrixSpace
    00150   {
    00151   public:
    00157     DenseSymMatrixSpace(Index nDim);
    00158
    00160     ~DenseSymMatrixSpace()
    00161     {}
    00163
    00165     DenseSymMatrix* MakeNewDenseSymMatrix() const
    00166     {
    00167       return new DenseSymMatrix(this);
    00168     }
    00169
    00172     virtual SymMatrix* MakeNewSymMatrix() const
    00173     {
    00174       return MakeNewDenseSymMatrix();
    00175     }
    00176
    00177   };
    00178
    00179   inline
    00180   SmartPtr<DenseSymMatrix> DenseSymMatrix::MakeNewDenseSymMatrix() const
    00181   {
    00182     return owner_space_->MakeNewDenseSymMatrix();
    00183   }
    00184
    00185 } // namespace Ipopt
    00186 #endif

All Classes Files Functions Variables Typedefs Enumerations Enumerator Friends Defines