Examples of trimToSize()


Examples of cern.colt.list.IntArrayList.trimToSize()

  IntArrayList matches = new IntArrayList();
  for (int i=0; i < rows; i++) {
    if (condition.apply(viewRow(i))) matches.add(i);
  }
 
  matches.trimToSize();
  return viewSelection(matches.elements(), null); // take all columns
}
/**
* Construct and returns a new selection view.
*
 
View Full Code Here

Examples of cern.colt.list.IntArrayList.trimToSize()

public ObjectMatrix1D viewSelection(cern.colt.function.ObjectProcedure condition) {
  IntArrayList matches = new IntArrayList();
  for (int i=0; i < size; i++) {
    if (condition.apply(getQuick(i))) matches.add(i);
  }
  matches.trimToSize();
  return viewSelection(matches.elements());
}
/**
* Construct and returns a new selection view.
*
 
View Full Code Here

Examples of cern.colt.list.IntArrayList.trimToSize()

public DoubleMatrix1D viewSelection(cern.colt.function.DoubleProcedure condition) {
  IntArrayList matches = new IntArrayList();
  for (int i=0; i < size; i++) {
    if (condition.apply(getQuick(i))) matches.add(i);
  }
  matches.trimToSize();
  return viewSelection(matches.elements());
}
/**
* Construct and returns a new selection view.
*
 
View Full Code Here

Examples of cern.colt.list.IntArrayList.trimToSize()

      indexList.remove(k);
      valueList.remove(k);
      int s = indexList.size();
      if (s>2 && s*3 < indexList.elements().length) {
        indexList.setSize(s*3/2);
        indexList.trimToSize();
        indexList.setSize(s);
       
        valueList.setSize(s*3/2);
        valueList.trimToSize();
        valueList.setSize(s);   
 
View Full Code Here

Examples of cern.colt.list.IntArrayList.trimToSize()

  IntArrayList matches = new IntArrayList();
  for (int i=0; i < slices; i++) {
    if (condition.apply(viewSlice(i))) matches.add(i);
  }

  matches.trimToSize();
  return viewSelection(matches.elements(), null, null); // take all rows and columns
}
/**
* Construct and returns a new selection view.
*
 
View Full Code Here

Examples of cern.colt.list.IntArrayList.trimToSize()

  IntArrayList matches = new IntArrayList();
  for (int i=0; i < rows; i++) {
    if (condition.apply(viewRow(i))) matches.add(i);
  }
 
  matches.trimToSize();
  return viewSelection(matches.elements(), null); // take all columns
}
/**
* Construct and returns a new selection view.
*
 
View Full Code Here

Examples of codec.asn1.ASN1Set.trimToSize()

      set.add(seq);

      if (entry.hasSibling()) {
    continue;
      }
      set.trimToSize();

      super.add(0, set);
      set = new ASN1Set(1);
  }
  trimToSize();
View Full Code Here

Examples of com.clearnlp.classification.vector.SparseFeatureVector.trimToSize()

        else
          sparse.addFeature(index);
      }
    }
   
    sparse.trimToSize();
    return sparse;
  }
 
  /** @return {@code true} if the specific feature index is within the range of this model. */
  public boolean isValidFeature(int featureIndex)
View Full Code Here

Examples of com.clearnlp.collection.list.FloatArrayList.trimToSize()

          tWeights.add(f_weights.get(i*n_labels+j));       
      }
    }
   
    log.info(String.format("%d -> %d\n", n_features, tFeatures));
    tWeights.trimToSize();
   
    // map
    for (String type : Lists.newArrayList(m_features.keySet()))
    {
      m = m_features.get(type);
View Full Code Here

Examples of com.tulskiy.musique.playlist.Playlist.trimToSize()

                                if (result.size() > 0) {
                                    table.clearSelection();
                                    table.getSelectionModel().setSelectionInterval(0, 0);
                                }
                                result.clear();
                                result.trimToSize();
                                viewToModelList.clear();
                                viewToModelList.trimToSize();
                            }
                        } catch (Exception ignored) {
                        }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.