| Modifier and Type | Field and Description |
|---|---|
protected float |
xPos
x and y and z positions of the neuron.
|
protected float |
yPos
x and y and z positions of the neuron.
|
protected float |
zPos
x and y and z positions of the neuron.
|
| Constructor and Description |
|---|
Position()
Simple constructor for default values.
|
Position(float xPos,
float yPos)
sophisticated constructor specifying the position.
|
Position(float xPos,
float yPos,
float zPos)
sophisticated constructor specifying the position, with z coordinate
|
Position(Position pos)
copy constructor
|
| Modifier and Type | Method and Description |
|---|---|
Position |
clone()
Returns a shallow clone.
|
double |
distanceTo(Position otherP)
distance to other Position (pythagoras)
|
void |
fromXML(org.jdom2.Element element)
Reads specific attributes from XML tree.
|
float |
getXPos() |
float |
getYPos() |
float |
getZPos() |
void |
set(float[] array)
Set from a float array.
|
void |
set(float xPos,
float yPos)
Set new position in 2D.
|
void |
set(float xPos,
float yPos,
float zPos)
Set new position in 3D.
|
void |
set(Position pos)
Set new position in 3D, copying from another Position.
|
void |
setXPos(float xPos) |
void |
setYPos(float yPos) |
void |
setZPos(float zPos) |
float[] |
toArray()
Convert to a float array.
|
java.lang.String |
toString()
Returns a string representation of this position.
|
org.jdom2.Element |
toXML(org.jdom2.Element element)
Writes attributes to XML tree.
|
protected float xPos
protected float yPos
protected float zPos
public Position()
public Position(Position pos)
public Position(float xPos,
float yPos)
public Position(float xPos,
float yPos,
float zPos)
public Position clone()
clone in class java.lang.Objectpublic org.jdom2.Element toXML(org.jdom2.Element element)
public void fromXML(org.jdom2.Element element)
public float getXPos()
public void setXPos(float xPos)
xPos - New value of property xPos.public float getYPos()
public void setYPos(float yPos)
yPos - New value of property yPos.public float getZPos()
public void setZPos(float zPos)
zPos - New value of property zPos.public void set(float xPos,
float yPos)
public void set(float xPos,
float yPos,
float zPos)
public void set(Position pos)
public float[] toArray()
public void set(float[] array)
public double distanceTo(Position otherP)
public java.lang.String toString()
toString in class java.lang.Object