Package org.ejml.data

Class DGrowArray

java.lang.Object
org.ejml.data.DGrowArray

public class DGrowArray
extends java.lang.Object
A double array which can have its size changed
  • Field Summary

    Fields 
    Modifier and Type Field Description
    double[] data  
    int length  
  • Constructor Summary

    Constructors 
    Constructor Description
    DGrowArray()  
    DGrowArray​(int length)  
  • Method Summary

    Modifier and Type Method Description
    void free()  
    double get​(int index)  
    void growInternal​(int amount)
    Increases the internal array's length by the specified amount.
    int length()  
    void reset()  
    DGrowArray reshape​(int length)
    Changes the array's length and doesn't attempt to preserve previous values if a new array is required
    void set​(int index, double value)  
    void set​(DGrowArray original)  

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • data

      public double[] data
    • length

      public int length
  • Constructor Details

  • Method Details

    • length

      public int length()
    • reset

      public void reset()
    • reshape

      public DGrowArray reshape​(int length)
      Changes the array's length and doesn't attempt to preserve previous values if a new array is required
      Parameters:
      length - New array length
    • growInternal

      public void growInternal​(int amount)
      Increases the internal array's length by the specified amount. Previous values are preserved. The length value is not modified since this does not change the 'meaning' of the array, just increases the amount of data which can be stored in it. this.data = new data_type[ data.length + amount ]
      Parameters:
      amount - Number of elements added to the internal array's length
    • set

      public void set​(DGrowArray original)
    • get

      public double get​(int index)
    • set

      public void set​(int index, double value)
    • free

      public void free()