SliceSparseMatrix { public List<Triplet> removeDataPoints(int roundedmz, int lowerScanBound, int upperScanBound) { Triplet searchTriplet = new Triplet(); for (int i = lowerScanBound; i <= upperScanBound; i++) { searchTriplet.mz = roundedmz; searchTriplet.scanListIndex = i; int index = Collections.binarySearch(filterListOfTriplet, searchTriplet, compareScanMz); if (index >= 0) { Triplet triplet = filterListOfTriplet.get(index); triplet.removed = 1; } } return filterListOfTriplet; } SliceSparseMatrix(RawDataFile rawFile);  SliceSparseMatrix(RawDataFile rawFile, Predicate<MsScan> msScanPredicate); List<Triplet> getHorizontalSlice(double mz, int lowerScanBound, int upperScanBound); List<Triplet> getHorizontalSlice(int roundedMZ, int lowerScanBound, int upperScanBound); List<VerticalSliceDataPoint> getVerticalSlice(int scanNumber); Triplet findNextMaxIntensity(); List<ContinuousWaveletTransform.DataPoint> getCWTDataPoint(List<Triplet> slice); List<Triplet> removeDataPoints(int roundedmz, int lowerScanBound, int upperScanBound); List<Triplet> restoreDataPoints(int roundedmz, int lowerScanBound, int upperScanBound); int roundMZ(double mz); void setMaxIntensityIndexZero(); int getSizeOfRawDataFile(); float[] getRetentionTimeArray(int lowerScanBound, int upperScanbound); float[] getIntensities(GoodPeakInfo peak); double getRetentionTime(int scanNumber); float getFinishedPercent(Triplet maxIntensityTriplet); double numOfScans(); final List<Integer> mzValues; }
@Test public void testRemoveDataPoints() throws MSDKException, IOException { List<Triplet> updatedTripletList = objSliceSparseMatrix.removeDataPoints(1810596, 50, 77); for (int i = 0; i < updatedTripletList.size(); i++) { SliceSparseMatrix.Triplet triplet = updatedTripletList.get(i); if (triplet.removed == 1) { Assert.assertEquals(51, triplet.scanListIndex); break; } } }