IMSWeights#
- class pyopenms.IMSWeights#
Bases:
object
Cython implementation of _IMSWeights
Original C++ documentation is available here
- __init__()#
Overload:
- __init__(self) None
Overload:
- __init__(self, in_0: IMSWeights) None
Methods
Overload:
back
(self)Gets a last weight
divideByGCD
(self)Divides the integer weights by their gcd.
getAlphabetMass
(self, i)Gets an original (double) alphabet mass by index
getMaxRoundingError
(self)getMinRoundingError
(self)getParentMass
(self, decomposition)Returns a parent mass for a given decomposition
getPrecision
(self)Gets precision.
getWeight
(self, i)Gets a scaled integer weight by index
setPrecision
(self, precision)Sets a new precision to scale double values to integer
size
(self)Gets size of a set of weights
swap
(self, index1, index2)Exchanges weight and mass at index1 with weight and mass at index2
- back(self) int #
Gets a last weight
- divideByGCD(self) bool #
Divides the integer weights by their gcd. The precision is also adjusted
- getAlphabetMass(self, i: int) float #
Gets an original (double) alphabet mass by index
- getMaxRoundingError(self) float #
- getMinRoundingError(self) float #
- getParentMass(self, decomposition: List[int]) float #
Returns a parent mass for a given decomposition
- getPrecision(self) float #
Gets precision.
- getWeight(self, i: int) int #
Gets a scaled integer weight by index
- setPrecision(self, precision: float) None #
Sets a new precision to scale double values to integer
- size(self) int #
Gets size of a set of weights
- swap(self, index1: int, index2: int) None #
Exchanges weight and mass at index1 with weight and mass at index2