1) void Vector::via(Scalar s){
_vec.erase(_vec.begin()+s);
}
2) using Scalar as double. inner product succesfully overloaded in the class.
I keep getting DIFFERENT ARRAY SIZES. I don't know where to look at..
Thank you for your help
2)Scalar AdjustedCosine::adjustedCosineSimilarity(Vector &v1,Vector &v2, Vector &means) const{
Scalar res{};
for (std::size_t i = 0; i < v1.size(); ++i){
if((v1[i]==0)||(v2[i]==0))
{
v1.via(i);
v2.via(i);
i--;
}
}
if (v1.size()==0)
{ return res;}
res = (v1*v2)/(sqrt(v1*v1)*sqrt(v2*v2)+_shrinkage);
return res;
}