Package org.ejml.data

Class 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

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      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 Detail

      • data

        public int[] data
      • length

        public int length
    • Constructor Detail

      • IGrowArray

        public IGrowArray​(int length)
      • IGrowArray

        public IGrowArray()
    • Method Detail

      • 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
      • get

        public int get​(int index)
      • set

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

        public void free()