File tree Expand file tree Collapse file tree 1 file changed +22
-0
lines changed Expand file tree Collapse file tree 1 file changed +22
-0
lines changed Original file line number Diff line number Diff line change @@ -54,7 +54,29 @@ extern {
54
54
fn af_replace_scalar ( a : AfArray , cond : AfArray , b : c_double ) -> c_int ;
55
55
}
56
56
57
+ /// Type Trait to generate a constant [Array](./struct.Array.html) of given size
58
+ ///
59
+ /// Internally, ConstGenerator trait is implemented by following types.
60
+ ///
61
+ /// - f32
62
+ /// - f64
63
+ /// - num::Complex\<f32\>
64
+ /// - num::Complex\<f64\>
65
+ /// - bool
66
+ /// - i32
67
+ /// - u32
68
+ /// - u8
69
+ /// - i64
70
+ /// - u64
71
+ /// - i16
72
+ /// - u16
73
+ ///
57
74
pub trait ConstGenerator {
75
+ /// Create an Array of `dims` size from scalar value `self`.
76
+ ///
77
+ /// # Parameters
78
+ ///
79
+ /// - `dims` are the dimensions of the output constant [Array](./struct.Array.html)
58
80
fn generate ( & self , dims : Dim4 ) -> Array ;
59
81
}
60
82
You can’t perform that action at this time.
0 commit comments