45 LisVector(std::size_t length,
double* data);
55 std::size_t
size()
const;
71 lis_vector_get_value(
vec_, rowId, &
v);
78 lis_vector_set_value(LIS_INS_VALUE, rowId,
v,
vec_);
84 lis_vector_set_value(LIS_ADD_VALUE, rowId,
v,
vec_);
88 void write(
const std::string& filename)
const;
94 template <
class T_SUBVEC>
95 void set(
const std::vector<IndexType>& pos,
const T_SUBVEC& sub_vec)
97 for (std::size_t i = 0; i < pos.size(); ++i)
99 set(pos[i], sub_vec[i]);
104 template <
class T_SUBVEC>
105 void add(
const std::vector<IndexType>& pos,
const T_SUBVEC& sub_vec)
107 for (std::size_t i = 0; i < pos.size(); ++i)
109 add(pos[i], sub_vec[i]);
119 lis_vector_get_values(
vec_, 0,
size(),
u.data());
Lis vector wrapper class.
void add(IndexType rowId, double v)
add entry
LisVector(std::size_t length)
void add(const std::vector< IndexType > &pos, const T_SUBVEC &sub_vec)
add entries
void copyValues(std::vector< double > &u) const
std::size_t getRangeEnd() const
return an end index of the active data range
void write(const std::string &filename) const
printout this equation for debugging
void set(const std::vector< IndexType > &pos, const T_SUBVEC &sub_vec)
set entries
void set(IndexType rowId, double v)
set entry
LIS_VECTOR & getRawVector()
return a raw Lis vector object
std::size_t size() const
return a vector length
double get(IndexType rowId) const
get entry
double operator[](IndexType rowId) const
access entry
std::size_t getRangeBegin() const
return a start index of the active data range