@@ -608,6 +608,7 @@ impl Zero for Complex32 {
608608 }
609609}
610610
611+ ///Trait qualifier to accept either real or complex typed data
611612pub trait FloatingPoint {
612613 fn is_real ( ) -> bool {
613614 false
@@ -638,16 +639,19 @@ impl FloatingPoint for f32 {
638639 }
639640}
640641
642+ ///Trait qualifier to accept real data(numbers)
641643pub trait RealFloating { }
642644
643645impl RealFloating for f64 { }
644646impl RealFloating for f32 { }
645647
648+ ///Trait qualifier to accept complex data(numbers)
646649pub trait ComplexFloating { }
647650
648651impl ComplexFloating for Complex64 { }
649652impl ComplexFloating for Complex32 { }
650653
654+ ///Trait qualifier indicating it can hold real numbers only
651655pub trait RealNumber { }
652656
653657impl RealNumber for f64 { }
@@ -661,19 +665,24 @@ impl RealNumber for bool {}
661665impl RealNumber for u64 { }
662666impl RealNumber for i64 { }
663667
668+ ///Trait qualifier for the type of Arrays accepted by scan operations
664669pub trait Scanable { }
665670
666671impl Scanable for i32 { }
667672impl Scanable for u32 { }
668673impl Scanable for u64 { }
669674impl Scanable for i64 { }
670675
676+ /// Trait qualifier for type of Array's that are accepted
677+ /// by native image load/save functions.
671678pub trait ImageNativeType { }
672679
673680impl ImageNativeType for f32 { }
674681impl ImageNativeType for u16 { }
675682impl ImageNativeType for u8 { }
676683
684+ /// Trait qualifier for type of Array's that are accepted
685+ /// by image processing functions especially filtering algorithms
677686pub trait ImageFilterType { }
678687
679688impl ImageFilterType for f64 { }
@@ -686,6 +695,8 @@ impl ImageFilterType for u8 {}
686695impl ImageFilterType for bool { }
687696
688697// TODO Rust haven't stabilized trait aliases yet
698+ /// Trait qualifier for given type indicating conversion capability between
699+ /// grayscale and RGB triplets of data
689700pub trait GrayRGBConvertible { }
690701
691702impl GrayRGBConvertible for f64 { }
@@ -697,6 +708,7 @@ impl GrayRGBConvertible for u16 {}
697708impl GrayRGBConvertible for u8 { }
698709
699710// TODO Rust haven't stabilized trait aliases yet
711+ /// Trait qualifier for given type indicating computability of Moments
700712pub trait MomentsComputable { }
701713
702714impl MomentsComputable for f64 { }
@@ -708,6 +720,7 @@ impl MomentsComputable for u16 {}
708720impl MomentsComputable for u8 { }
709721
710722// TODO Rust haven't stabilized trait aliases yet
723+ /// Trait qualifier for given type indicating computability of Median
711724pub trait MedianComputable { }
712725
713726impl MedianComputable for f64 { }
@@ -719,6 +732,8 @@ impl MedianComputable for u16 {}
719732impl MedianComputable for u8 { }
720733
721734// TODO Rust haven't stabilized trait aliases yet
735+ /// Trait qualifier for given type indicating if edge calculations such as
736+ /// derivates etc. can be performed
722737pub trait EdgeComputable { }
723738
724739impl EdgeComputable for f64 { }
@@ -729,6 +744,7 @@ impl EdgeComputable for i16 {}
729744impl EdgeComputable for u16 { }
730745impl EdgeComputable for u8 { }
731746
747+ /// Trait qualifier for given type indicating computability of covariance
732748pub trait CovarianceComputable { }
733749
734750impl CovarianceComputable for f64 { }
0 commit comments