00001
00002
00003
00004
00005
00006
00007
00008
00009 #ifndef __IPZEROSYMMATRIX_HPP__
00010 #define __IPZEROSYMMATRIX_HPP__
00011
00012 #include "IpUtils.hpp"
00013 #include "IpSymMatrix.hpp"
00014
00015 namespace Ipopt
00016 {
00017
00020 class ZeroSymMatrix : public SymMatrix
00021 {
00022 public:
00023
00026
00029 ZeroSymMatrix(const SymMatrixSpace* owner_space);
00030
00032 ~ZeroSymMatrix();
00034
00035 protected:
00038 virtual void MultVectorImpl(Number alpha, const Vector& x,
00039 Number beta, Vector& y) const;
00040
00041 virtual void TransMultVectorImpl(Number alpha, const Vector& x,
00042 Number beta, Vector& y) const;
00043
00044 virtual void ComputeRowAMaxImpl(Vector& rows_norms, bool init) const
00045 {}
00046
00047 virtual void ComputeColAMaxImpl(Vector& cols_norms, bool init) const
00048 {}
00049
00050 virtual void PrintImpl(const Journalist& jnlst,
00051 EJournalLevel level,
00052 EJournalCategory category,
00053 const std::string& name,
00054 Index indent,
00055 const std::string& prefix) const;
00057
00058 private:
00068 ZeroSymMatrix();
00069
00071 ZeroSymMatrix(const ZeroSymMatrix&);
00072
00074 void operator=(const ZeroSymMatrix&);
00076 };
00077
00079 class ZeroSymMatrixSpace : public SymMatrixSpace
00080 {
00081 public:
00086 ZeroSymMatrixSpace(Index dim)
00087 :
00088 SymMatrixSpace(dim)
00089 {}
00090
00092 virtual ~ZeroSymMatrixSpace()
00093 {}
00095
00098 virtual Matrix* MakeNew() const
00099 {
00100 return MakeNewZeroSymMatrix();
00101 }
00102
00105 virtual SymMatrix* MakeNewSymMatrix() const
00106 {
00107 return MakeNewZeroSymMatrix();
00108 }
00109
00111 ZeroSymMatrix* MakeNewZeroSymMatrix() const
00112 {
00113 return new ZeroSymMatrix(this);
00114 }
00115 private:
00125 ZeroSymMatrixSpace();
00126
00128 ZeroSymMatrixSpace(const ZeroSymMatrixSpace&);
00129
00131 void operator=(const ZeroSymMatrixSpace&);
00133 };
00134 }
00135 #endif