42 #ifndef ABSTRACT_LINALG_PACK_VECTOR_STD_OPS_H
43 #define ABSTRACT_LINALG_PACK_VECTOR_STD_OPS_H
45 #include "AbstractLinAlgPack_VectorMutable.hpp"
47 namespace AbstractLinAlgPack {
58 value_type
sum(
const Vector& v_rhs );
62 value_type
dot(
const Vector& v_rhs1,
const Vector& v_rhs2 );
66 value_type
dot(
const Vector& v_rhs1,
const SpVectorSlice& sv_rhs2 );
70 value_type
dot(
const SpVectorSlice& sv_rhs1,
const Vector& v_rhs2 );
87 void max_abs_ele(
const Vector& v, value_type* max_v_j, index_type* max_j );
96 void Vp_S( VectorMutable* v_lhs,
const value_type& alpha );
104 void Vt_S( VectorMutable* v_lhs,
const value_type& alpha );
108 void Vp_StV( VectorMutable* v_lhs,
const value_type& alpha,
const Vector& v_rhs );
112 void Vp_StV( VectorMutable* v_lhs,
const value_type& alpha,
const SpVectorSlice& sv_rhs );
117 const value_type& alpha,
const Vector& v_rhs1,
const Vector& v_rhs2
118 ,VectorMutable* v_lhs );
123 const value_type& alpha,
const Vector& v_rhs1,
const Vector& v_rhs2
124 ,VectorMutable* v_lhs );
135 void random_vector( value_type l, value_type u, VectorMutable* v );
163 AbstractLinAlgPack::value_type
166 return dot(v_rhs2,sv_rhs1);
169 #endif // ABSTRACT_LINALG_PACK_VECTOR_STD_OPS_H
Abstract interface for immutable, finite dimensional, coordinate vectors {abstract}.
void sign(const Vector &v, VectorMutable *z)
Compute the sign of each element in an input vector.
void Vt_S(VectorMutable *v_lhs, const value_type &alpha)
v_lhs *= alpha
void seed_random_vector_generator(unsigned int)
Seed the random number generator.
void ele_wise_divide(const value_type &alpha, const Vector &v_rhs1, const Vector &v_rhs2, VectorMutable *v_lhs)
v_lhs(i) = alpha * v_rhs1(i) / v_rhs2(i), i = 1,,,dim.
void Vp_StV(VectorMutable *v_lhs, const value_type &alpha, const SpVectorSlice &sv_rhs)
v_lhs = alpha * sv_rhs + v_lhs
void ele_wise_prod(const value_type &alpha, const Vector &v_rhs1, const Vector &v_rhs2, VectorMutable *v_lhs)
v_lhs(i) += alpha * v_rhs1(i) * v_rhs2(i), i = 1,,,dim.
void Vp_S(VectorMutable *v_lhs, const value_type &alpha)
v_lhs += alpha
value_type dot(const SpVectorSlice &sv_rhs1, const Vector &v_rhs2)
result = sv_rhs1' * v_rhs2
void max_abs_ele(const Vector &v, value_type *max_v_j, index_type *max_j)
Compute the maximum element in a vector.
value_type sum(const Vector &v_rhs)
result = sum( v_rhs(i), i = 1,,,dim )
void random_vector(value_type l, value_type u, VectorMutable *v)
Generate a random vector with elements uniformly distrubuted elements.