7#ifndef __IPITERATESVECTOR_HPP__
8#define __IPITERATESVECTOR_HPP__
46 bool create_new =
true
568 tag +=
x()->GetTag();
572 tag +=
s()->GetTag();
576 tag +=
y_c()->GetTag();
580 tag +=
y_d()->GetTag();
584 tag +=
z_L()->GetTag();
588 tag +=
z_U()->GetTag();
592 tag +=
v_L()->GetTag();
596 tag +=
v_U()->GetTag();
697 bool create_new =
true
721 newvec->Set_y_c(y_c);
722 newvec->Set_y_d(y_d);
723 newvec->Set_z_L(z_L);
724 newvec->Set_z_U(z_U);
725 newvec->Set_v_L(v_L);
726 newvec->Set_v_U(v_U);
731 bool create_new =
true
759 DBG_ASSERT(
false &&
"This is an IteratesVectorSpace - a special compound vector for Ipopt iterates. The contained spaces should not be modified.");
CompoundVectorSpace(Index ncomp_spaces, Index total_dim)
Constructor, has to be given the number of components and the total dimension of all components combi...
Class of Vectors consisting of other vectors.
void SetComp(Index icomp, const Vector &vec)
Method for setting the pointer for a component that is a const Vector.
SmartPtr< const Vector > GetComp(Index i) const
Return a particular component (const version)
bool IsCompNull(Index i) const
Check if a particular component is null or not.
SmartPtr< Vector > GetCompNonConst(Index i)
Return a particular component (non-const version).
CompoundVector(const CompoundVectorSpace *owner_space, bool create_new)
Constructor, given the corresponding CompoundVectorSpace.
void SetCompNonConst(Index icomp, Vector &vec)
Method for setting the pointer for a component that is a non-const Vector.
Vector Space for the IteratesVector class.
virtual Vector * MakeNew() const
This method creates a new vector (and allocates space in all the contained vectors.
SmartPtr< const VectorSpace > y_d_space_
SmartPtr< const VectorSpace > x_space_
Contained Spaces.
SmartPtr< const VectorSpace > y_c_space_
virtual CompoundVector * MakeNewCompoundVector(bool create_new=true) const
Method for creating a new vector of this specific type.
IteratesVectorSpace & operator=(const IteratesVectorSpace &)
Default Assignment Operator.
SmartPtr< const VectorSpace > z_L_space_
virtual ~IteratesVectorSpace()
IteratesVectorSpace(const VectorSpace &x_space, const VectorSpace &s_space, const VectorSpace &y_c_space, const VectorSpace &y_d_space, const VectorSpace &z_L_space, const VectorSpace &z_U_space, const VectorSpace &v_L_space, const VectorSpace &v_U_space)
Constructor that takes the spaces for each of the iterates.
SmartPtr< const VectorSpace > v_U_space_
virtual IteratesVector * MakeNewIteratesVector(bool create_new=true) const
Method for creating vectors .
IteratesVectorSpace()
Default constructor.
virtual void SetCompSpace(Index, const VectorSpace &)
This method hides the CompoundVectorSpace::SetCompSpace method since the components of the Iterates a...
SmartPtr< const VectorSpace > s_space_
SmartPtr< const VectorSpace > z_U_space_
SmartPtr< const VectorSpace > v_L_space_
IteratesVectorSpace(const IteratesVectorSpace &)
Copy Constructor.
const SmartPtr< const IteratesVector > MakeNewIteratesVector(const Vector &x, const Vector &s, const Vector &y_c, const Vector &y_d, const Vector &z_L, const Vector &z_U, const Vector &v_L, const Vector &v_U)
Use this method to create a new const IteratesVector.
Specialized CompoundVector class specifically for the algorithm iterates.
SmartPtr< Vector > create_new_y_c_copy()
Create a new vector in the y_c entry and copy the current values into it.
SmartPtr< Vector > create_new_z_U_copy()
Create a new vector in the z_U entry and copy the current values into it.
SmartPtr< const Vector > v_U() const
Get the v_U iterate (const)
SmartPtr< const Vector > v_L() const
Get the v_L iterate (const)
SmartPtr< Vector > v_U_NonConst()
Get the v_U iterate (non-const) - this can only be called if the vector was created intenally,...
SmartPtr< Vector > v_L_NonConst()
Get the v_L iterate (non-const) - this can only be called if the vector was created internally,...
SmartPtr< Vector > create_new_v_L_copy()
Create a new vector in the v_L entry and copy the current values into it.
SmartPtr< Vector > create_new_v_L()
Create a new vector in the v_L entry.
SmartPtr< const Vector > x() const
Iterates Set/Get Methods.
SmartPtr< Vector > create_new_y_d()
Create a new vector in the y_d entry.
TaggedObject::Tag GetTagSum() const
Get a sum of the tags of the contained items.
SmartPtr< const Vector > z_U() const
Get the z_U iterate (const)
SmartPtr< Vector > create_new_z_L()
Create a new vector in the z_L entry.
SmartPtr< const Vector > z_L() const
Get the z_L iterate (const)
void Set_z_U_NonConst(Vector &vec)
Set the z_U iterate (non-const).
void Set_y_d(const Vector &vec)
Set the y_d iterate (const).
SmartPtr< Vector > y_d_NonConst()
Get the y_d iterate (non-const) - this can only be called if the vector was created internally,...
SmartPtr< const Vector > y_d() const
Get the y_d iterate (const)
SmartPtr< const Vector > y_c() const
Get the y_c iterate (const)
SmartPtr< Vector > create_new_z_U()
Create a new vector in the z_U entry.
SmartPtr< Vector > create_new_x()
Create a new vector in the x entry.
SmartPtr< Vector > y_c_NonConst()
Get the y_c iterate (non-const) - this can only be called if the vector was created internally,...
void Set_eq_mult(const Vector &y_c, const Vector &y_d)
Set the eq multipliers all in one shot.
void Set_y_c_NonConst(Vector &vec)
Set the y_c iterate (non-const).
SmartPtr< Vector > GetNonConstIterateFromComp(Index i)
private method to return the non-const element from the compound vector
void Set_x_NonConst(Vector &vec)
Set the x iterate (non-const).
SmartPtr< Vector > x_NonConst()
Get the x iterate (non-const) - this can only be called if the vector was created internally,...
SmartPtr< Vector > z_L_NonConst()
Get the z_L iterate (non-const) - this can only be called if the vector was created internally,...
void Set_bound_mult_NonConst(Vector &z_L, Vector &z_U, Vector &v_L, Vector &v_U)
Set the bound multipliers all in one shot.
SmartPtr< Vector > create_new_s()
Create a new vector in the s entry.
void Set_primal(const Vector &x, const Vector &s)
Set the primal variables all in one shot.
void Set_bound_mult(const Vector &z_L, const Vector &z_U, const Vector &v_L, const Vector &v_U)
Set the bound multipliers all in one shot.
SmartPtr< Vector > create_new_y_c()
Create a new vector in the y_c entry.
SmartPtr< Vector > s_NonConst()
Get the s iterate (non-const) - this can only be called if the vector was created internally,...
IteratesVector(const IteratesVector &)
Copy Constructor.
SmartPtr< Vector > create_new_s_copy()
Create a new vector in the s entry and copy the current values into it.
SmartPtr< const Vector > GetIterateFromComp(Index i) const
private method to return the const element from the compound vector
void operator=(const IteratesVector &)
Default Assignment Operator.
void Set_primal_NonConst(Vector &x, Vector &s)
SmartPtr< Vector > create_new_v_U()
Create a new vector in the v_U entry.
SmartPtr< Vector > create_new_x_copy()
Create a new vector in the x entry and copy the current values into it.
SmartPtr< Vector > create_new_y_d_copy()
Create a new vector in the y_d entry and copy the current values into it.
void Set_y_c(const Vector &vec)
Set the y_c iterate (const).
void Set_s_NonConst(Vector &vec)
Set the s iterate (non-const).
void Set_x(const Vector &vec)
Set the x iterate (const).
SmartPtr< Vector > create_new_v_U_copy()
Create a new vector in the v_U entry and copy the current values into it.
void Set_v_U_NonConst(Vector &vec)
Set the v_U iterate (non-const).
void Set_z_U(const Vector &vec)
Set the z_U iterate (const).
SmartPtr< Vector > create_new_z_L_copy()
Create a new vector in the z_L entry and copy the current values into it.
void Set_z_L_NonConst(Vector &vec)
Set the z_L iterate (non-const).
virtual ~IteratesVector()
void Set_eq_mult_NonConst(Vector &y_c, Vector &y_d)
Set the eq multipliers all in one shot.
SmartPtr< IteratesVector > MakeNewIteratesVectorCopy() const
Use this method to create a new iterates vector with a copy of all the data.
void Set_z_L(const Vector &vec)
Set the z_L iterate (const).
SmartPtr< IteratesVector > MakeNewIteratesVector(bool create_new=true) const
Make New methods.
void Set_s(const Vector &vec)
Set the s iterate (const).
const IteratesVectorSpace * owner_space_
void Set_v_L(const Vector &vec)
Set the v_L iterate (const).
SmartPtr< IteratesVector > MakeNewContainer() const
Use this method to create a new iterates vector container.
SmartPtr< const Vector > s() const
Get the s iterate (const)
SmartPtr< Vector > z_U_NonConst()
Get the z_U iterate (non-const) - this can only be called if the vector was created internally,...
IteratesVector(const IteratesVectorSpace *owner_space, bool create_new)
Constructors / Destructors.
void Set_v_L_NonConst(Vector &vec)
Set the v_L iterate (non-const).
IteratesVector()
Default Constructor.
void Set_y_d_NonConst(Vector &vec)
Set the y_d iterate (non-const).
void Set_v_U(const Vector &vec)
Set the v_U iterate (const).
Template class for Smart Pointers.
unsigned int Tag
Type for the Tag values.
VectorSpace base class, corresponding to the Vector base class.
This file contains a base class for all exceptions and a set of macros to help with exceptions.
SmartPtr< const U > ConstPtr(const SmartPtr< U > &smart_ptr)
bool IsValid(const SmartPtr< U > &smart_ptr)
ipindex Index
Type of all indices of vectors, matrices etc.