jhpro.tseries
Class Multiplet
- java.lang.Object
-
- java.util.AbstractCollection<E>
-
- java.util.AbstractList<E>
-
- java.util.Vector<Peak>
-
- jhpro.tseries.Multiplet
-
- All Implemented Interfaces:
- java.io.Serializable, java.lang.Cloneable, java.lang.Iterable<Peak>, java.util.Collection<Peak>, java.util.List<Peak>, java.util.RandomAccess
public class Multiplet extends java.util.Vector<Peak>
Class designed to store peaks.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor and Description Multiplet()Creates new MultipletMultiplet(Peak p)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description voidaddMultiplet(Multiplet madd)voidaddPeak(Peak p)double[]getAllCentroids()Peak[]getAllPeaks()double[]getCentroidErrors()PeakgetPeak(int index)PeakgetPeakNear(double centroid, double tolerance)Returns peak nearest given centroid if distance is less than the given tolerance.MultipletlastPeaks(int n)Returns a new multiplet containing only the last n peaks of this multiplet.intremoveAreaGreaterThan(double max)Removes all peaks with greater than the specified area.intremoveAreaLessThan(double min)Removes all peaks with less than the specified area.-
Methods inherited from class java.util.Vector
add, add, addAll, addAll, addElement, capacity, clear, clone, contains, containsAll, copyInto, elementAt, elements, ensureCapacity, equals, firstElement, forEach, get, hashCode, indexOf, indexOf, insertElementAt, isEmpty, iterator, lastElement, lastIndexOf, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, removeAllElements, removeElement, removeElementAt, removeIf, replaceAll, retainAll, set, setElementAt, setSize, size, sort, spliterator, subList, toArray, toArray, toString, trimToSize
-
-
-
-
Constructor Detail
-
Multiplet
public Multiplet()
Creates new Multiplet
-
Multiplet
public Multiplet(Peak p)
-
-
Method Detail
-
getAllPeaks
public Peak[] getAllPeaks()
-
getAllCentroids
public double[] getAllCentroids()
-
getCentroidErrors
public double[] getCentroidErrors()
-
addMultiplet
public void addMultiplet(Multiplet madd)
-
removeAreaLessThan
public int removeAreaLessThan(double min)
Removes all peaks with less than the specified area.- Parameters:
min- minimum area to retain the peak- Returns:
- number of peaks remaining
-
removeAreaGreaterThan
public int removeAreaGreaterThan(double max)
Removes all peaks with greater than the specified area.- Parameters:
min- minimum area to retain the peak- Returns:
- number of peaks remaining
-
getPeakNear
public Peak getPeakNear(double centroid, double tolerance)
Returns peak nearest given centroid if distance is less than the given tolerance.
-
lastPeaks
public Multiplet lastPeaks(int n)
Returns a new multiplet containing only the last n peaks of this multiplet.
-
addPeak
public void addPeak(Peak p)
-
getPeak
public Peak getPeak(int index)
-
-
DMelt 3.0 © DataMelt by jWork.ORG