@@ -16,17 +16,9 @@ use imp_prelude::*;
1616
1717use arraytraits;
1818use dimension;
19- use iterators;
2019use error:: { self , ShapeError , ErrorKind } ;
2120use dimension:: IntoDimension ;
2221use dimension:: { abs_index, axes_of, Axes , do_slice, merge_axes, stride_offset} ;
23- use iterators:: {
24- new_lanes,
25- new_lanes_mut,
26- exact_chunks_of,
27- exact_chunks_mut_of,
28- windows
29- } ;
3022use zip:: Zip ;
3123
3224use {
@@ -676,7 +668,7 @@ impl<A, S, D> ArrayBase<S, D> where S: Data<Elem=A>, D: Dimension
676668 pub fn genrows ( & self ) -> Lanes < A , D :: Smaller > {
677669 let mut n = self . ndim ( ) ;
678670 if n == 0 { n += 1 ; }
679- new_lanes ( self . view ( ) , Axis ( n - 1 ) )
671+ Lanes :: new ( self . view ( ) , Axis ( n - 1 ) )
680672 }
681673
682674 /// Return a producer and iterable that traverses over the *generalized*
@@ -688,7 +680,7 @@ impl<A, S, D> ArrayBase<S, D> where S: Data<Elem=A>, D: Dimension
688680 {
689681 let mut n = self . ndim ( ) ;
690682 if n == 0 { n += 1 ; }
691- new_lanes_mut ( self . view_mut ( ) , Axis ( n - 1 ) )
683+ LanesMut :: new ( self . view_mut ( ) , Axis ( n - 1 ) )
692684 }
693685
694686 /// Return a producer and iterable that traverses over the *generalized*
@@ -718,7 +710,7 @@ impl<A, S, D> ArrayBase<S, D> where S: Data<Elem=A>, D: Dimension
718710 /// }
719711 /// ```
720712 pub fn gencolumns ( & self ) -> Lanes < A , D :: Smaller > {
721- new_lanes ( self . view ( ) , Axis ( 0 ) )
713+ Lanes :: new ( self . view ( ) , Axis ( 0 ) )
722714 }
723715
724716 /// Return a producer and iterable that traverses over the *generalized*
@@ -728,7 +720,7 @@ impl<A, S, D> ArrayBase<S, D> where S: Data<Elem=A>, D: Dimension
728720 pub fn gencolumns_mut ( & mut self ) -> LanesMut < A , D :: Smaller >
729721 where S : DataMut
730722 {
731- new_lanes_mut ( self . view_mut ( ) , Axis ( 0 ) )
723+ LanesMut :: new ( self . view_mut ( ) , Axis ( 0 ) )
732724 }
733725
734726 /// Return a producer and iterable that traverses over all 1D lanes
@@ -760,7 +752,7 @@ impl<A, S, D> ArrayBase<S, D> where S: Data<Elem=A>, D: Dimension
760752 /// assert_eq!(inner2.into_iter().next().unwrap(), aview1(&[0, 1, 2]));
761753 /// ```
762754 pub fn lanes ( & self , axis : Axis ) -> Lanes < A , D :: Smaller > {
763- new_lanes ( self . view ( ) , axis)
755+ Lanes :: new ( self . view ( ) , axis)
764756 }
765757
766758 /// Return a producer and iterable that traverses over all 1D lanes
@@ -770,7 +762,7 @@ impl<A, S, D> ArrayBase<S, D> where S: Data<Elem=A>, D: Dimension
770762 pub fn lanes_mut ( & mut self , axis : Axis ) -> LanesMut < A , D :: Smaller >
771763 where S : DataMut
772764 {
773- new_lanes_mut ( self . view_mut ( ) , axis)
765+ LanesMut :: new ( self . view_mut ( ) , axis)
774766 }
775767
776768
@@ -819,7 +811,7 @@ impl<A, S, D> ArrayBase<S, D> where S: Data<Elem=A>, D: Dimension
819811 pub fn axis_iter ( & self , axis : Axis ) -> AxisIter < A , D :: Smaller >
820812 where D : RemoveAxis ,
821813 {
822- iterators :: new_axis_iter ( self . view ( ) , axis. index ( ) )
814+ AxisIter :: new ( self . view ( ) , axis)
823815 }
824816
825817
@@ -834,7 +826,7 @@ impl<A, S, D> ArrayBase<S, D> where S: Data<Elem=A>, D: Dimension
834826 where S : DataMut ,
835827 D : RemoveAxis ,
836828 {
837- iterators :: new_axis_iter_mut ( self . view_mut ( ) , axis. index ( ) )
829+ AxisIterMut :: new ( self . view_mut ( ) , axis)
838830 }
839831
840832
@@ -865,7 +857,7 @@ impl<A, S, D> ArrayBase<S, D> where S: Data<Elem=A>, D: Dimension
865857 /// [[26, 27]]]));
866858 /// ```
867859 pub fn axis_chunks_iter ( & self , axis : Axis , size : usize ) -> AxisChunksIter < A , D > {
868- iterators :: new_chunk_iter ( self . view ( ) , axis. index ( ) , size)
860+ AxisChunksIter :: new ( self . view ( ) , axis, size)
869861 }
870862
871863 /// Return an iterator that traverses over `axis` by chunks of `size`,
@@ -878,7 +870,7 @@ impl<A, S, D> ArrayBase<S, D> where S: Data<Elem=A>, D: Dimension
878870 -> AxisChunksIterMut < A , D >
879871 where S : DataMut
880872 {
881- iterators :: new_chunk_iter_mut ( self . view_mut ( ) , axis. index ( ) , size)
873+ AxisChunksIterMut :: new ( self . view_mut ( ) , axis, size)
882874 }
883875
884876 /// Return an exact chunks producer (and iterable).
@@ -895,7 +887,7 @@ impl<A, S, D> ArrayBase<S, D> where S: Data<Elem=A>, D: Dimension
895887 pub fn exact_chunks < E > ( & self , chunk_size : E ) -> ExactChunks < A , D >
896888 where E : IntoDimension < Dim =D > ,
897889 {
898- exact_chunks_of ( self . view ( ) , chunk_size)
890+ ExactChunks :: new ( self . view ( ) , chunk_size)
899891 }
900892
901893 /// Return an exact chunks producer (and iterable).
@@ -934,7 +926,7 @@ impl<A, S, D> ArrayBase<S, D> where S: Data<Elem=A>, D: Dimension
934926 where E : IntoDimension < Dim =D > ,
935927 S : DataMut
936928 {
937- exact_chunks_mut_of ( self . view_mut ( ) , chunk_size)
929+ ExactChunksMut :: new ( self . view_mut ( ) , chunk_size)
938930 }
939931
940932 /// Return a window producer and iterable.
@@ -954,7 +946,7 @@ impl<A, S, D> ArrayBase<S, D> where S: Data<Elem=A>, D: Dimension
954946 pub fn windows < E > ( & self , window_size : E ) -> Windows < A , D >
955947 where E : IntoDimension < Dim =D >
956948 {
957- windows ( self . view ( ) , window_size)
949+ Windows :: new ( self . view ( ) , window_size)
958950 }
959951
960952 // Return (length, stride) for diagonal
@@ -1597,8 +1589,8 @@ impl<A, S, D> ArrayBase<S, D> where S: Data<Elem=A>, D: Dimension
15971589 // break the arrays up into their inner rows
15981590 let n = self . ndim ( ) ;
15991591 let dim = self . raw_dim ( ) ;
1600- Zip :: from ( new_lanes_mut ( self . view_mut ( ) , Axis ( n - 1 ) ) )
1601- . and ( new_lanes ( rhs. broadcast_assume ( dim) , Axis ( n - 1 ) ) )
1592+ Zip :: from ( LanesMut :: new ( self . view_mut ( ) , Axis ( n - 1 ) ) )
1593+ . and ( Lanes :: new ( rhs. broadcast_assume ( dim) , Axis ( n - 1 ) ) )
16021594 . apply ( move |s_row, r_row| {
16031595 Zip :: from ( s_row) . and ( r_row) . apply ( |a, b| f ( a, b) )
16041596 } ) ;
0 commit comments