public class GVectorf extends Object implements Serializable
Modifier and Type | Field and Description |
---|---|
private float[] |
m_afTuple
Vector data.
|
private int |
m_iSize
Vector size.
|
private static long |
serialVersionUID |
Constructor and Description |
---|
GVectorf()
Construct a general vector of size 0.
|
GVectorf(GVectorf rkV)
Construct a general vector that is the copy of the input vector.
|
GVectorf(int iSize)
Construct a general vector of size iSize.
|
GVectorf(int iSize,
float[] afTuple)
Construct a general vector of size iSize.
|
Modifier and Type | Method and Description |
---|---|
void |
dispose()
Delete the vector data.
|
float |
Dot(GVectorf rkV)
Return the dot-product of this vector with the input vector.
|
boolean |
equals(GVectorf in) |
float |
Get(int i)
Get the vector value at position i.
|
int |
GetSize()
Get the vector size.
|
float |
Length()
Return the length of this vector.
|
float |
Normalize()
Normalize this vector, return the length.
|
void |
Set(int i,
float fValue)
Set the vector value at position i.
|
void |
SetSize(int iSize)
Set the vector size.
|
float |
SquaredLength()
Return the squared length of this vector.
|
private static final long serialVersionUID
private int m_iSize
private float[] m_afTuple
public GVectorf()
public GVectorf(GVectorf rkV)
rkV
- the vector to copy.public GVectorf(int iSize)
iSize
- size of the new vector.public GVectorf(int iSize, float[] afTuple)
iSize
- size of the new vector.afTuple
- new vector values.public void dispose()
public float Dot(GVectorf rkV)
rkV
- input vector.public float Get(int i)
i
- position to get.public int GetSize()
public float Length()
public float Normalize()
public void Set(int i, float fValue)
i
- position to set.fValue
- new value.public void SetSize(int iSize)
iSize
- new vector size.public float SquaredLength()
public boolean equals(GVectorf in)