Package ffx.openmm
Class DoubleArray
java.lang.Object
ffx.openmm.DoubleArray
DoubleArray wrapper.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidappend(double value) Append a double value to the array.voiddestroy()Destroy the array.doubleget(int index) Get a value from the array.com.sun.jna.ptr.PointerByReferenceGet the pointer to the array.intgetSize()Get the size of the array.voidresize(int size) Resize the array.voidset(int index, double value) Set a value in the array.
-
Constructor Details
-
DoubleArray
public DoubleArray(int size) Constructor.- Parameters:
size- The size of the array.
-
-
Method Details
-
append
public void append(double value) Append a double value to the array.- Parameters:
value- The value to append.
-
destroy
public void destroy()Destroy the array. -
get
public double get(int index) Get a value from the array.- Parameters:
index- The index of the value.- Returns:
- The value.
-
getPointer
public com.sun.jna.ptr.PointerByReference getPointer()Get the pointer to the array.- Returns:
- The pointer.
-
getSize
public int getSize()Get the size of the array.- Returns:
- The size.
-
resize
public void resize(int size) Resize the array.- Parameters:
size- The new size.
-
set
public void set(int index, double value) Set a value in the array.- Parameters:
index- The index of the value.value- The value.
-