DoubleArray
jhplot.math.num

Class DoubleArray



  • public class DoubleArrayextends Object
    An expandable double array.
    • Constructor Summary

      Constructors 
      Constructor and Description
      DoubleArray() 
    • Method Summary

      Methods 
      Modifier and TypeMethod and Description
      voidadd(double value)
      Adds an element to the end of this expandable array.
      voidclear()
      Remove all elements from this collection.
      doubleget(int index)
      Access the element at the given index.
      intgetSize()
      Access the size of this array.
      voidset(int index, double value)
      Modify the element at the given index.
      voidsetSize(int n)
      Modify the size of this array.
      double[]toArray()
      Convert this array into a native array.
    • Constructor Detail

      • DoubleArray

        public DoubleArray()
    • Method Detail

      • add

        public void add(double value)
        Adds an element to the end of this expandable array.
        Parameters:
        value - to be added to end of array
      • clear

        public void clear()
        Remove all elements from this collection.
      • get

        public double get(int index)
        Access the element at the given index.
        Parameters:
        index - the index of the element to retrieve.
        Returns:
        the index-th element.
      • getSize

        public int getSize()
        Access the size of this array.
        Returns:
        the size.
      • set

        public void set(int index,       double value)
        Modify the element at the given index. The array may be expanded to hold a value at the given index.
        Parameters:
        index - the index of the element to modify.
        value - the new index-th element value.
      • setSize

        public void setSize(int n)
        Modify the size of this array.
        Parameters:
        n - the new array size.
      • toArray

        public double[] toArray()
        Convert this array into a native array.
        Returns:
        the native array.

SCaVis 2.0 © jWork.ORG