Examples of trimToSize()


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

        indexList.setSize(s*3/2);
        indexList.trimToSize();
        indexList.setSize(s);
       
        valueList.setSize(s*3/2);
        valueList.trimToSize();
        valueList.setSize(s);   
      }
    }
    else {
      values[i].setQuick(k,value);
View Full Code Here

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

        indexList.setSize(s*3/2);
        indexList.trimToSize();
        indexList.setSize(s);
       
        valueList.setSize(s*3/2);
        valueList.trimToSize();
        valueList.setSize(s);   
      }
    }
    else {
      values[i].setQuick(k,value);
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 < 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()

  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()

  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()

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()

  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 < 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
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.