public class DoublePeakList<A extends PeakAnnotation> extends AbstractPeakList<A>
AbstractPeakList.AbstractMergePeakSink<A extends PeakAnnotation,L extends AbstractPeakList<A>>
PeakList.Precision
loadFactor, size, totalIonCurrent
Constructor and Description 

DoublePeakList()
Create an clear peak list

DoublePeakList(DoublePeakList<A> src,
PeakProcessor<A,A> peakProcessor) 
DoublePeakList(DoublePeakList<A> src,
PeakProcessorChain<A> peakProcessorChain) 
DoublePeakList(int initialCapacity)
Create a peak list that has a capacity set to initialCapacity

Modifier and Type  Method and Description 

double 
calcVectorLength()
Calculates the vector length of this peak list

DoublePeakList<A> 
copy(PeakProcessor<A,A> peakProcessor)
Return PeakList copy processed with PeakProcessor

DoublePeakList<A> 
copy(PeakProcessorChain<A> peakProcessorChain)
Return PeakList copy processed with PeakProcessorChain

int 
doAppend(double mz,
double intensity)
Add a mz, intensity pair to the peak list

protected int 
doInsert(double mz,
double intensity)
Insert the peak so that the m/z are still sorted

void 
ensureCapacity(int minCapacity)
Increases the capacity of this DoublePeakList instance, if
necessary, to ensure that it can hold at least the number of peaks
specified by the minimum capacity argument.

boolean 
equals(Object o) 
double[] 
getIntensities(double[] dest)
Copies an the intensities from this peak list, beginning at 0,
to the destination array.

double[] 
getIntensities(double[] dest,
int destPos)
Copies an the intensities from this peak list, beginning at 0,
to the specified position of the destination array.

double[] 
getIntensities(int srcPos,
double[] dest,
int destPos,
int length)
Copies an the intensities from this peak list, beginning at the specified position,
to the specified position of the destination array.

double 
getIntensity(int index)
Returns the intensity of the peak at index

int 
getMostIntenseIndex()
Returns the index of the most intense peak in the peak list or 1 if there are no peaks in this peak list.

int 
getMostIntenseIndex(double minMz,
double maxMz)
Returns the index of the most intense peak in the range minMz to maxMz.

double 
getMz(int index)
Returns the mz of the peak at index

double[] 
getMzs(double[] dest)
Copies an the mzs from this peak list, beginning at 0,
to the destination array.

double[] 
getMzs(double[] dest,
int destPos)
Copies an the mzs from this peak list, beginning at 0,
to the specified position of the destination array.

double[] 
getMzs(int srcPos,
double[] dest,
int destPos,
int length)
Copies an the mzs from this peak list, beginning at the specified position,
to the specified position of the destination array.

PeakList.Precision 
getPrecision()
Return the precision that this PeakList uses to store the peak and intensity values

int 
hashCode() 
int 
indexOf(int fromIndex,
int toIndex,
double mzKey)
Returns the index of the first occurrence of the specified mzKey
in the specified range within this peak list, or ((insertion point)  1)
if this peak list does not contain the exact mzKey.

void 
setIntensityAt(double intensity,
int index)
Replace the intensity at index with intensity

void 
trimToSize()
Trims the capacity of this DoublePeakList instance to be the
list's current size.

add, add, add, addAnnotation, addAnnotations, addPeaks, addPeaks, addPeaksNoAnnotations, addSorted, addSorted, apply, apply, apply, apply, clear, clearAnnotations, clearAnnotationsAt, cursor, getAnnotationIndexes, getAnnotations, getBasePeakIntensity, getBasePeakMz, getClosestIndex, getFirstAnnotation, getId, getLoadFactor, getPrecursor, getTotalIonCurrent, grow, hasAnnotations, hasAnnotationsAt, indexEqualOrLarger, indexEqualOrLarger, indexOf, isEmpty, rangeCheck, removeAnnotation, setId, setLoadFactor, setPrecursor, shiftAnnotations, size, sortAnnotations, toString, valueOf, valueOf
public DoublePeakList()
public DoublePeakList(int initialCapacity)
initialCapacity
 the initial capacity of the peak listpublic DoublePeakList(DoublePeakList<A> src, PeakProcessor<A,A> peakProcessor)
public DoublePeakList(DoublePeakList<A> src, PeakProcessorChain<A> peakProcessorChain)
public double getMz(int index)
index
 the indexpublic double getIntensity(int index)
index
 the indexpublic int doAppend(double mz, double intensity)
doAppend
in class AbstractPeakList<A extends PeakAnnotation>
mz
 the mz to addintensity
 the intensity to addprotected int doInsert(double mz, double intensity)
