Struct mzdata::spectrum::bindata::BinaryArrayMap
source · pub struct BinaryArrayMap {
pub byte_buffer_map: HashMap<ArrayType, DataArray>,
}
Fields§
§byte_buffer_map: HashMap<ArrayType, DataArray>
Implementations§
source§impl BinaryArrayMap
impl BinaryArrayMap
pub fn new() -> BinaryArrayMap
pub fn is_empty(&self) -> bool
sourcepub fn has_ion_mobility(&self) -> bool
pub fn has_ion_mobility(&self) -> bool
Check if there is an ion mobility array present
sourcepub fn iter(&self) -> Iter<'_, ArrayType, DataArray>
pub fn iter(&self) -> Iter<'_, ArrayType, DataArray>
Iterate over references to the key-value pairs of this map
pub fn par_iter(&self) -> Iter<'_, ArrayType, DataArray>
sourcepub fn iter_mut(&mut self) -> IterMut<'_, ArrayType, DataArray>
pub fn iter_mut(&mut self) -> IterMut<'_, ArrayType, DataArray>
Iterate over mutable references to the key-value pairs of this map
pub fn par_iter_mut(&mut self) -> IterMut<'_, ArrayType, DataArray>
sourcepub fn decode_all_arrays(&mut self) -> Result<(), ArrayRetrievalError>
pub fn decode_all_arrays(&mut self) -> Result<(), ArrayRetrievalError>
Decode all DataArray
in this map. If there are many arrays and the
parallelism
feature is enabled, each array will be decoded on a separate
thread.
sourcepub fn decode_array(
&mut self,
array_type: &ArrayType
) -> Result<(), ArrayRetrievalError>
pub fn decode_array( &mut self, array_type: &ArrayType ) -> Result<(), ArrayRetrievalError>
Decode a specific DataArray
if it is present.
This method may fail if decoding fails or if the array type is missing.
sourcepub fn get(&self, array_type: &ArrayType) -> Option<&DataArray>
pub fn get(&self, array_type: &ArrayType) -> Option<&DataArray>
Get a reference to a specific DataArray
if present
sourcepub fn get_mut(&mut self, array_type: &ArrayType) -> Option<&mut DataArray>
pub fn get_mut(&mut self, array_type: &ArrayType) -> Option<&mut DataArray>
Get a mutable reference to a specific DataArray
if present
sourcepub fn has_array(&self, array_type: &ArrayType) -> bool
pub fn has_array(&self, array_type: &ArrayType) -> bool
Check whether a specific ArrayType
is present
sourcepub fn search(&self, query: f64, error_tolerance: Tolerance) -> Option<usize>
pub fn search(&self, query: f64, error_tolerance: Tolerance) -> Option<usize>
Search for a specific m/z
sourcepub fn mzs(&self) -> Result<Cow<'_, [f64]>, ArrayRetrievalError>
pub fn mzs(&self) -> Result<Cow<'_, [f64]>, ArrayRetrievalError>
Get a reference to the m/z array if it is present
sourcepub fn mzs_mut(&mut self) -> Result<&mut [f64], ArrayRetrievalError>
pub fn mzs_mut(&mut self) -> Result<&mut [f64], ArrayRetrievalError>
Get a mutable reference to the m/z array if it is present
sourcepub fn intensities(&self) -> Result<Cow<'_, [f32]>, ArrayRetrievalError>
pub fn intensities(&self) -> Result<Cow<'_, [f32]>, ArrayRetrievalError>
Get a reference to the intensity array if it is present
sourcepub fn intensities_mut(&mut self) -> Result<&mut [f32], ArrayRetrievalError>
pub fn intensities_mut(&mut self) -> Result<&mut [f32], ArrayRetrievalError>
Get a mutable reference to the intensity array if it is present
sourcepub fn charges(&self) -> Result<Cow<'_, [i32]>, ArrayRetrievalError>
pub fn charges(&self) -> Result<Cow<'_, [i32]>, ArrayRetrievalError>
Get a reference to the charge array if it is present
sourcepub fn charge_mut(&mut self) -> Result<&mut [i32], ArrayRetrievalError>
pub fn charge_mut(&mut self) -> Result<&mut [i32], ArrayRetrievalError>
Get a mutable reference to the charge array if it is present
sourcepub fn ion_mobility(
&self
) -> Result<(Cow<'_, [f32]>, ArrayType), ArrayRetrievalError>
pub fn ion_mobility( &self ) -> Result<(Cow<'_, [f32]>, ArrayType), ArrayRetrievalError>
Get a reference to the ion mobility array if it is present
sourcepub fn ion_mobility_mut(
&mut self
) -> Result<(&mut [f32], ArrayType), ArrayRetrievalError>
pub fn ion_mobility_mut( &mut self ) -> Result<(&mut [f32], ArrayType), ArrayRetrievalError>
Get a mutable reference to the ion mobility array if it is present
sourcepub fn stack_ion_mobility(self) -> Result<BinaryArrayMap3D, ArrayRetrievalError>
pub fn stack_ion_mobility(self) -> Result<BinaryArrayMap3D, ArrayRetrievalError>
Split an array map along the ion mobility dimension if it is present.
This function will fail if there is no ion mobility dimension.
Trait Implementations§
source§impl Clone for BinaryArrayMap
impl Clone for BinaryArrayMap
source§fn clone(&self) -> BinaryArrayMap
fn clone(&self) -> BinaryArrayMap
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for BinaryArrayMap
impl Debug for BinaryArrayMap
source§impl Default for BinaryArrayMap
impl Default for BinaryArrayMap
source§fn default() -> BinaryArrayMap
fn default() -> BinaryArrayMap
source§impl<C: CentroidLike + From<CentroidPeak>> From<&BinaryArrayMap> for MZPeakSetType<C>
impl<C: CentroidLike + From<CentroidPeak>> From<&BinaryArrayMap> for MZPeakSetType<C>
source§fn from(arrays: &BinaryArrayMap) -> MZPeakSetType<C>
fn from(arrays: &BinaryArrayMap) -> MZPeakSetType<C>
source§impl From<&BinaryArrayMap> for DeconvolutedPeakSet
impl From<&BinaryArrayMap> for DeconvolutedPeakSet
source§fn from(arrays: &BinaryArrayMap) -> DeconvolutedPeakSet
fn from(arrays: &BinaryArrayMap) -> DeconvolutedPeakSet
source§impl From<&PeakSetVec<CentroidPeak, MZ>> for BinaryArrayMap
impl From<&PeakSetVec<CentroidPeak, MZ>> for BinaryArrayMap
source§fn from(peaks: &PeakSet) -> BinaryArrayMap
fn from(peaks: &PeakSet) -> BinaryArrayMap
source§impl From<&PeakSetVec<DeconvolutedPeak, Mass>> for BinaryArrayMap
impl From<&PeakSetVec<DeconvolutedPeak, Mass>> for BinaryArrayMap
source§fn from(peaks: &DeconvolutedPeakSet) -> BinaryArrayMap
fn from(peaks: &DeconvolutedPeakSet) -> BinaryArrayMap
source§impl From<ArrayPair<'_>> for BinaryArrayMap
impl From<ArrayPair<'_>> for BinaryArrayMap
source§impl<C: CentroidLike + From<CentroidPeak>> From<BinaryArrayMap> for MZPeakSetType<C>
impl<C: CentroidLike + From<CentroidPeak>> From<BinaryArrayMap> for MZPeakSetType<C>
source§fn from(arrays: BinaryArrayMap) -> MZPeakSetType<C>
fn from(arrays: BinaryArrayMap) -> MZPeakSetType<C>
source§impl IntoIterator for BinaryArrayMap
impl IntoIterator for BinaryArrayMap
Auto Trait Implementations§
impl Freeze for BinaryArrayMap
impl RefUnwindSafe for BinaryArrayMap
impl Send for BinaryArrayMap
impl Sync for BinaryArrayMap
impl Unpin for BinaryArrayMap
impl UnwindSafe for BinaryArrayMap
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
source§impl<T> Pointable for T
impl<T> Pointable for T
source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
self
from the equivalent element of its
superset. Read moresource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
self
is actually part of its subset T
(and can be converted to it).source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
self.to_subset
but without any property checks. Always succeeds.source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self
to the equivalent element of its superset.