/** * return the dot product of a sparse feature vector and the dense vector * itself. Note that if the sparse vector contains some elements (feature * indexes) that do not exist in the dense vector, the dot product function * will ignore them (instead of throwing an exception) * * @param fv * Sparse feature vector * @return */ public double dotProduct(FeatureVector fv) { double ret = dotProduct(u, fv); return ret; }