TensorOps_F64 { public static void insertSubChannel( Tensor_F64 src , int srcStartIndex , int srcStride , Tensor_F64 dst , int dstStartIndex , int dstStride , int rows , int columns ) { int indexSrc = srcStartIndex; int indexDst = dstStartIndex;; for (int i = 0; i < rows; i++) { System.arraycopy(src.d,indexSrc,dst.d,indexDst,columns); indexSrc += srcStride; indexDst += dstStride; } }  static void elementMult(Tensor_F64 tensor , double value  ); static void elementMult(Tensor_F64 input , double value , Tensor_F64 output ); static void elementMult(Tensor_F64 A , Tensor_F64 B , Tensor_F64 output ); static void elementAdd(Tensor_F64 A , Tensor_F64 B , Tensor_F64 output ); static double elementSum( Tensor_F64 tensor ); static void insertSubChannel( Tensor_F64 src , int srcStartIndex , int srcStride ,
										 Tensor_F64 dst , int dstStartIndex , int dstStride ,
										 int rows , int columns ); static void insertSpatial(Tensor_F64 src , int []srcCoor,
									 Tensor_F64 dst , int []dstCoor ); static void fillSpatialBorder(Tensor_F64 tensor , int[] coor ,
										 int borderY0 , int borderX0 , int borderY1 , int borderX1 ,
										 double value ); static void printSpatial( Tensor_F64 tensor , int batch , int channel ); static void fill( Tensor_F64 tensor , double value );  }
@Test public void insertSubChannel() { for( boolean subtensor : new boolean[]{false,true}) { Tensor_F64 src = TensorFactory_F64.random(rand, subtensor, 4, 10, 8); Tensor_F64 dst = TensorFactory_F64.random(rand, subtensor, 5, 11, 12); TensorOps_F64.insertSubChannel(src,15,7,dst,19,8,3,4); for (int row = 0; row < 3; row++) { for (int col = 0; col < 4; col++) { assertEquals( src.d[15+row*7+col],dst.d[19+row*8+col], DeepBoofConstants.TEST_TOL_F64); } } } }