Package org.ejml.data
Class IGrowArray
java.lang.Object
org.ejml.data.IGrowArray
An integer array which can have its size changed
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
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
setTo
(IGrowArray original)
-
Field Details
-
data
public int[] data -
length
public int length
-
-
Constructor Details
-
IGrowArray
public IGrowArray(int length) -
IGrowArray
public IGrowArray()
-
-
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
-
setTo
-
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()
-