10 #ifndef THYRA_VECTOR_STD_OPS_DECL_HPP
11 #define THYRA_VECTOR_STD_OPS_DECL_HPP
14 #include "Thyra_OperatorVectorTypes.hpp"
25 template<
class Scalar>
26 Scalar sum(
const VectorBase<Scalar>& v );
35 template<
class Scalar>
36 Scalar scalarProd(
const VectorBase<Scalar>& x,
const VectorBase<Scalar>& y );
45 template<
class Scalar>
46 Scalar inner(
const VectorBase<Scalar>& x,
const VectorBase<Scalar>& y );
56 template<
class Scalar>
58 norm(
const VectorBase<Scalar>& v );
65 template<
class Scalar>
67 norm_1(
const VectorBase<Scalar>& v );
74 template<
class Scalar>
76 norm_2(
const VectorBase<Scalar>& v );
84 template<
class Scalar>
86 norm_2(
const VectorBase<Scalar> &w,
const VectorBase<Scalar>& v );
93 template<
class Scalar>
95 norm_inf(
const VectorBase<Scalar>& v_rhs );
102 template<
class Scalar>
103 Scalar dot(
const VectorBase<Scalar>& x,
const VectorBase<Scalar>& y );
110 template<
class Scalar>
111 Scalar get_ele(
const VectorBase<Scalar>& v,
Ordinal i );
118 template<
class Scalar>
119 void set_ele(
Ordinal i, Scalar alpha,
const Ptr<VectorBase<Scalar> > &v );
127 template<
class Scalar>
128 void put_scalar(
const Scalar& alpha,
const Ptr<VectorBase<Scalar> > &y );
136 template<
class Scalar>
137 void copy(
const VectorBase<Scalar>& x,
const Ptr<VectorBase<Scalar> > &y );
145 template<
class Scalar>
146 void add_scalar(
const Scalar& alpha,
const Ptr<VectorBase<Scalar> > &y );
158 template<
class Scalar>
159 void scale(
const Scalar& alpha,
const Ptr<VectorBase<Scalar> > &y );
167 template<
class Scalar>
168 void abs(
const VectorBase<Scalar> &x,
const Ptr<VectorBase<Scalar> > &y );
176 template<
class Scalar>
177 void reciprocal(
const VectorBase<Scalar> &x,
const Ptr<VectorBase<Scalar> > &y );
185 template<
class Scalar>
186 void ele_wise_prod(
const Scalar& alpha,
const VectorBase<Scalar>& x,
187 const VectorBase<Scalar>& v,
const Ptr<VectorBase<Scalar> > &y );
195 template<
class Scalar>
196 void pair_wise_max(
const Scalar& alpha,
const VectorBase<Scalar>& x,
197 const VectorBase<Scalar>& v,
const Ptr<VectorBase<Scalar> > &y );
204 template<
class Scalar>
205 void ele_wise_conj_prod(
const Scalar& alpha,
const VectorBase<Scalar>& x,
206 const VectorBase<Scalar>& v,
const Ptr<VectorBase<Scalar> > &y );
214 template<
class Scalar>
215 void ele_wise_scale(
const VectorBase<Scalar>& x,
const Ptr<VectorBase<Scalar> > &y );
223 template<
class Scalar>
224 void Vp_StVtV(
const Ptr<VectorBase<Scalar> > &y,
const Scalar& alpha,
225 const VectorBase<Scalar>& x,
const VectorBase<Scalar>& v);
233 template<
class Scalar>
234 void ele_wise_prod_update(
const Scalar& alpha,
const VectorBase<Scalar>& x,
235 const Ptr<VectorBase<Scalar> > &y );
243 template<
class Scalar>
244 void pair_wise_max_update(
const Scalar& alpha,
const VectorBase<Scalar>& x,
245 const Ptr<VectorBase<Scalar> > &y );
252 template<
class Scalar>
253 void Vt_StV(
const Ptr<VectorBase<Scalar> > &y,
const Scalar& alpha,
254 const VectorBase<Scalar> &x );
262 template<
class Scalar>
263 void ele_wise_divide(
const Scalar& alpha,
const VectorBase<Scalar>& x,
264 const VectorBase<Scalar>& v,
const Ptr<VectorBase<Scalar> > &y );
289 template<
class Scalar>
290 void linear_combination(
291 const ArrayView<const Scalar> &alpha,
292 const ArrayView<
const Ptr<
const VectorBase<Scalar> > > &x,
294 const Ptr<VectorBase<Scalar> > &y
307 template<
class Scalar>
308 void seed_randomize(
unsigned int s );
321 template<
class Scalar>
322 void randomize( Scalar l, Scalar u,
const Ptr<VectorBase<Scalar> > &v );
330 template<
class Scalar>
331 void assign(
const Ptr<VectorBase<Scalar> > &y,
const Scalar& alpha );
339 template<
class Scalar>
340 void assign(
const Ptr<VectorBase<Scalar> > &y,
const VectorBase<Scalar>& x );
348 template<
class Scalar>
349 void Vp_S(
const Ptr<VectorBase<Scalar> > &y,
const Scalar& alpha );
361 template<
class Scalar>
362 void Vt_S(
const Ptr<VectorBase<Scalar> > &y,
const Scalar& alpha );
370 template<
class Scalar>
371 void V_StV(
const Ptr<VectorBase<Scalar> > &y,
const Scalar& alpha,
372 const VectorBase<Scalar> &x );
380 template<
class Scalar>
381 void Vp_StV(
const Ptr<VectorBase<Scalar> > &y,
const Scalar& alpha,
382 const VectorBase<Scalar>& x );
389 template<
class Scalar>
391 const Ptr<VectorBase<Scalar> > &y,
const VectorBase<Scalar>& x,
392 const Scalar& beta = static_cast<Scalar>(1.0)
400 template<
class Scalar>
401 void V_V(
const Ptr<VectorBase<Scalar> > &y,
const VectorBase<Scalar>& x );
408 template<
class Scalar>
409 void V_S(
const Ptr<VectorBase<Scalar> > &y,
const Scalar& alpha );
416 template<
class Scalar>
417 void V_VpV(
const Ptr<VectorBase<Scalar> > &z,
const VectorBase<Scalar>& x,
418 const VectorBase<Scalar>& y );
425 template<
class Scalar>
426 void V_VmV(
const Ptr<VectorBase<Scalar> > &z,
const VectorBase<Scalar>& x,
427 const VectorBase<Scalar>& y );
434 template<
class Scalar>
435 void V_StVpV(
const Ptr<VectorBase<Scalar> > &z,
const Scalar &alpha,
436 const VectorBase<Scalar>& x,
const VectorBase<Scalar>& y );
443 template<
class Scalar>
444 void V_VpStV(
const Ptr<VectorBase<Scalar> > &z,
445 const VectorBase<Scalar>& x,
446 const Scalar &alpha,
const VectorBase<Scalar>& y );
453 template<
class Scalar>
454 void V_StVpStV(
const Ptr<VectorBase<Scalar> > &z,
const Scalar &alpha,
455 const VectorBase<Scalar>& x,
const Scalar &beta,
const VectorBase<Scalar>& y );
462 template<
class Scalar>
463 Scalar min(
const VectorBase<Scalar>& x );
485 template<
class Scalar>
486 void min(
const VectorBase<Scalar>& x,
487 const Ptr<Scalar> &maxEle,
const Ptr<Ordinal> &maxIndex );
519 template<
class Scalar>
520 void minGreaterThanBound(
const VectorBase<Scalar>& x,
const Scalar &bound,
521 const Ptr<Scalar> &minEle,
const Ptr<Ordinal> &minIndex );
528 template<
class Scalar>
529 Scalar max(
const VectorBase<Scalar>& x );
551 template<
class Scalar>
552 void max(
const VectorBase<Scalar>& x,
553 const Ptr<Scalar> &maxEle,
const Ptr<Ordinal> &maxIndex );
584 template<
class Scalar>
585 void maxLessThanBound(
const VectorBase<Scalar>& x,
const Scalar &bound,
586 const Ptr<Scalar> &maxEle,
const Ptr<Ordinal> &maxIndex );
598 template<
class Scalar>
600 Scalar Thyra::scalarProd(
const VectorBase<Scalar>& x,
const VectorBase<Scalar>& y )
602 return x.space()->scalarProd(x, y);
606 template<
class Scalar>
608 Scalar Thyra::inner(
const VectorBase<Scalar>& x,
const VectorBase<Scalar>& y )
610 return x.space()->scalarProd(x, y);
614 template<
class Scalar>
617 Thyra::norm(
const VectorBase<Scalar>& v )
620 return ST::magnitude(ST::squareroot(v.space()->scalarProd(v, v)));
624 #endif // THYRA_VECTOR_STD_OPS_DECL_HPP
Teuchos::Ordinal Ordinal
Type for the dimension of a vector space. `*.