33 #ifndef SCALAR_SUBVECTOR_ADAPTER_HH_
34 #define SCALAR_SUBVECTOR_ADAPTER_HH_
52 template<
class InVT,
class ST>
64 void print(
const char *
const text = NULL)
const
68 {
return (
m_src.size());}
75 template<
class InVT,
class ST=CPUAlgebra::vector_type>
92 void resize(
size_t newSize,
bool bCopyValues=
true)
94 m_src.resize_exactly(newSize, bCopyValues);
96 void reserve(
size_t newCapacity,
bool bCopyValues=
true)
98 m_src.reserve_exactly(newCapacity, bCopyValues);
100 void print(
const char *
const text = NULL)
const
107 for(
size_t i=0; i<
size(); i++)
Definition: scalar_subvector_adapter.hh:53
InVT encapsulated_vector_type
Definition: scalar_subvector_adapter.hh:55
size_t size() const
Definition: scalar_subvector_adapter.hh:67
const size_t m_alpha
Definition: scalar_subvector_adapter.hh:72
void print(const char *const text=NULL) const
Definition: scalar_subvector_adapter.hh:64
const encapsulated_vector_type & m_src
Definition: scalar_subvector_adapter.hh:71
ConstScalarSubVectorAdapter(const encapsulated_vector_type &vec, size_t alpha)
Definition: scalar_subvector_adapter.hh:59
const value_type & operator[](size_t i) const
Definition: scalar_subvector_adapter.hh:61
static const int blockSize
Definition: scalar_subvector_adapter.hh:57
ST::vector_type::value_type value_type
Definition: scalar_subvector_adapter.hh:56
Definition: scalar_subvector_adapter.hh:76
value_type & operator[](size_t i)
Definition: scalar_subvector_adapter.hh:86
ScalarSubVectorAdapter(encapsulated_vector_type &vec, size_t alpha)
Definition: scalar_subvector_adapter.hh:84
ST::vector_type::value_type value_type
Definition: scalar_subvector_adapter.hh:80
void print(const char *const text=NULL) const
Definition: scalar_subvector_adapter.hh:100
void set_random(double from, double to)
Definition: scalar_subvector_adapter.hh:105
InVT encapsulated_vector_type
Definition: scalar_subvector_adapter.hh:79
const size_t m_alpha
Definition: scalar_subvector_adapter.hh:114
void resize(size_t newSize, bool bCopyValues=true)
Definition: scalar_subvector_adapter.hh:92
size_t size() const
Definition: scalar_subvector_adapter.hh:111
void reserve(size_t newCapacity, bool bCopyValues=true)
Definition: scalar_subvector_adapter.hh:96
encapsulated_vector_type & m_src
Definition: scalar_subvector_adapter.hh:113
static const int blockSize
Definition: scalar_subvector_adapter.hh:81
TNumber urand(TNumber lowerBound, TNumber upperBound)
uniform distributed random numbers in [lowerBound, upperBound[. Use srand to set a seed.
Definition: math_util_impl.hpp:67
double & BlockRef(T &vec, size_t i)
Definition: blocks.h:66
T value_type
Definition: sparsematrix_interface.h:2
Definition: cpu_algebra_types.h:77
Definition: communication_policies.h:58