AbstractPeakList
doInsert
in class AbstractPeakList<A extends PeakAnnotation>
mz
 the peak m/zintensity
 the peak intensitypublic void trimToSize()
public int indexOf(int fromIndex, int toIndex, double mzKey)
PeakList
fromIndex
 the index of the first peak (inclusive) to be
searchedtoIndex
 the index of the last peak (exclusive) to be searchedmzKey
 the search keypublic int getMostIntenseIndex(double minMz, double maxMz)
minMz
 the minMzmaxMz
 the maxMzpublic int getMostIntenseIndex()
PeakList
public void ensureCapacity(int minCapacity)
minCapacity
 the desired minimum capacitypublic PeakList.Precision getPrecision()
PeakList
public DoublePeakList<A> copy(PeakProcessor<A,A> peakProcessor)
PeakList
peakProcessor
 the processor to process the peakspublic DoublePeakList<A> copy(PeakProcessorChain<A> peakProcessorChain)
PeakList
peakProcessorChain
 the processor chain to process the peakspublic double[] getMzs(double[] dest)
If dest
is null
, then a
new array with the correct length is created.
Otherwise, if any of the following is true, an
IndexOutOfBoundsException
is
thrown and the destination is not modified:
size()
is greater than
dest.length
, the length of the destination array.
dest
 the destination array.public double[] getMzs(double[] dest, int destPos)
destPos
through destPos+length1
,
respectively, of the destination array.
If dest
is null
, then a
new array with the correct length is created.
Otherwise, if any of the following is true, an
IndexOutOfBoundsException
is
thrown and the destination is not modified:
destPos
argument is negative.
destPos+size()
is greater than
dest.length
, the length of the destination array.
dest
 the destination array.destPos
 starting position in the destination data.public double[] getMzs(int srcPos, double[] dest, int destPos, int length)
dest
. The number of mzs copied is
equal to the length
argument. The mzs at
positions srcPos
through
srcPos+length1
in this peak list are copied into
positions destPos
through
destPos+length1
, respectively, of the destination
array.
If dest
is null
, then a
new array with the correct length is created.
Otherwise, if any of the following is true, an
IndexOutOfBoundsException
is
thrown and the destination is not modified:
srcPos
argument is negative.
destPos
argument is negative.
length
argument is negative.
srcPos+length
is greater than
size()
, the size of this.
destPos+length
is greater than
dest.length
, the length of the destination array.
srcPos
 starting position in the mz.dest
 the destination array.destPos
 starting position in the destination data.length
 the number of array elements to be copied.public double[] getIntensities(double[] dest)
If dest
is null
, then a
new array with the correct length is created.
Otherwise, if any of the following is true, an
IndexOutOfBoundsException
is
thrown and the destination is not modified:
size()
is greater than
dest.length
, the length of the destination array.
dest
 the destination array.public double[] getIntensities(double[] dest, int destPos)
destPos
through destPos+length1
,
respectively, of the destination array.
If dest
is null
, then a
new array with the correct length is created.
Otherwise, if any of the following is true, an
IndexOutOfBoundsException
is
thrown and the destination is not modified:
destPos
argument is negative.
destPos+size()
is greater than
dest.length
, the length of the destination array.
dest
 the destination array.destPos
 starting position in the destination data.public double[] getIntensities(int srcPos, double[] dest, int destPos, int length)
dest
. The number of intensities copied is
equal to the length
argument. The intensities at
positions srcPos
through
srcPos+length1
in this peak list are copied into
positions destPos
through
destPos+length1
, respectively, of the destination
array.
If dest
is null
, then a
new array with the correct length is created.
Otherwise, if any of the following is true, an
IndexOutOfBoundsException
is
thrown and the destination is not modified:
srcPos
argument is negative.
destPos
argument is negative.
length
argument is negative.
srcPos+length
is greater than
size()
, the size of this.
destPos+length
is greater than
dest.length
, the length of the destination array.
srcPos
 starting position in the mz.dest
 the destination array.destPos
 starting position in the destination data.length
 the number of array elements to be copied.public void setIntensityAt(double intensity, int index)
intensity
 the new intensityindex
 the index for which the intensity is to be setIndexOutOfBoundsException
 if the index is out of range
(index < 0  index >= size())public boolean equals(Object o)
equals
in class AbstractPeakList<A extends PeakAnnotation>
public int hashCode()
hashCode
in class AbstractPeakList<A extends PeakAnnotation>
public double calcVectorLength()
PeakList
Copyright © 2016. All Rights Reserved.