dwvisser.analysis
Class Multiplet

java.lang.Object
  |
  +--java.util.AbstractCollection
        |
        +--java.util.AbstractList
              |
              +--java.util.Vector
                    |
                    +--dwvisser.analysis.Multiplet
All Implemented Interfaces:
java.lang.Cloneable, java.util.Collection, java.util.List, java.util.RandomAccess, java.io.Serializable

public class Multiplet
extends java.util.Vector

Version:
Author:
jam
See Also:
Serialized Form

Field Summary
 
Fields inherited from class java.util.Vector
capacityIncrement, elementCount, elementData
 
Fields inherited from class java.util.AbstractList
modCount
 
Constructor Summary
Multiplet()
          Creates new Multiplet
Multiplet(Peak p)
           
 
Method Summary
 void addMultiplet(Multiplet madd)
           
 void addPeak(Peak p)
           
 double[] getAllCentroids()
           
 Peak[] getAllPeaks()
           
 double[] getCentroidErrors()
           
 Peak getPeak(int index)
           
 Peak getPeakNear(double centroid, double tolerance)
          Returns peak nearest given centroid if distance is less than the given tolerance.
 Multiplet lastPeaks(int n)
          Returns a new multiplet containing only the last n peaks of this multiplet.
 int removeAreaGreaterThan(double max)
          Removes all peaks with greater than the specified area.
 int removeAreaLessThan(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, get, hashCode, indexOf, indexOf, insertElementAt, isEmpty, lastElement, lastIndexOf, lastIndexOf, remove, remove, removeAll, removeAllElements, removeElement, removeElementAt, removeRange, retainAll, set, setElementAt, setSize, size, subList, toArray, toArray, toString, trimToSize
 
Methods inherited from class java.util.AbstractList
iterator, listIterator, listIterator
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.util.List
iterator, listIterator, listIterator
 

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.

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)