#include <AsStdSchurData.hpp>
Public Member Functions | |
StdSchurData () | |
This class is the standard implementation of the SchurData interface. | |
virtual | ~StdSchurData () |
virtual SmartPtr< SchurData > | MakeNewSchurDataCopy () const |
virtual void | SetData_Flag (Index dim, const Index *flags, Number v=1.0) |
Functions to set the Schurdata. | |
virtual void | SetData_Flag (Index dim, const Index *flags, const Number *values) |
Set Data to corresponing Number. | |
virtual Index | SetData_Index (Index dim, const Index *index, Number v=1.0) |
virtual void | SetData_List (const std::vector< Index > &list, Number v=1.0) |
virtual void | AddData_List (std::vector< Index > cols, std::vector< Index > &delta_u_sort, Index &new_du_size, Index v) |
virtual void | GetRow (Index i, IteratesVector &v) const |
Returns the i-th column vector of the matrix. | |
virtual void | GetMultiplyingVectors (Index i, std::vector< Index > &indices, std::vector< Number > &factors) const |
Returns two vectors that are needed for matrix-vector multiplication of B and P. | |
virtual void | Multiply (const IteratesVector &v, Vector &u) const |
Computes A*v with A in R(nxm), KKT in R(n,n). | |
virtual void | TransMultiply (const Vector &u, IteratesVector &v) const |
Computes B*v with B in R(mxn). | |
virtual void | PrintImpl (const Journalist &jnlst, EJournalLevel level, EJournalCategory category, const std::string &name, Index indent, const std::string &prefix) const |
Private Member Functions | |
Index * | GetVectorLengths (const IteratesVector &v) const |
returns a vector that holds the accumulated length of each vector component: v_len[0] = v.GetComp(0)->Dim() v_len[i] = sum(k=0..i, v.GetComp(k)->Dim()) | |
Private Attributes | |
std::vector< Index > | idx1_ |
Row (maximal in 1:nrows_). | |
std::vector< Index > | idx2_ |
Column (maximal in sum(i, curr()->GetComp(i)->Dim()). | |
std::vector< Number > | val_ |
value at (row,col) |
Definition at line 15 of file AsStdSchurData.hpp.
Ipopt::StdSchurData::StdSchurData | ( | ) |
This class is the standard implementation of the SchurData interface.
It uses std::vectors to save the data in lists and is build with the goals of understandability, changeability and flexibility in mind rather than performance. Use this class only for academic purposes. If you can exploit a special structure in your SchurData (e.g. all indices are ones), please do in a different implementation of the SchurData interface.
virtual Ipopt::StdSchurData::~StdSchurData | ( | ) | [virtual] |
Implements Ipopt::SchurData.
virtual void Ipopt::StdSchurData::SetData_Flag | ( | Index | dim, | |
const Index * | flags, | |||
Number | v = 1.0 | |||
) | [virtual] |
Functions to set the Schurdata.
At least one must be overloaded Set Data to one for given indices. Size of vector is ipopt_x_<full_x_
Implements Ipopt::SchurData.
virtual void Ipopt::StdSchurData::SetData_Flag | ( | Index | dim, | |
const Index * | flags, | |||
const Number * | values | |||
) | [virtual] |
Set Data to corresponing Number.
Implements Ipopt::SchurData.
virtual Index Ipopt::StdSchurData::SetData_Index | ( | Index | dim, | |
const Index * | index, | |||
Number | v = 1.0 | |||
) | [virtual] |
Implements Ipopt::SchurData.
virtual void Ipopt::StdSchurData::SetData_List | ( | const std::vector< Index > & | list, | |
Number | v = 1.0 | |||
) | [virtual] |
Implements Ipopt::SchurData.
virtual void Ipopt::StdSchurData::AddData_List | ( | std::vector< Index > | cols, | |
std::vector< Index > & | delta_u_sort, | |||
Index & | new_du_size, | |||
Index | v | |||
) | [virtual] |
Implements Ipopt::SchurData.
virtual void Ipopt::StdSchurData::GetRow | ( | Index | i, | |
IteratesVector & | v | |||
) | const [virtual] |
Returns the i-th column vector of the matrix.
Implements Ipopt::SchurData.
virtual void Ipopt::StdSchurData::GetMultiplyingVectors | ( | Index | row, | |
std::vector< Index > & | indices, | |||
std::vector< Number > & | factors | |||
) | const [virtual] |
Returns two vectors that are needed for matrix-vector multiplication of B and P.
The index is the row, the first vector are the indices of non-zero components, in this row of B, the second vector gives the numbers in B(row,indices)
Implements Ipopt::SchurData.
virtual void Ipopt::StdSchurData::Multiply | ( | const IteratesVector & | v, | |
Vector & | u | |||
) | const [virtual] |
Computes A*v with A in R(nxm), KKT in R(n,n).
Implements Ipopt::SchurData.
virtual void Ipopt::StdSchurData::TransMultiply | ( | const Vector & | u, | |
IteratesVector & | v | |||
) | const [virtual] |
Computes B*v with B in R(mxn).
Implements Ipopt::SchurData.
virtual void Ipopt::StdSchurData::PrintImpl | ( | const Journalist & | jnlst, | |
EJournalLevel | level, | |||
EJournalCategory | category, | |||
const std::string & | name, | |||
Index | indent, | |||
const std::string & | prefix | |||
) | const [virtual] |
Implements Ipopt::SchurData.
Index* Ipopt::StdSchurData::GetVectorLengths | ( | const IteratesVector & | v | ) | const [private] |
returns a vector that holds the accumulated length of each vector component: v_len[0] = v.GetComp(0)->Dim() v_len[i] = sum(k=0..i, v.GetComp(k)->Dim())
std::vector<Index> Ipopt::StdSchurData::idx1_ [private] |
Row (maximal in 1:nrows_).
Definition at line 65 of file AsStdSchurData.hpp.
std::vector<Index> Ipopt::StdSchurData::idx2_ [private] |
Column (maximal in sum(i, curr()->GetComp(i)->Dim()).
Definition at line 67 of file AsStdSchurData.hpp.
std::vector<Number> Ipopt::StdSchurData::val_ [private] |
value at (row,col)
Definition at line 69 of file AsStdSchurData.hpp.