Package com.carrotsearch.hppc

Examples of com.carrotsearch.hppc.DoubleArrayList


  public void populateWeights()
  {
    int i, size = s_values.size();
    b_weight = true;
   
    d_weights = new DoubleArrayList();

    for (i=0; i<size; i++)
      d_weights.add(1d);
  }
View Full Code Here


 
  public void addFeatures(StringFeatureVector vector)
  {
    List<String> types  = vector.s_types;
    List<String> values = vector.s_values;
    DoubleArrayList weights = vector.d_weights;
    int i, size = vector.size();
   
    for (i=0; i<size; i++)
    {
      s_types .add(types .get(i));
      s_values.add(values.get(i));
      if (weights != nulld_weights.add(weights.get(i));
    }
  }
View Full Code Here

 
  public void addFeatures(StringFeatureVector vector)
  {
    List<String> types  = vector.s_types;
    List<String> values = vector.s_values;
    DoubleArrayList weights = vector.d_weights;
    int i, size = vector.size();
   
    for (i=0; i<size; i++)
    {
      s_types .add(types .get(i));
      s_values.add(values.get(i));
      if (weights != nulld_weights.add(weights.get(i));
    }
  }
View Full Code Here

  /** Initializes this feature vector. */
  abstract protected void init();
 
  private void initWeights(boolean hasWeight)
  {
    d_weights = hasWeight ? new DoubleArrayList() : null;
    b_weight  = hasWeight;   
  }
View Full Code Here

  /** Initializes this feature vector. */
  abstract protected void init();
 
  private void initWeights(boolean hasWeight)
  {
    d_weights = hasWeight ? new DoubleArrayList() : null;
    b_weight  = hasWeight;   
  }
View Full Code Here

 
  public void addFeatures(StringFeatureVector vector)
  {
    List<String> types  = vector.s_types;
    List<String> values = vector.s_values;
    DoubleArrayList weights = vector.d_weights;
    int i, size = vector.size();
   
    for (i=0; i<size; i++)
    {
      s_types .add(types .get(i));
      s_values.add(values.get(i));
      if (weights != nulld_weights.add(weights.get(i));
    }
  }
View Full Code Here

                currentFieldName = parser.currentName();
            } else if (vsParser.token(currentFieldName, token, parser)) {
                continue;
            } else if (token == XContentParser.Token.START_ARRAY) {
                if (keysFieldName().equals(currentFieldName)) {
                    DoubleArrayList values = new DoubleArrayList(10);
                    while ((token = parser.nextToken()) != XContentParser.Token.END_ARRAY) {
                        double value = parser.doubleValue();
                        values.add(value);
                    }
                    keys = values.toArray();
                    Arrays.sort(keys);
                } else {
                    throw new SearchParseException(context, "Unknown key for a " + token + " in [" + aggregationName + "]: [" + currentFieldName + "].");
                }
            } else if (token == XContentParser.Token.VALUE_BOOLEAN) {
View Full Code Here

        private final DoubleArrayList values;

        public CustomDoubleNumericDocValuesField(String  name, double value) {
            super(name);
            values = new DoubleArrayList();
            add(value);
        }
View Full Code Here

TOP

Related Classes of com.carrotsearch.hppc.DoubleArrayList

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.