package yi.iu.imgdb.learn;

/**
 * Only pick the feature has the same value as specified
 */

public class ConstantFeaturePicker implements FeaturePickable {
  /**
   * feature vector to be matched
   */
  double[] m_targetFeature;
  public ConstantFeaturePicker(double[] target) {
    m_targetFeature = target;
  }

  public boolean isFeaturePick(double[] feature, Object object) {
    for (int i=0; i<feature.length; i++) {
      if (feature[i] != m_targetFeature[i]) return false;
    }
    return true;
  }

}