public float dotProduct(DenseVector df){
  float res=0.0f;
  for (int i=0; i < Math.min(size,df.getLength()); i++) {
    res+=u[i] * df.u[i];
  }
  return res;
}

public float dotProduct ( DenseVector df ) { float res = 0.0f ; for ( int i = 0 ; i < Math . min ( size , df . getLength ( ) ) ; i ++ ) { res += u [ i ] * df . u [ i ] ; } return res ; }
return the dot product to a dense feature vector
