Package org.ejml.data

Class IGrowArray

java.lang.Object
org.ejml.data.IGrowArray

public class IGrowArray
extends java.lang.Object
An integer array which can have its size changed
  • Field Summary

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

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

    Modifier and Type Method Description
    void add​(int value)  
    void clear()  
    void free()  
    int get​(int index)  
    void growInternal​(int amount)
    Increases the internal array's length by the specified amount.
    int length()  
    void reshape​(int length)  
    void set​(int index, int value)  
    void set​(IGrowArray original)  

    Methods inherited from class java.lang.Object

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

    • data

      public int[] data
    • length

      public int length
  • Constructor Details

  • Method Details

    • length

      public int length()
    • reshape

      public void reshape​(int 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​(IGrowArray original)
    • get

      public int get​(int index)
    • set

      public void set​(int index, int value)
    • add

      public void add​(int value)
    • clear

      public void clear()
    • free

      public void free()