Package org.ejml.data

Class FGrowArray


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

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

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

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void free()  
      float get​(int index)  
      void growInternal​(int amount)
      Increases the internal array's length by the specified amount.
      int length()  
      void 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, float value)  
      void set​(FGrowArray original)  
      • Methods inherited from class java.lang.Object

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

      • data

        public float[] data
      • length

        public int length
    • Constructor Detail

      • FGrowArray

        public FGrowArray​(int length)
      • FGrowArray

        public FGrowArray()
    • Method Detail

      • length

        public int length()
      • reshape

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

        public float get​(int index)
      • set

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

        public void free()