Ipopt Documentation  
SensIndexSchurData.hpp
Go to the documentation of this file.
1 // Copyright 2009, 2011 Hans Pirnay
2 // All Rights Reserved.
3 // This code is published under the Eclipse Public License.
4 //
5 // Date : 2009-05-08
6 
7 #ifndef __ASINDEXSCHURDATA_HPP__
8 #define __ASINDEXSCHURDATA_HPP__
9 
10 #include "SensSchurData.hpp"
11 
12 namespace Ipopt
13 {
14 
16 {
20 public:
21 
23 
25  const std::vector<Index> idx,
26  const std::vector<Index> val
27  );
28 
29  virtual ~IndexSchurData();
30 
32 
33  virtual Index GetNRowsAdded() const;
34 
35  virtual void SetData_Flag(
36  Index dim,
37  const Index* flags,
38  Number v = 1.0
39  );
40 
41  virtual void SetData_Flag(
42  Index dim,
43  const Index* flags,
44  const Number* values
45  );
46 
48  Index dim,
49  const Index* index,
50  Number v = 1.0
51  );
52 
53  virtual void SetData_List(
54  const std::vector<Index>& list,
55  Number v = 1.0
56  );
57 
58  virtual void GetRow(
59  Index i,
61  ) const;
62 
63  virtual void GetMultiplyingVectors(
64  Index i,
65  std::vector<Index>& indices,
66  std::vector<Number>& factors
67  ) const;
68 
69  virtual void Multiply(
70  const IteratesVector& v,
71  Vector& u
72  ) const;
73 
74  virtual void TransMultiply(
75  const Vector& u,
77  ) const;
78 
79  virtual void PrintImpl(
80  const Journalist& jnlst,
81  EJournalLevel level,
82  EJournalCategory category,
83  const std::string& name,
84  Index indent,
85  const std::string& prefix
86  ) const;
87 
88  /* Functions specific to IndexSchurData */
89 
101  Index dim,
102  Index* flags,
103  std::vector<Index>& delta_u_sort,
104  Index v
105  );
106 
108  std::vector<Index> cols,
109  std::vector<Index>& delta_u_sort,
110  Index& new_du_size,
111  Index v
112  );
113 
114  const std::vector<Index>* GetColIndices() const;
115 
116 private:
117 
124  const IteratesVector& v
125  ) const;
126 
127  std::vector<Index> idx_;
128  std::vector<Index> val_;
129 };
130 
131 }
132 
133 #endif
Ipopt::IndexSchurData::AddData_List
void AddData_List(std::vector< Index > cols, std::vector< Index > &delta_u_sort, Index &new_du_size, Index v)
Ipopt::IndexSchurData::Multiply
virtual void Multiply(const IteratesVector &v, Vector &u) const
Computes B*v with B in R(mxn)
Ipopt::IndexSchurData::AddData_Flag
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.
Ipopt::IndexSchurData::val_
std::vector< Index > val_
Definition: SensIndexSchurData.hpp:128
Ipopt::IndexSchurData::SetData_Index
virtual Index SetData_Index(Index dim, const Index *index, Number v=1.0)
Ipopt
This file contains a base class for all exceptions and a set of macros to help with exceptions.
Definition: IpInexactAlgBuilder.hpp:14
Ipopt::Number
double Number
Type of all numbers.
Definition: IpTypes.hpp:15
Ipopt::IndexSchurData::GetNRowsAdded
virtual Index GetNRowsAdded() const
Returns number of rows/columns in schur matrix.
Ipopt::SchurData
This interface serves as a reference point for multiple classes that need to use SchurData (PCalculat...
Definition: SensSchurData.hpp:30
Ipopt::IndexSchurData::SetData_Flag
virtual void SetData_Flag(Index dim, const Index *flags, Number v=1.0)
Set Data to one for given indices.
Ipopt::EJournalLevel
EJournalLevel
Print Level Enum.
Definition: IpJournalist.hpp:32
Ipopt::Index
int Index
Type of all indices of vectors, matrices etc.
Definition: IpTypes.hpp:17
Ipopt::IndexSchurData::GetRow
virtual void GetRow(Index i, IteratesVector &v) const
Returns the i-th column vector of the matrix.
Ipopt::SmartPtr
Template class for Smart Pointers.
Definition: IpSmartPtr.hpp:172
Ipopt::EJournalCategory
EJournalCategory
Category Selection Enum.
Definition: IpJournalist.hpp:52
Ipopt::IndexSchurData::GetVectorLengths
Index * GetVectorLengths(const IteratesVector &v) const
returns a vector that holds the accumulated length of each vector component
SensSchurData.hpp
Ipopt::IndexSchurData
Definition: SensIndexSchurData.hpp:16
Ipopt::IndexSchurData::IndexSchurData
IndexSchurData(const std::vector< Index > idx, const std::vector< Index > val)
Ipopt::IndexSchurData::SetData_Flag
virtual void SetData_Flag(Index dim, const Index *flags, const Number *values)
Set Data to corresponing Number.
Ipopt::IndexSchurData::SetData_List
virtual void SetData_List(const std::vector< Index > &list, Number v=1.0)
Ipopt::IndexSchurData::MakeNewSchurDataCopy
virtual SmartPtr< SchurData > MakeNewSchurDataCopy() const
Ipopt::IndexSchurData::GetColIndices
const std::vector< Index > * GetColIndices() const
Ipopt::IndexSchurData::GetMultiplyingVectors
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.
Ipopt::Journalist
Class responsible for all message output.
Definition: IpJournalist.hpp:117
Ipopt::IndexSchurData::IndexSchurData
IndexSchurData()
This class is the implementation aimed at applications where only SchurData matrices with entries 1 o...
Ipopt::IndexSchurData::idx_
std::vector< Index > idx_
Definition: SensIndexSchurData.hpp:127
Ipopt::Vector
Vector Base Class.
Definition: IpVector.hpp:48
Ipopt::IndexSchurData::TransMultiply
virtual void TransMultiply(const Vector &u, IteratesVector &v) const
Computes A*u with A in R(nxm), KKT in R(n,n)
Ipopt::IndexSchurData::PrintImpl
virtual void PrintImpl(const Journalist &jnlst, EJournalLevel level, EJournalCategory category, const std::string &name, Index indent, const std::string &prefix) const
Ipopt::IteratesVector
Specialized CompoundVector class specifically for the algorithm iterates.
Definition: IpIteratesVector.hpp:26
Ipopt::IndexSchurData::~IndexSchurData
virtual ~IndexSchurData()