#include "IpZeroSymMatrix.hpp"
namespace Ipopt
{
ZeroSymMatrix::ZeroSymMatrix(
const SymMatrixSpace* owner_space
)
: SymMatrix(owner_space)
{ }
ZeroSymMatrix::~ZeroSymMatrix()
{ }
void ZeroSymMatrix::MultVectorImpl(
Number ,
const Vector& x,
Number beta,
Vector& y
) const
{
DBG_ASSERT(Dim() == x.Dim());
(void) x;
DBG_ASSERT(Dim() == y.Dim());
if( beta != 0.0 )
{
y.Scal(beta);
}
else
{
y.Set(0.0); }
}
void ZeroSymMatrix::TransMultVectorImpl(
Number ,
const Vector& x,
Number beta,
Vector& y
) const
{
DBG_ASSERT(Dim() == y.Dim());
DBG_ASSERT(Dim() == x.Dim());
(void) x;
if( beta != 0.0 )
{
y.Scal(beta);
}
else
{
y.Set(0.0); }
}
void ZeroSymMatrix::PrintImpl(
const Journalist& jnlst,
EJournalLevel level,
EJournalCategory category,
const std::string& name,
Index indent,
const std::string& prefix
) const
{
jnlst.Printf(level, category,
"\n");
jnlst.PrintfIndented(level, category, indent,
"%sZeroSymMatrix \"%s\" with %" IPOPT_INDEX_FORMAT " row and %" IPOPT_INDEX_FORMAT " column components:\n", prefix.c_str(), name.c_str(), NRows(), NCols());
}
}