|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectsimbad.piconode.visual.NNShape
simbad.piconode.visual.NNNode
public class NNNode
This class provides neuron representation, graphics and attributes
Field Summary | |
---|---|
static int |
_HIDDEN
|
static int |
_INPUT
|
static int |
_OUTPUT
|
static int |
_RAYON
|
static int |
_UNKNOWN
|
private java.lang.String |
function
|
static java.lang.String[] |
functions
|
(package private) java.util.Vector |
inputArcs
|
private int |
myId
|
private static int |
nbHiddenNode
|
private static int |
nbInputNode
|
private static int |
nbNode
|
private static int |
nbOutputNode
|
(package private) java.util.Vector |
outputArcs
|
private int |
positionX
|
private int |
positionY
|
private java.lang.String |
type
|
static java.lang.String[] |
types
|
private boolean |
undernode
|
(package private) java.lang.String |
underNodeDescription
|
private double |
valeur
|
Fields inherited from class simbad.piconode.visual.NNShape |
---|
color, id, inverseTempSelection, name, selected |
Constructor Summary | |
---|---|
NNNode()
|
|
NNNode(int x,
int y,
boolean gridActivated)
Constructor from scratch |
|
NNNode(NNNode node_arg)
Constructor, copy the node passed in argument and modify its position. |
|
NNNode(java.lang.String idnumber_arg,
java.lang.String name_arg,
java.lang.String type_arg,
java.lang.String function_arg,
java.lang.String x_arg,
java.lang.String y_arg,
java.lang.String red_arg,
java.lang.String green_arg,
java.lang.String blue_arg)
Constructor: used to convert an xml string into a Node |
Method Summary | |
---|---|
(package private) boolean |
contains(int x_arg,
int y_arg)
return true if the point is included in the circle. |
void |
delete(NNList list)
delete a node |
(package private) void |
generateId()
Generate an Id if necessary |
java.lang.String |
getFunction()
|
protected java.util.Vector |
getInputArcs()
|
int |
getMyId()
|
protected java.util.Vector |
getOutputArcs()
|
int |
getPositionX()
|
int |
getPositionY()
|
java.lang.String |
getType()
|
java.lang.String |
getUnderNode()
|
double |
getValeur()
|
boolean |
hasUnderNode()
|
(package private) boolean |
isInRect(java.awt.Rectangle rect)
return true if the center of the node is placed in the rect |
(package private) void |
paint(java.awt.Graphics2D g2)
|
protected void |
replace(int number)
replace a node considering his type and number. |
void |
replaceForGrid()
Recalculate x and y in function of the grid |
(package private) static void |
resetNbNode()
Reset the number of nodes in the program |
void |
setFunction(int function)
|
void |
setFunction(java.lang.String function)
|
protected void |
setInputArcs(java.util.Vector inputArcs)
|
void |
setMyId(int myId)
|
protected void |
setOutputArcs(java.util.Vector outputArcs)
|
void |
setPositionX(int positionX)
|
void |
setPositionY(int positionY)
|
void |
setType(int type)
|
void |
setType(java.lang.String type)
|
void |
setValeur(double valeur)
|
java.lang.String |
toXML()
Convert the node in an XML string |
void |
translate(int dx,
int dy)
translate the neuron of dx in x and dy in y |
Methods inherited from class simbad.piconode.visual.NNShape |
---|
getColor, getName, inverseSelectionState, isInverseTempSelection, isSelected, setColor, setInverseTempSelection, setName, setSelected |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int _RAYON
public static final int _UNKNOWN
public static final int _INPUT
public static final int _OUTPUT
public static final int _HIDDEN
public static final java.lang.String[] types
public static final java.lang.String[] functions
private static int nbNode
private static int nbInputNode
private static int nbOutputNode
private static int nbHiddenNode
private int positionX
private int positionY
private java.lang.String type
private java.lang.String function
private double valeur
private int myId
java.lang.String underNodeDescription
private boolean undernode
java.util.Vector inputArcs
java.util.Vector outputArcs
Constructor Detail |
---|
NNNode(int x, int y, boolean gridActivated)
x
- the x coordinate of the graphic representationy
- the y coordinategridActivated
- indicates wether grid is set in NNCanvas.NNNode(NNNode node_arg)
node_arg
- the node to copyNNNode(java.lang.String idnumber_arg, java.lang.String name_arg, java.lang.String type_arg, java.lang.String function_arg, java.lang.String x_arg, java.lang.String y_arg, java.lang.String red_arg, java.lang.String green_arg, java.lang.String blue_arg)
idnumber_arg
- name_arg
- type_arg
- function_arg
- x_arg
- y_arg
- red_arg
- green_arg
- blue_arg
- NNNode()
Method Detail |
---|
void generateId()
static void resetNbNode()
public void delete(NNList list)
list
- the list from wich the node has to be deletedprotected void replace(int number)
number
- : number zero will be placed in bottom case,number two in the third case etc...boolean isInRect(java.awt.Rectangle rect)
rect
-
boolean contains(int x_arg, int y_arg)
x_arg
- y_arg
-
public int getPositionX()
public void setPositionX(int positionX)
public int getPositionY()
public void setPositionY(int positionY)
void paint(java.awt.Graphics2D g2)
paint
in class NNShape
public void translate(int dx, int dy)
dx
- dy
- public java.lang.String getFunction()
public void setFunction(java.lang.String function)
public void setFunction(int function)
public java.lang.String getType()
public void setType(java.lang.String type)
public void setType(int type)
public double getValeur()
public void setValeur(double valeur)
public java.lang.String toXML()
toXML
in class NNShape
public int getMyId()
public void setMyId(int myId)
public void replaceForGrid()
protected java.util.Vector getInputArcs()
protected void setInputArcs(java.util.Vector inputArcs)
protected java.util.Vector getOutputArcs()
protected void setOutputArcs(java.util.Vector outputArcs)
public boolean hasUnderNode()
public java.lang.String getUnderNode()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |