Ipopt Documentation  
 
Loading...
Searching...
No Matches
Ipopt::IndexSchurData Class Reference

#include <SensIndexSchurData.hpp>

+ Inheritance diagram for Ipopt::IndexSchurData:

Public Member Functions

 IndexSchurData ()
 This class is the implementation aimed at applications where only SchurData matrices with entries 1 or -1 appear.
 
 IndexSchurData (const std::vector< Index > idx, const std::vector< Index > val)
 
virtual ~IndexSchurData ()
 
virtual SmartPtr< SchurDataMakeNewSchurDataCopy () const
 
virtual Index GetNRowsAdded () const
 Returns number of rows/columns in schur matrix.
 
virtual void SetData_Flag (Index dim, const Index *flags, Number v=1.0)
 Set Data to one for given indices.
 
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 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 B*v with B in R(mxn)
 
virtual void TransMultiply (const Vector &u, IteratesVector &v) const
 Computes A*u with A in R(nxm), KKT in R(n,n)
 
virtual void PrintImpl (const Journalist &jnlst, EJournalLevel level, EJournalCategory category, const std::string &name, Index indent, const std::string &prefix) const
 
void AddData_Flag (Index dim, Index *flags, std::vector< Index > &delta_u_sort, Index v)
 This function is for adding data to a SchurData object.
 
void AddData_List (std::vector< Index > cols, std::vector< Index > &delta_u_sort, Index &new_du_size, Index v)
 
const std::vector< Index > * GetColIndices () const
 
- Public Member Functions inherited from Ipopt::SchurData
 SchurData ()
 
virtual ~SchurData ()
 
virtual bool Is_Initialized () const
 
void Print (const Journalist &jnlst, EJournalLevel level, EJournalCategory category, const std::string &name, Index indent=0, const std::string &prefix="") const
 
void Print (SmartPtr< const Journalist > jnlst, EJournalLevel level, EJournalCategory category, const std::string &name, Index indent, const std::string &prefix) const
 
- Public Member Functions inherited from Ipopt::ReferencedObject
 ReferencedObject ()
 
virtual ~ReferencedObject ()
 
Index ReferenceCount () const
 
void AddRef (const Referencer *referencer) const
 
void ReleaseRef (const Referencer *referencer) const
 

Private Member Functions

IndexGetVectorLengths (const IteratesVector &v) const
 returns a vector that holds the accumulated length of each vector component
 

Private Attributes

std::vector< Indexidx_
 
std::vector< Indexval_
 

Additional Inherited Members

- Protected Member Functions inherited from Ipopt::SchurData
virtual void Set_Initialized ()
 
virtual void Set_NRows (Index nrows)
 

Detailed Description

Definition at line 15 of file SensIndexSchurData.hpp.

Constructor & Destructor Documentation

◆ IndexSchurData() [1/2]

Ipopt::IndexSchurData::IndexSchurData ( )

This class is the implementation aimed at applications where only SchurData matrices with entries 1 or -1 appear.

◆ IndexSchurData() [2/2]

Ipopt::IndexSchurData::IndexSchurData ( const std::vector< Index idx,
const std::vector< Index val 
)

◆ ~IndexSchurData()

virtual Ipopt::IndexSchurData::~IndexSchurData ( )
virtual

Member Function Documentation

◆ MakeNewSchurDataCopy()

virtual SmartPtr< SchurData > Ipopt::IndexSchurData::MakeNewSchurDataCopy ( ) const
virtual

Implements Ipopt::SchurData.

◆ GetNRowsAdded()

virtual Index Ipopt::IndexSchurData::GetNRowsAdded ( ) const
virtual

Returns number of rows/columns in schur matrix.

Reimplemented from Ipopt::SchurData.

◆ SetData_Flag() [1/2]

virtual void Ipopt::IndexSchurData::SetData_Flag ( Index  dim,
const Index flags,
Number  v = 1.0 
)
virtual

Set Data to one for given indices.

Size of vector is ipopt_x_<full_x_

Implements Ipopt::SchurData.

◆ SetData_Flag() [2/2]

virtual void Ipopt::IndexSchurData::SetData_Flag ( Index  dim,
const Index flags,
const Number values 
)
virtual

Set Data to corresponing Number.

Implements Ipopt::SchurData.

◆ SetData_Index()

virtual Index Ipopt::IndexSchurData::SetData_Index ( Index  dim,
const Index index,
Number  v = 1.0 
)
virtual

Implements Ipopt::SchurData.

◆ SetData_List()

virtual void Ipopt::IndexSchurData::SetData_List ( const std::vector< Index > &  list,
Number  v = 1.0 
)
virtual

Implements Ipopt::SchurData.

◆ GetRow()

virtual void Ipopt::IndexSchurData::GetRow ( Index  i,
IteratesVector v 
) const
virtual

Returns the i-th column vector of the matrix.

Implements Ipopt::SchurData.

◆ GetMultiplyingVectors()

virtual void Ipopt::IndexSchurData::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.

◆ Multiply()

virtual void Ipopt::IndexSchurData::Multiply ( const IteratesVector v,
Vector u 
) const
virtual

Computes B*v with B in R(mxn)

Implements Ipopt::SchurData.

◆ TransMultiply()

virtual void Ipopt::IndexSchurData::TransMultiply ( const Vector u,
IteratesVector v 
) const
virtual

Computes A*u with A in R(nxm), KKT in R(n,n)

Implements Ipopt::SchurData.

◆ PrintImpl()

virtual void Ipopt::IndexSchurData::PrintImpl ( const Journalist jnlst,
EJournalLevel  level,
EJournalCategory  category,
const std::string &  name,
Index  indent,
const std::string &  prefix 
) const
virtual

Implements Ipopt::SchurData.

◆ AddData_Flag()

void Ipopt::IndexSchurData::AddData_Flag ( Index  dim,
Index flags,
std::vector< Index > &  delta_u_sort,
Index  v 
)

This function is for adding data to a SchurData object.

It takes a set of column-indices a value v and adds indices accordingly. If the column is already set in the data, it stays at the same place, otherwise the new indices are added at the bottom, in the order specified by the indices. The vector delta_u_sort returns the actual sorting so that the user knows how to place the new values inside the elongated delta_u vector. These places are in C++ index style, so they correspond exactly to the indices used for the C++-array of the delta_u DenseVector.

◆ AddData_List()

void Ipopt::IndexSchurData::AddData_List ( std::vector< Index cols,
std::vector< Index > &  delta_u_sort,
Index new_du_size,
Index  v 
)
virtual

Implements Ipopt::SchurData.

◆ GetColIndices()

const std::vector< Index > * Ipopt::IndexSchurData::GetColIndices ( ) const

◆ GetVectorLengths()

Index * Ipopt::IndexSchurData::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())

Member Data Documentation

◆ idx_

std::vector<Index> Ipopt::IndexSchurData::idx_
private

Definition at line 127 of file SensIndexSchurData.hpp.

◆ val_

std::vector<Index> Ipopt::IndexSchurData::val_
private

Definition at line 128 of file SensIndexSchurData.hpp.


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