@@ -608,6 +608,7 @@ impl Zero for Complex32 {
608
608
}
609
609
}
610
610
611
+ ///Trait qualifier to accept either real or complex typed data
611
612
pub trait FloatingPoint {
612
613
fn is_real ( ) -> bool {
613
614
false
@@ -638,16 +639,19 @@ impl FloatingPoint for f32 {
638
639
}
639
640
}
640
641
642
+ ///Trait qualifier to accept real data(numbers)
641
643
pub trait RealFloating { }
642
644
643
645
impl RealFloating for f64 { }
644
646
impl RealFloating for f32 { }
645
647
648
+ ///Trait qualifier to accept complex data(numbers)
646
649
pub trait ComplexFloating { }
647
650
648
651
impl ComplexFloating for Complex64 { }
649
652
impl ComplexFloating for Complex32 { }
650
653
654
+ ///Trait qualifier indicating it can hold real numbers only
651
655
pub trait RealNumber { }
652
656
653
657
impl RealNumber for f64 { }
@@ -661,19 +665,24 @@ impl RealNumber for bool {}
661
665
impl RealNumber for u64 { }
662
666
impl RealNumber for i64 { }
663
667
668
+ ///Trait qualifier for the type of Arrays accepted by scan operations
664
669
pub trait Scanable { }
665
670
666
671
impl Scanable for i32 { }
667
672
impl Scanable for u32 { }
668
673
impl Scanable for u64 { }
669
674
impl Scanable for i64 { }
670
675
676
+ /// Trait qualifier for type of Array's that are accepted
677
+ /// by native image load/save functions.
671
678
pub trait ImageNativeType { }
672
679
673
680
impl ImageNativeType for f32 { }
674
681
impl ImageNativeType for u16 { }
675
682
impl ImageNativeType for u8 { }
676
683
684
+ /// Trait qualifier for type of Array's that are accepted
685
+ /// by image processing functions especially filtering algorithms
677
686
pub trait ImageFilterType { }
678
687
679
688
impl ImageFilterType for f64 { }
@@ -686,6 +695,8 @@ impl ImageFilterType for u8 {}
686
695
impl ImageFilterType for bool { }
687
696
688
697
// 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
689
700
pub trait GrayRGBConvertible { }
690
701
691
702
impl GrayRGBConvertible for f64 { }
@@ -697,6 +708,7 @@ impl GrayRGBConvertible for u16 {}
697
708
impl GrayRGBConvertible for u8 { }
698
709
699
710
// TODO Rust haven't stabilized trait aliases yet
711
+ /// Trait qualifier for given type indicating computability of Moments
700
712
pub trait MomentsComputable { }
701
713
702
714
impl MomentsComputable for f64 { }
@@ -708,6 +720,7 @@ impl MomentsComputable for u16 {}
708
720
impl MomentsComputable for u8 { }
709
721
710
722
// TODO Rust haven't stabilized trait aliases yet
723
+ /// Trait qualifier for given type indicating computability of Median
711
724
pub trait MedianComputable { }
712
725
713
726
impl MedianComputable for f64 { }
@@ -719,6 +732,8 @@ impl MedianComputable for u16 {}
719
732
impl MedianComputable for u8 { }
720
733
721
734
// 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
722
737
pub trait EdgeComputable { }
723
738
724
739
impl EdgeComputable for f64 { }
@@ -729,6 +744,7 @@ impl EdgeComputable for i16 {}
729
744
impl EdgeComputable for u16 { }
730
745
impl EdgeComputable for u8 { }
731
746
747
+ /// Trait qualifier for given type indicating computability of covariance
732
748
pub trait CovarianceComputable { }
733
749
734
750
impl CovarianceComputable for f64 { }
0 commit comments