IpZeroMatrix.hpp

Go to the documentation of this file.
00001 // Copyright (C) 2004, 2006 International Business Machines and others.
00002 // All Rights Reserved.
00003 // This code is published under the Common Public License.
00004 //
00005 // $Id: IpZeroMatrix.hpp 759 2006-07-07 03:07:08Z andreasw $
00006 //
00007 // Authors:  Carl Laird, Andreas Waechter     IBM    2004-08-13
00008 
00009 #ifndef __IPZEROMATRIX_HPP__
00010 #define __IPZEROMATRIX_HPP__
00011 
00012 #include "IpUtils.hpp"
00013 #include "IpMatrix.hpp"
00014 
00015 namespace Ipopt
00016 {
00017 
00020   class ZeroMatrix : public Matrix
00021   {
00022   public:
00023 
00026 
00029     ZeroMatrix(const MatrixSpace* owner_space);
00030 
00032     ~ZeroMatrix();
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 PrintImpl(const Journalist& jnlst,
00045                            EJournalLevel level,
00046                            EJournalCategory category,
00047                            const std::string& name,
00048                            Index indent,
00049                            const std::string& prefix) const;
00051 
00052   private:
00062     ZeroMatrix();
00063 
00065     ZeroMatrix(const ZeroMatrix&);
00066 
00068     void operator=(const ZeroMatrix&);
00070   };
00071 
00073   class ZeroMatrixSpace : public MatrixSpace
00074   {
00075   public:
00080     ZeroMatrixSpace(Index nrows, Index ncols)
00081         :
00082         MatrixSpace(nrows, ncols)
00083     {}
00084 
00086     virtual ~ZeroMatrixSpace()
00087     {}
00089 
00092     virtual Matrix* MakeNew() const
00093     {
00094       return MakeNewZeroMatrix();
00095     }
00096 
00098     ZeroMatrix* MakeNewZeroMatrix() const
00099     {
00100       return new ZeroMatrix(this);
00101     }
00102   private:
00112     ZeroMatrixSpace();
00113 
00115     ZeroMatrixSpace(const ZeroMatrixSpace&);
00116 
00118     void operator=(const ZeroMatrixSpace&);
00120   };
00121 } // namespace Ipopt
00122 #endif

Generated on Fri Sep 26 07:44:13 2008 for SimTKcore by  doxygen 1.5.6