jv.vecmath

## Class PuData

- java.lang.Object
- - jv.vecmath.PuData

- All Implemented Interfaces:
    java.io.Serializable

      public class PuData
      extends java.lang.Object
      implements java.io.Serializable

  Static memory methods on number arrays.
  See Also:
    Serialized Form
  Author:
    Konrad Polthier
  Version:
    15.06.06, 1.20 revised (kp) New method invert(Object []) added.
    27.12.01, 1.10 revised (kp) If size==0 now reallocate array with zero length, instead null.
    00.00.97, 1.00 created (kp)

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `PuData()`

  - ### Method Summary

    All Methods Static Methods Concrete Methods Deprecated Methods
    Modifier and Type | Method and Description
    --- | ---
    `static boolean[]` | `copy(boolean[] arrDest, boolean[] arrSrc)` Copy an array into an array, and do not adjust size of destination array.
    `static double[]` | `copy(double[] arrDest, double[] arrSrc)` Copy an array into an array, and do not adjust size of destination array.
    `static double[]` | `copy(double[] data, int size)` Copy an array into a new array.
    `static float[]` | `copy(float[] arrDest, float[] arrSrc)` Copy an array into an array, and do not adjust size of destination array.
    `static float[]` | `copy(float[] data, int size)` Copy an array into a new array.
    `static int[]` | `copy(int[] data, int size)` Copy an array into a new array.
    `static int[]` | `copy(int[] arrDest, int[] arrSrc)` Copy an array into an array, and do not adjust size of destination array.
    `static void` | `invert(java.lang.Object[] data)` Invert order of all entries, i.e. the first entry becomes the last entry.
    `static boolean[]` | `realloc(boolean[] data, int size)` Create a new array with given size, if size is different than given array.
    `static boolean[]` | `realloc(boolean[] data, int size, boolean initial)` Create a new array with given size, if size is different than given array.
    `static java.lang.Object[]` | `realloc(java.lang.Class cl, java.lang.Object[] data, int size)` Create a new array with given size, if size is different than given array.
    `static double[]` | `realloc(double[] data, int size)` Create a new array with given size, if size is different than given array.
    `static double[]` | `realloc(double[] data, int size, double initial)` Create a new array with given size, if size is different than given array.
    `static float[]` | `realloc(float[] data, int size)` Create a new array with given size, if size is different than given array.
    `static float[]` | `realloc(float[] data, int size, float initial)` Create a new array with given size, if size is different than given array.
    `static int[]` | `realloc(int[] data, int size)` Create a new array with given size, if size is different than given array.
    `static int[]` | `realloc(int[] data, int size, int initial)` Create a new array with given size, if size is different than given array.
    `static java.lang.String[]` | `realloc(java.lang.String[] data, int size)` Create a new array with given size, if size is different than given array.
    `static java.lang.String[]` | `realloc(java.lang.String[] data, int size, java.lang.String initial)` Create a new array with given size, if size is different than given array.
    `static java.lang.String` | `toString(double[] data)` Deprecated. use jv.number.PuString#toString(double [])
    `static java.lang.String` | `toString(float[] data)` Deprecated. use jv.number.PuString#toString(float [])
    `static java.lang.String` | `toString(int[] data)` Deprecated. use jv.number.PuString#toString(int [])

    - ### Methods inherited from class java.lang.Object

      `equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### PuData

          public PuData()

  - ### Method Detail

    - #### toString

          public static java.lang.String toString(double[] data)

      Deprecated. use jv.number.PuString#toString(double [])
      Create single line string of double array where components are separated by blanks.
      Parameters:
        `data` - array of double number to be printed.
      Returns:
        single-line string, or null of argument==null or zero length.

    - #### toString

          public static java.lang.String toString(float[] data)

      Deprecated. use jv.number.PuString#toString(float [])
      Create single line string of float array where components are separated by blanks.
      Parameters:
        `data` - array of float number to be printed.
      Returns:
        single-line string, or null of argument==null or zero length.

    - #### toString

          public static java.lang.String toString(int[] data)

      Deprecated. use jv.number.PuString#toString(int [])
      Create single line string of integer array where components are separated by blanks.
      Parameters:
        `data` - array of integer number to be printed.
      Returns:
        single-line string, or null of argument==null or zero length.

    - #### copy

          public static double[] copy(double[] data,
                                      int size)

      Copy an array into a new array.
      Parameters:
        `data` - source array
        `size` - size of new array, must be less or equal data.length

    - #### copy

          public static float[] copy(float[] data,
                                     int size)

      Copy an array into a new array.
      Parameters:
        `data` - source array
        `size` - size of new array, must be less or equal data.length

    - #### copy

          public static int[] copy(int[] data,
                                   int size)

      Copy an array into a new array.
      Parameters:
        `data` - source array
        `size` - size of new array, must be less or equal data.length

    - #### copy

          public static double[] copy(double[] arrDest,
                                      double[] arrSrc)

      Copy an array into an array, and do not adjust size of destination array. If destination array is empty then allocate space of size of source array. If source and destination array have different size then use the minimum of both sizes. If destination array is bigger than source then reset the additional entries in destination array with 0.
      Parameters:
        `arrDest` - destination array, maybe null.
        `arrSrc` - source array
      Returns:
        arrDest, or newly created destination array
      See Also:
        `PdVector.copy(int, jv.vecmath.PdVector, int, int)`
      Version:
        04.08.08, 1.00 created (kp)

    - #### copy

          public static float[] copy(float[] arrDest,
                                     float[] arrSrc)

      Copy an array into an array, and do not adjust size of destination array. If destination array is empty then allocate space of size of source array. If source and destination array have different size then use the minimum of both sizes. If destination array is bigger than source then reset the additional entries in destination array with 0.
      Parameters:
        `arrDest` - destination array, maybe null.
        `arrSrc` - source array
      Returns:
        arrDest, or newly created destination array
      See Also:
        `PdVector.copy(int, jv.vecmath.PdVector, int, int)`
      Version:
        04.08.08, 1.00 created (kp)

    - #### copy

          public static int[] copy(int[] arrDest,
                                   int[] arrSrc)

      Copy an array into an array, and do not adjust size of destination array. If destination array is empty then allocate space of size of source array. If source and destination array have different size then use the minimum of both sizes. If destination array is bigger than source then reset the additional entries in destination array with 0.
      Parameters:
        `arrDest` - destination array, maybe null.
        `arrSrc` - source array
      Returns:
        arrDest, or newly created destination array
      See Also:
        `PiVector.copy(int, jv.vecmath.PiVector, int, int)`
      Version:
        04.08.08, 1.00 created (kp)

    - #### copy

          public static boolean[] copy(boolean[] arrDest,
                                       boolean[] arrSrc)

      Copy an array into an array, and do not adjust size of destination array. If destination array is empty then allocate space of size of source array. If source and destination array have different size then use the minimum of both sizes. If destination array is bigger than source then reset the additional entries in destination array with false.
      Parameters:
        `arrDest` - destination array, maybe null.
        `arrSrc` - source array
      Returns:
        arrDest, or newly created destination array
      See Also:
        `PiVector.copy(int, jv.vecmath.PiVector, int, int)`
      Version:
        04.08.08, 1.00 created (kp)

    - #### realloc

          public static java.lang.Object[] realloc(java.lang.Class cl,
                                                   java.lang.Object[] data,
                                                   int size)

      Create a new array with given size, if size is different than given array. Copy as much as possible data of the given array into the new array. If new array is larger than given array, the empty space is not initialized.

      The effect is that of the equivalent array creation expression: `new cl[size]` and copying of existing data into this new array.

      Parameters:
        `cl` - class of objects in data array.
        `data` - source array, may be null.
        `size` - size of new array

    - #### realloc

          public static double[] realloc(double[] data,
                                         int size)

      Create a new array with given size, if size is different than given array. Copy as much as possible data of the given array into the new array. If new array is larger than given array, the empty space is not initialized.
      Parameters:
        `data` - source array, may be null.
        `size` - size of new array
      Version:
        27.12.01, 1.10 revised (kp) If size==0 now allocate array with zero length, instead null.

    - #### realloc

          public static float[] realloc(float[] data,
                                        int size)

      Create a new array with given size, if size is different than given array. Copy as much as possible data of the given array into the new array. If new array is larger than given array, the empty space is not initialized.
      Parameters:
        `data` - source array, may be null.
        `size` - size of new array
      Version:
        27.12.01, 1.10 revised (kp) If size==0 now allocate array with zero length, instead null.

    - #### realloc

          public static int[] realloc(int[] data,
                                      int size)

      Create a new array with given size, if size is different than given array. Copy as much as possible data of the given array into the new array. If new array is larger than given array, the empty space is not initialized.
      Parameters:
        `data` - source array, may be null.
        `size` - size of new array
      Version:
        27.12.01, 1.10 revised (kp) If size==0 now allocate array with zero length, instead null.

    - #### realloc

          public static boolean[] realloc(boolean[] data,
                                          int size)

      Create a new array with given size, if size is different than given array. Copy as much as possible data of the given array into the new array. If new array is larger than given array, the empty space is not initialized.
      Parameters:
        `data` - source array, may be null.
        `size` - size of new array
      Version:
        27.12.01, 1.10 revised (kp) If size==0 now allocate array with zero length, instead null.

    - #### realloc

          public static java.lang.String[] realloc(java.lang.String[] data,
                                                   int size)

      Create a new array with given size, if size is different than given array. Copy as much as possible data of the given array into the new array. If new array is larger than given array, the empty space is not initialized.
      Parameters:
        `data` - source array, may be null.
        `size` - size of new array

    - #### realloc

          public static double[] realloc(double[] data,
                                         int size,
                                         double initial)

      Create a new array with given size, if size is different than given array. Copy as much as possible data of the given array into the new array. If new array is larger than given array, the empty space is not initialized. If new array is larger than existing array then initialize its components with given parameter.
      Parameters:
        `data` - source array, may be null.
        `size` - size of new array
        `initial` - initial value of new components.

    - #### realloc

          public static float[] realloc(float[] data,
                                        int size,
                                        float initial)

      Create a new array with given size, if size is different than given array. Copy as much as possible data of the given array into the new array. If new array is larger than given array, the empty space is not initialized. If new array is larger than existing array then initialize its components with given parameter.
      Parameters:
        `data` - source array, may be null.
        `size` - size of new array
        `initial` - initial value of new components.

    - #### realloc

          public static int[] realloc(int[] data,
                                      int size,
                                      int initial)

      Create a new array with given size, if size is different than given array. Copy as much as possible data of the given array into the new array. If new array is larger than given array, the empty space is not initialized. If new array is larger than existing array then initialize its components with given parameter.
      Parameters:
        `data` - source array, may be null.
        `size` - size of new array
        `initial` - initial value of new components.

    - #### realloc

          public static boolean[] realloc(boolean[] data,
                                          int size,
                                          boolean initial)

      Create a new array with given size, if size is different than given array. Copy as much as possible data of the given array into the new array. If new array is larger than given array, the empty space is not initialized. If new array is larger than existing array then initialize its components with given parameter.
      Parameters:
        `data` - source array, may be null.
        `size` - size of new array
        `initial` - initial value of new components.

    - #### realloc

          public static java.lang.String[] realloc(java.lang.String[] data,
                                                   int size,
                                                   java.lang.String initial)

      Create a new array with given size, if size is different than given array. Copy as much as possible data of the given array into the new array. If new array is larger than given array, the empty space is not initialized. If new array is larger than existing array then initialize its components with given parameter.
      Parameters:
        `data` - source array, may be null.
        `size` - size of new array
        `initial` - initial value of new components.

    - #### invert

          public static void invert(java.lang.Object[] data)

      Invert order of all entries, i.e. the first entry becomes the last entry.
      Parameters:
        `data` - source array, may be null.
      Since:
        JavaView 3.96.020.
      Version:
        15.06.06, 1.00 created (kp)

"

The software JavaView? is copyright protected. All Rights Reserved.
"