File tree Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Original file line number Diff line number Diff line change @@ -95,6 +95,12 @@ impl<T: DataType> Mat_<T> {
95
95
self . at_2d ( pt. y , pt. x )
96
96
}
97
97
98
+ /// See [Mat::at_row]
99
+ #[ inline]
100
+ pub fn at_row ( & self , row : i32 ) -> Result < & [ T ] > {
101
+ match_indices ( self , & [ row, 0 ] ) . and_then ( |_| unsafe { self . at_row_unchecked ( row) } )
102
+ }
103
+
98
104
/// See [Mat::at_mut]
99
105
#[ inline]
100
106
pub fn at_mut ( & mut self , i0 : i32 ) -> Result < & mut T > {
@@ -129,6 +135,13 @@ impl<T: DataType> Mat_<T> {
129
135
self . at_2d_mut ( pt. y , pt. x )
130
136
}
131
137
138
+ /// See [Mat::at_row_mut]
139
+ #[ inline]
140
+ pub fn at_row_mut ( & mut self , row : i32 ) -> Result < & mut [ T ] > {
141
+ match_indices ( self , & [ row, 0 ] ) ?;
142
+ unsafe { self . at_row_unchecked_mut ( row) }
143
+ }
144
+
132
145
/// See [Mat::data_typed]
133
146
#[ inline]
134
147
pub fn data_typed ( & self ) -> Result < & [ T ] > {
You can’t perform that action at this time.
0 commit comments