private int subspaceDimensionality(NumberVector v1,NumberVector v2,long[] pv1,long[] pv2,long[] commonPreferenceVector){
  int subspaceDim=v1.getDimensionality() - BitsUtil.cardinality(commonPreferenceVector);
  if (BitsUtil.equal(commonPreferenceVector,pv1) || BitsUtil.equal(commonPreferenceVector,pv2)) {
    double d=weightedDistance(v1,v2,commonPreferenceVector);
    if (d > 2 * epsilon) {
      subspaceDim++;
    }
  }
  return subspaceDim;
}

private int subspaceDimensionality ( NumberVector v1 , NumberVector v2 , long [ ] pv1 , long [ ] pv2 , long [ ] commonPreferenceVector ) { int subspaceDim = v1 . getDimensionality ( ) - BitsUtil . cardinality ( commonPreferenceVector ) ; if ( BitsUtil . equal ( commonPreferenceVector , pv1 ) || BitsUtil . equal ( commonPreferenceVector , pv2 ) ) { double d = weightedDistance ( v1 , v2 , commonPreferenceVector ) ; if ( d > 2 * epsilon ) { subspaceDim ++ ; } } return subspaceDim ; }
compute the common subspace dimensionality of two vectors .
