- Main Page
- Namespaces
- Classes
- Files

- Alphabetical List
- Class List
- Class Hierarchy
- Class Members

# Ipopt::DiagMatrix Class Reference

Class for diagonal matrices. More...

`#include <IpDiagMatrix.hpp>`

Inheritance diagram for Ipopt::DiagMatrix:

[legend]
Collaboration diagram for Ipopt::DiagMatrix:

[legend]
List of all members.

## Public Member Functions
void | SetDiag (const Vector &diag)
| Method for setting the diagonal elements (as a Vector).
SmartPtr< const Vector > | GetDiag () const
| Method for setting the diagonal elements.
Constructors / Destructors
| DiagMatrix (const SymMatrixSpace *owner_space)
| Constructor, given the corresponding matrix space.
| ~DiagMatrix ()
| Destructor.
## Protected Member Functions
Methods overloaded from matrix
virtual void | MultVectorImpl (Number alpha, const Vector &x, Number beta, Vector &y) const
| Matrix-vector multiply.
virtual bool | HasValidNumbersImpl () const
| Method for determining if all stored numbers are valid (i.e., no Inf or Nan).
virtual void | ComputeRowAMaxImpl (Vector &rows_norms, bool init) const
| Compute the max-norm of the rows in the matrix.
virtual void | PrintImpl (const Journalist &jnlst, EJournalLevel level, EJournalCategory category, const std::string &name, Index indent, const std::string &prefix) const
| Print detailed information about the matrix.
## Private Member Functions
Default Compiler Generated Methods
(Hidden to avoid implicit creation/calling). These methods are not implemented and we do not want the compiler to implement them for us, so we declare them private and do not define them. This ensures that they will not be implicitly created/called.
| DiagMatrix ()
| Default Constructor.
| DiagMatrix (const DiagMatrix &)
| Copy Constructor.
void | operator= (const DiagMatrix &)
| Overloaded Equals Operator.
## Private Attributes
SmartPtr< const Vector > | diag_
| Vector storing the diagonal elements.

## Detailed Description

Class for diagonal matrices.

The diagonal is stored as a Vector.

Definition at line 20 of file IpDiagMatrix.hpp.

## Constructor & Destructor Documentation

Ipopt::DiagMatrix::DiagMatrix | ( | const SymMatrixSpace * | owner_space | ) |

Constructor, given the corresponding matrix space.

Ipopt::DiagMatrix::~DiagMatrix | ( |  | ) |

Destructor.

Ipopt::DiagMatrix::DiagMatrix | ( |  | ) | `[private]`

Default Constructor.

Ipopt::DiagMatrix::DiagMatrix | ( | const DiagMatrix & |  | ) | `[private]`

Copy Constructor.

## Member Function Documentation

void Ipopt::DiagMatrix::SetDiag | ( | const Vector & | diag | ) | `[inline]`

Method for setting the diagonal elements (as a Vector).

Definition at line 35 of file IpDiagMatrix.hpp.

References diag_.

SmartPtr<const Vector> Ipopt::DiagMatrix::GetDiag | ( |  | ) | const`[inline]`

Method for setting the diagonal elements.

Definition at line 41 of file IpDiagMatrix.hpp.

References diag_.

virtual void Ipopt::DiagMatrix::MultVectorImpl | ( | Number | alpha,
|  | const Vector & | x,
|  | Number | beta,
|  | Vector & | y |
| ) |  |  | const`[protected, virtual]`

Matrix-vector multiply.

Computes y = alpha * Matrix * x + beta * y

Implements Ipopt::Matrix.

virtual bool Ipopt::DiagMatrix::HasValidNumbersImpl | ( |  | ) | const`[protected, virtual]`

Method for determining if all stored numbers are valid (i.e., no Inf or Nan).

Reimplemented from Ipopt::Matrix.

virtual void Ipopt::DiagMatrix::ComputeRowAMaxImpl | ( | Vector & | rows_norms,
|  | bool | init |
| ) |  |  | const`[protected, virtual]`

Compute the max-norm of the rows in the matrix.

The result is stored in rows_norms. The vector is assumed to be initialized.

Implements Ipopt::Matrix.

virtual void Ipopt::DiagMatrix::PrintImpl | ( | const Journalist & | jnlst,
|  | EJournalLevel | level,
|  | EJournalCategory | category,
|  | const std::string & | name,
|  | Index | indent,
|  | const std::string & | prefix |
| ) |  |  | const`[protected, virtual]`

Print detailed information about the matrix.

Implements Ipopt::Matrix.

void Ipopt::DiagMatrix::operator= | ( | const DiagMatrix & |  | ) | `[private]`

Overloaded Equals Operator.

## Member Data Documentation

SmartPtr<const Vector> Ipopt::DiagMatrix::diag_`[private]`

Vector storing the diagonal elements.

Definition at line 86 of file IpDiagMatrix.hpp.

Referenced by GetDiag(), and SetDiag().

The documentation for this class was generated from the following file:

- /home/coin/SVN-release/Ipopt-3.5.1/Ipopt/src/LinAlg/IpDiagMatrix.hpp