@@ -16,17 +16,9 @@ use imp_prelude::*;
16
16
17
17
use arraytraits;
18
18
use dimension;
19
- use iterators;
20
19
use error:: { self , ShapeError , ErrorKind } ;
21
20
use dimension:: IntoDimension ;
22
21
use 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
- } ;
30
22
use zip:: Zip ;
31
23
32
24
use {
@@ -676,7 +668,7 @@ impl<A, S, D> ArrayBase<S, D> where S: Data<Elem=A>, D: Dimension
676
668
pub fn genrows ( & self ) -> Lanes < A , D :: Smaller > {
677
669
let mut n = self . ndim ( ) ;
678
670
if n == 0 { n += 1 ; }
679
- new_lanes ( self . view ( ) , Axis ( n - 1 ) )
671
+ Lanes :: new ( self . view ( ) , Axis ( n - 1 ) )
680
672
}
681
673
682
674
/// 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
688
680
{
689
681
let mut n = self . ndim ( ) ;
690
682
if n == 0 { n += 1 ; }
691
- new_lanes_mut ( self . view_mut ( ) , Axis ( n - 1 ) )
683
+ LanesMut :: new ( self . view_mut ( ) , Axis ( n - 1 ) )
692
684
}
693
685
694
686
/// 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
718
710
/// }
719
711
/// ```
720
712
pub fn gencolumns ( & self ) -> Lanes < A , D :: Smaller > {
721
- new_lanes ( self . view ( ) , Axis ( 0 ) )
713
+ Lanes :: new ( self . view ( ) , Axis ( 0 ) )
722
714
}
723
715
724
716
/// 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
728
720
pub fn gencolumns_mut ( & mut self ) -> LanesMut < A , D :: Smaller >
729
721
where S : DataMut
730
722
{
731
- new_lanes_mut ( self . view_mut ( ) , Axis ( 0 ) )
723
+ LanesMut :: new ( self . view_mut ( ) , Axis ( 0 ) )
732
724
}
733
725
734
726
/// 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
760
752
/// assert_eq!(inner2.into_iter().next().unwrap(), aview1(&[0, 1, 2]));
761
753
/// ```
762
754
pub fn lanes ( & self , axis : Axis ) -> Lanes < A , D :: Smaller > {
763
- new_lanes ( self . view ( ) , axis)
755
+ Lanes :: new ( self . view ( ) , axis)
764
756
}
765
757
766
758
/// 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
770
762
pub fn lanes_mut ( & mut self , axis : Axis ) -> LanesMut < A , D :: Smaller >
771
763
where S : DataMut
772
764
{
773
- new_lanes_mut ( self . view_mut ( ) , axis)
765
+ LanesMut :: new ( self . view_mut ( ) , axis)
774
766
}
775
767
776
768
@@ -819,7 +811,7 @@ impl<A, S, D> ArrayBase<S, D> where S: Data<Elem=A>, D: Dimension
819
811
pub fn axis_iter ( & self , axis : Axis ) -> AxisIter < A , D :: Smaller >
820
812
where D : RemoveAxis ,
821
813
{
822
- iterators :: new_axis_iter ( self . view ( ) , axis. index ( ) )
814
+ AxisIter :: new ( self . view ( ) , axis)
823
815
}
824
816
825
817
@@ -834,7 +826,7 @@ impl<A, S, D> ArrayBase<S, D> where S: Data<Elem=A>, D: Dimension
834
826
where S : DataMut ,
835
827
D : RemoveAxis ,
836
828
{
837
- iterators :: new_axis_iter_mut ( self . view_mut ( ) , axis. index ( ) )
829
+ AxisIterMut :: new ( self . view_mut ( ) , axis)
838
830
}
839
831
840
832
@@ -865,7 +857,7 @@ impl<A, S, D> ArrayBase<S, D> where S: Data<Elem=A>, D: Dimension
865
857
/// [[26, 27]]]));
866
858
/// ```
867
859
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)
869
861
}
870
862
871
863
/// 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
878
870
-> AxisChunksIterMut < A , D >
879
871
where S : DataMut
880
872
{
881
- iterators :: new_chunk_iter_mut ( self . view_mut ( ) , axis. index ( ) , size)
873
+ AxisChunksIterMut :: new ( self . view_mut ( ) , axis, size)
882
874
}
883
875
884
876
/// 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
895
887
pub fn exact_chunks < E > ( & self , chunk_size : E ) -> ExactChunks < A , D >
896
888
where E : IntoDimension < Dim =D > ,
897
889
{
898
- exact_chunks_of ( self . view ( ) , chunk_size)
890
+ ExactChunks :: new ( self . view ( ) , chunk_size)
899
891
}
900
892
901
893
/// 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
934
926
where E : IntoDimension < Dim =D > ,
935
927
S : DataMut
936
928
{
937
- exact_chunks_mut_of ( self . view_mut ( ) , chunk_size)
929
+ ExactChunksMut :: new ( self . view_mut ( ) , chunk_size)
938
930
}
939
931
940
932
/// Return a window producer and iterable.
@@ -954,7 +946,7 @@ impl<A, S, D> ArrayBase<S, D> where S: Data<Elem=A>, D: Dimension
954
946
pub fn windows < E > ( & self , window_size : E ) -> Windows < A , D >
955
947
where E : IntoDimension < Dim =D >
956
948
{
957
- windows ( self . view ( ) , window_size)
949
+ Windows :: new ( self . view ( ) , window_size)
958
950
}
959
951
960
952
// Return (length, stride) for diagonal
@@ -1597,8 +1589,8 @@ impl<A, S, D> ArrayBase<S, D> where S: Data<Elem=A>, D: Dimension
1597
1589
// break the arrays up into their inner rows
1598
1590
let n = self . ndim ( ) ;
1599
1591
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 ) ) )
1602
1594
. apply ( move |s_row, r_row| {
1603
1595
Zip :: from ( s_row) . and ( r_row) . apply ( |a, b| f ( a, b) )
1604
1596
} ) ;
0 commit comments