|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectpeakml.PeakData<gPeak>
gPeak - The Peak type associated to this container.public class PeakData<gPeak extends Peak>
Implementation of a container for peak-data. This central container keeps track of peak data in arrays of basic data-types in order to reduce the memory footprint and load-times of applications using large amounts of data.
| Nested Class Summary | |
|---|---|
static interface |
PeakData.PeakFactory<gPeak extends Peak>
Interface describing a factory for the creation of instances of the generic gPeak type. |
| Field Summary | |
|---|---|
static int |
INDEX_INDEXTABLE
|
static int |
INDEX_REAL
|
| Constructor Summary | |
|---|---|
PeakData(PeakData.PeakFactory<gPeak> factory,
int size)
Creates a new PeakData instance associated to the given PeakData.PeakFactory
and of the given size. |
|
PeakData(PeakData.PeakFactory<gPeak> factory,
int size,
int[] scanids,
int[] patternids,
int[] measurementids,
double[] masses,
double[] intensities,
double[] retentiontimes)
Creates a new PeakData instance associated to the given PeakData.PeakFactory
and of the given size. |
|
PeakData(PeakData<gPeak> peakdata)
Highly optimized copy constructor, which makes a deep-copy of the data stored in the given PeakData instance. |
|
| Method Summary | |
|---|---|
PeakData.PeakFactory<gPeak> |
getFactory()
Returns the factory for the Peak type associated to this container. |
int[] |
getIndexOfMass(double mass)
... |
double[] |
getIndexTableAscendingIntensity()
|
double[] |
getIndexTableAscendingMass()
|
int[][] |
getIndicesInMassRange(double minmass,
double maxmass)
|
double[] |
getIntensities()
Returns all the intensities stored in this container. |
double |
getIntensity(int index)
Returns the intensity stored at the given index. |
double |
getMass(int index)
Returns the mass stored at the given index. |
double[] |
getMasses()
Returns all the masses stored in this container. |
int |
getMeasurementID(int index)
Returns the measurement-id stored at the given index. |
int[] |
getMeasurementIDs()
Returns all the measurement-id's stored in this container. |
int |
getPatternID(int index)
Returns the pattern-id stored at the given index. |
int[] |
getPatternIDs()
Returns all the pattern-id's stored in this container. |
gPeak |
getPeak(int index)
Returns a Peak instance using the data stored at the given index in this
container. |
java.util.Vector<gPeak> |
getPeaks()
Returns a vector with Peak instances covering all the data stored in this
container. |
double |
getRetentionTime(int index)
Returns the retention-time stored at the given index. |
double[] |
getRetentionTimes()
Returns all the retention-times stored in this container. |
int |
getScanID(int index)
Returns the scan-id stored at the given index. |
int[] |
getScanIDs()
Returns all the scan-id's stored in this container. |
int |
indexOfMaxIntensity()
|
java.util.Iterator<gPeak> |
iterator()
|
void |
set(int index,
gPeak peak)
|
void |
set(int index,
int scanid,
double retentiontime,
double mass,
double intensity)
Set all the properties of a peak at the given index at one go. |
void |
setIntensity(int index,
double intensity)
Sets the given intensity at the given index. |
void |
setMass(int index,
double mass)
Sets the given mass at the given index. |
void |
setMeasurementID(int index,
int measurementid)
Sets the given measurement-id at the given index. |
void |
setPatternID(int index,
int patternid)
Sets the given pattern-id at the given index. |
void |
setRetentionTime(int index,
double retentiontime)
Sets the given retention-time at the given index. |
void |
setScanID(int index,
int scanid)
Sets the given scan-id at the given index. |
int |
size()
Returns the size of the container. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final int INDEX_REAL
public static final int INDEX_INDEXTABLE
| Constructor Detail |
|---|
public PeakData(PeakData.PeakFactory<gPeak> factory,
int size)
PeakData instance associated to the given PeakData.PeakFactory
and of the given size. All the peak-data is initialized to -1.
factory - The factory for creating new instances of the generic gPeak type.size - The number of peaks stored in this container.
public PeakData(PeakData.PeakFactory<gPeak> factory,
int size,
int[] scanids,
int[] patternids,
int[] measurementids,
double[] masses,
double[] intensities,
double[] retentiontimes)
PeakData instance associated to the given PeakData.PeakFactory
and of the given size. The container is initialized with the given arrays (the
reference is copies, so do not remove).
factory - The factory for creating new instances of the generic gPeak type.size - The number of peaks stored in this container.scanids - Array containing all the scan-id's.patternids - Array containing all the pattern-id's.measurementids - Array containing all the measurement-id's.masses - Array containing all the masses.intensities - Array containing all the intensities.relativeintensities - Array containing all the relative-intensities.retentiontimes - Array containing all the retention-times.public PeakData(PeakData<gPeak> peakdata)
peakdata - The PeakData instance to copy.| Method Detail |
|---|
public int size()
public void set(int index,
gPeak peak)
public void set(int index,
int scanid,
double retentiontime,
double mass,
double intensity)
index - The index of the peakdata to set.scanid - The scanid.retentiontime - The retention time.mass - The mass.intensity - The intensity.public gPeak getPeak(int index)
Peak instance using the data stored at the given index in this
container.
index - The index where the data is located.
Peak instance.public java.util.Vector<gPeak> getPeaks()
Peak instances covering all the data stored in this
container.
public PeakData.PeakFactory<gPeak> getFactory()
Peak type associated to this container. The
factory can be used to create new instances.
public double[] getIndexTableAscendingMass()
public int[] getIndexOfMass(double mass)
-------------------------------- | 1 | 5 | 8 | 10 | 20 | 30 | -------------------------------- ^--> ^--> ^--> ^---> ^---> ^--->
public int[][] getIndicesInMassRange(double minmass,
double maxmass)
public double[] getIndexTableAscendingIntensity()
public int[] getScanIDs()
public int getScanID(int index)
index - The index.
public void setScanID(int index,
int scanid)
index - The index.scanid - The new scan-id.public double[] getRetentionTimes()
public double getRetentionTime(int index)
index - The index.
public void setRetentionTime(int index,
double retentiontime)
index - The index.retentiontime - The new retention-time.public double[] getMasses()
public double getMass(int index)
index - The index.
public void setMass(int index,
double mass)
index - The index.mass - The new mass.public int indexOfMaxIntensity()
public double[] getIntensities()
public double getIntensity(int index)
index - The index.
public void setIntensity(int index,
double intensity)
index - The index.intensity - The new intensity.public int[] getPatternIDs()
public int getPatternID(int index)
index - The index.
public void setPatternID(int index,
int patternid)
index - The index.patternid - The new scan-id.public int[] getMeasurementIDs()
public int getMeasurementID(int index)
index - The index.
public void setMeasurementID(int index,
int measurementid)
index - The index.measurementid - The new measurement-id.public java.util.Iterator<gPeak> iterator()
iterator in interface java.lang.Iterable<gPeak extends Peak>
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||