29 CSVec& operator=(
const CSVec& invec);
31 std::vector<int>& indices() {
return indices_;}
32 const std::vector<int>& indices()
const {
return indices_;}
33 std::vector<double>& coefs() {
return coefs_;}
34 const std::vector<double>& coefs()
const {
return coefs_;}
36 size_t size()
const {
return indices_.size();}
38 void clear() { indices_.clear(); coefs_.clear(); }
40 bool operator==(
const CSVec& rhs)
const {
41 return indices_==rhs.indices_ && coefs_==rhs.coefs_;
44 bool operator!=(
const CSVec& rhs)
const {
45 return indices_!=rhs.indices_ || coefs_!=rhs.coefs_;
48 void subtract(
const CSVec& rhs);
51 std::vector<int> indices_;
52 std::vector<double> coefs_;