44 #ifndef ROL_INACTIVE_SET_VECTOR_HPP
45 #define ROL_INACTIVE_SET_VECTOR_HPP
64 template<
typename Real>
class InactiveSet_PrimalVector;
65 template<
typename Real>
class InactiveSet_DualVector;
68 template<
typename Real>
84 const Ptr<V>& scaling_vec,
86 const Ptr<Bnd>& bnd ) :
92 Real
dot(
const V& x )
const override {
94 auto& w = this->getWorkspace();
97 this->multiply_scaling( *y );
100 bnd_->pruneActive( *y, *
x_ );
102 return y->dot( *this->getVector() );
106 return makePtr<Primal>( this->getVector()->
clone(),
107 this->getScalingVector(),
111 Ptr<V>
basis(
const int i )
const override {
112 return makePtr<Primal>( this->getVector()->
basis(i),
113 this->getScalingVector(),
117 void const V&
dual()
const override {
118 auto& w = this->getWorkspace();
119 auto dual_vec = w.copy( this->getVector() );
120 this->multiply_scaling( dual_vec );
121 return makePtr<Dual>( dual_vec, this->getScalingVector(),
x_,
bnd_ );
132 template<
typename Real>
148 const Ptr<V>& scaling_vec,
150 const Ptr<Bnd>& bnd ) :
155 Real
dot(
const V& x )
const override {
157 auto& w = this->getWorkspace();
159 this->divide_scaling( *y, this->getScalingVector() );
162 bnd_->pruneActive( *y, *
x_ );
164 return y->dot( *this->getVector() );
168 return makePtr<Primal>( this->getVector()->
clone(),
169 this->getScalingVector(),
173 Ptr<V>
basis(
const int i )
const override {
174 return makePtr<Primal>( this->getVector()->
basis(i),
175 this->getScalingVector(),
179 void const V&
dual()
const override {
180 auto& w = this->getWorkspace();
181 auto dual_vec = w.copy( this->getVector() );
182 this->multiply( dual_vec );
183 return *( makePtr<Dual>( dual_vec, this->getScalingVector(),
x_,
bnd_ ) );
200 #endif // ROL_INACTIVE_SET_VECTOR_HPP