Struct lightmotif_py::StripedScores
source · pub struct StripedScores { /* private fields */ }
Expand description
A striped matrix storing scores obtained with a scoring matrix.
Implementations§
source§impl StripedScores
impl StripedScores
sourcepub fn threshold(slf: PyRef<'_, Self>, threshold: f32) -> PyResult<Vec<usize>>
pub fn threshold(slf: PyRef<'_, Self>, threshold: f32) -> PyResult<Vec<usize>>
Return all positions with a score greater or equal to the threshold.
Returns:
list
of int
: The indices of the position with a score greater or
equal to the given threshold. Note that the indices may or may not
be sorted, depending on the implementation.
Note: This method uses the best implementation for the local platform, prefering AVX2 if available.
sourcepub fn max(slf: PyRef<'_, Self>) -> PyResult<Option<f32>>
pub fn max(slf: PyRef<'_, Self>) -> PyResult<Option<f32>>
Return the maximum score, if the score matrix is not empty.
Returns:
float
or None
: The maximum score, if any.
Note: This method uses the best implementation for the local platform, prefering AVX2 if available.
sourcepub fn argmax(slf: PyRef<'_, Self>) -> PyResult<Option<usize>>
pub fn argmax(slf: PyRef<'_, Self>) -> PyResult<Option<usize>>
Return the position of the maximum score, if the score matrix is not empty.
Returns:
int
or None
: The position of the maximum score, if any.
Note: This method uses the best implementation for the local platform, prefering AVX2 if available.
Trait Implementations§
source§impl Clone for StripedScores
impl Clone for StripedScores
source§fn clone(&self) -> StripedScores
fn clone(&self) -> StripedScores
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for StripedScores
impl Debug for StripedScores
source§impl From<StripedScores<<Avx2 as Backend>::LANES>> for StripedScores
impl From<StripedScores<<Avx2 as Backend>::LANES>> for StripedScores
source§impl PyClassImpl for StripedScores
impl PyClassImpl for StripedScores
source§const DOC: &'static str = "A striped matrix storing scores obtained with a scoring matrix.\u{0}"
const DOC: &'static str = "A striped matrix storing scores obtained with a scoring matrix.\u{0}"
source§const IS_BASETYPE: bool = false
const IS_BASETYPE: bool = false
source§const IS_SUBCLASS: bool = false
const IS_SUBCLASS: bool = false
source§const IS_MAPPING: bool = false
const IS_MAPPING: bool = false
source§const IS_SEQUENCE: bool = false
const IS_SEQUENCE: bool = false
§type Layout = PyCell<StripedScores>
type Layout = PyCell<StripedScores>
§type ThreadChecker = ThreadCheckerStub<StripedScores>
type ThreadChecker = ThreadCheckerStub<StripedScores>
§type PyClassMutability = <<PyAny as PyClassBaseType>::PyClassMutability as PyClassMutability>::MutableChild
type PyClassMutability = <<PyAny as PyClassBaseType>::PyClassMutability as PyClassMutability>::MutableChild
§type BaseNativeType = PyAny
type BaseNativeType = PyAny
PyAny
by default, and when you declare
#[pyclass(extends=PyDict)]
, it’s PyDict
.fn items_iter() -> PyClassItemsIter
fn lazy_type_object() -> &'static LazyTypeObject<Self>
fn dict_offset() -> Option<isize>
fn weaklist_offset() -> Option<isize>
source§impl<'a, 'py> PyFunctionArgument<'a, 'py> for &'a StripedScores
impl<'a, 'py> PyFunctionArgument<'a, 'py> for &'a StripedScores
source§impl<'a, 'py> PyFunctionArgument<'a, 'py> for &'a mut StripedScores
impl<'a, 'py> PyFunctionArgument<'a, 'py> for &'a mut StripedScores
source§impl PyMethods<StripedScores> for PyClassImplCollector<StripedScores>
impl PyMethods<StripedScores> for PyClassImplCollector<StripedScores>
fn py_methods(self) -> &'static PyClassItems
source§impl PyTypeInfo for StripedScores
impl PyTypeInfo for StripedScores
§type AsRefTarget = PyCell<StripedScores>
type AsRefTarget = PyCell<StripedScores>
source§fn type_object_raw(py: Python<'_>) -> *mut PyTypeObject
fn type_object_raw(py: Python<'_>) -> *mut PyTypeObject
source§fn type_object(py: Python<'_>) -> &PyType
fn type_object(py: Python<'_>) -> &PyType
source§fn is_type_of(object: &PyAny) -> bool
fn is_type_of(object: &PyAny) -> bool
object
is an instance of this type or a subclass of this type.source§fn is_exact_type_of(object: &PyAny) -> bool
fn is_exact_type_of(object: &PyAny) -> bool
object
is an instance of this type.