GrxCopyUtil.java
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2008, AIST, the University of Tokyo and General Robotix Inc.
3  * All rights reserved. This program is made available under the terms of the
4  * Eclipse Public License v1.0 which accompanies this distribution, and is
5  * available at http://www.eclipse.org/legal/epl-v10.html
6  * Contributors:
7  * General Robotix Inc.
8  * National Institute of Advanced Industrial Science and Technology (AIST)
9  */
18 package com.generalrobotix.ui.util;
19 
20 import java.lang.System;
21 
22 public class GrxCopyUtil {
23  public static int[][] copyIntWDim(int[][] src ){
24  int [][] ret = new int[src.length][];
25  for(int i = 0; i < src.length; ++i){
26  ret[i] = new int[src[i].length];
27  GrxCopyUtil.copyDim(src[i], ret[i], src[i].length);
28  }
29  return ret;
30  }
31 
32  public static long[][] copyLongWDim(long[][] src ){
33  long [][] ret = new long[src.length][];
34  for(int i = 0; i < src.length; ++i){
35  ret[i] = new long[src[i].length];
36  GrxCopyUtil.copyDim(src[i], ret[i], src[i].length);
37  }
38  return ret;
39  }
40 
41  public static double[][] copyDoubleWDim(double[][] src ){
42  double [][] ret = new double[src.length][];
43  for(int i = 0; i < src.length; ++i){
44  ret[i] = new double[src[i].length];
45  GrxCopyUtil.copyDim(src[i], ret[i], src[i].length);
46  }
47  return ret;
48  }
49 
50  public static float[][] copyFloatWDim(float[][] src ){
51  float [][] ret = new float[src.length][];
52  for(int i = 0; i < src.length; ++i){
53  ret[i] = new float[src[i].length];
54  GrxCopyUtil.copyDim(src[i], ret[i], src[i].length);
55  }
56  return ret;
57  }
58 
59  public static <T> void copyDim(T src, T dest, int length){
60  System.arraycopy(src, 0, dest, 0, length);
61  }
62 }
RTC::ReturnCode_t ret(RTC::Local::ReturnCode_t r)
png_bytep png_bytep png_size_t length
Definition: png.h:1541
png_uint_32 i
Definition: png.h:2735
static int[][] copyIntWDim(int[][] src)
static float[][] copyFloatWDim(float[][] src)
static double[][] copyDoubleWDim(double[][] src)
static long[][] copyLongWDim(long[][] src)
static< T > void copyDim(T src, T dest, int length)


openhrp3
Author(s): AIST, General Robotix Inc., Nakamura Lab of Dept. of Mechano Informatics at University of Tokyo
autogenerated on Sat May 8 2021 02:42:38