|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.knime.base.node.mine.sota.logic.SotaTreeCell
public class SotaTreeCell
Field Summary | |
---|---|
static String |
DEFAULT_CLASS
Default cell class. |
Fields inherited from interface org.knime.base.node.mine.sota.view.interaction.Locatable |
---|
X, Y |
Constructor Summary | |
---|---|
SotaTreeCell(int dimension,
boolean isCell)
Creates new instance of Cell with given dimension of data vector and given isCell flag. |
|
SotaTreeCell(int dimension,
int lev,
boolean isCell)
Creates new instance of Cell with given dimension of data vector, given level of hierarchy and given isCell flag. |
|
SotaTreeCell(SotaCell[] dat,
boolean isCell)
Creates new instance of Cell with given vector data and given isCell flag. |
|
SotaTreeCell(SotaCell[] dat,
int lev,
boolean isCell)
Creates new instance of Cell with given vector data, given level of hierarchy and given isCell flag. |
Method Summary | |
---|---|
void |
addTreeCellClass(String treeCellClass)
|
void |
deselectSubtree()
Deselects cell and all its children and subchildren recursively. |
SotaTreeCell |
getAncestor()
Returns the cells ancestor. |
String |
getCellType()
|
SotaCell[] |
getData()
Returns the cells data array. |
String |
getDataAsString(int precision)
Returns the cells data as String. |
ArrayList<Integer> |
getDataIds()
Returns the cells Ids of according data sets. |
int |
getEndX()
Returns the objects end X coordinate. |
int |
getEndY()
Returns the objects end Y coordinate. |
int |
getHierarchyLevel()
|
SotaTreeCell |
getLeft()
Returns the left child Cell of the current Node, or null . |
int |
getLevel()
Returns the cells level of hierarchy inside the binary tree. |
int |
getLevelInHierarchy()
|
double |
getMaxDistance()
Returns the maximum distance between the data related to the cell. |
double |
getResource()
Returns the cells resource value. |
SotaTreeCell |
getRight()
Returns the cells (Nodes) right child Cell. |
ArrayList<RowKey> |
getRowKeys()
|
String |
getRowKeysAsString()
Returns the RowKeys as a string separated with ",". |
SotaTreeCell |
getSister()
|
int |
getStartX()
Returns the objects start X coordinate. |
int |
getStartY()
Returns the objects start Y coordinate. |
String |
getTreeCellClass()
|
boolean |
isCell()
Returns true if the cell is a Cell, false
if it is a Node. |
boolean |
isHilited()
Returns true if object is hilited, false if
not. |
boolean |
isSelected()
Returns true if object is selected, false
if not. |
void |
loadFrom(ModelContentRO modelContent,
int index,
SotaTreeCell anchestor,
boolean isLeft)
Loads the values from the given ModelContentWO . |
void |
saveTo(ModelContentWO modelContent,
int index)
Saves the value of the SotaTreeCell to the given
ModelContentWO . |
void |
setAncestor(SotaTreeCell anc)
Sets the given ancestor value. |
void |
setCell(boolean cell)
Sets the given isCell flag. |
void |
setCellHilited(boolean hilit)
Sets the hilit flag to the cell without recursive method call. |
void |
setCellSelected(boolean select)
Sets the select flag to the cell without recursive method call. |
void |
setData(SotaCell[] dat)
Sets the given data array. |
void |
setDataIds(ArrayList<Integer> ids)
Sets the given Ids of according data sets. |
void |
setEndX(int x)
Sets the given end x coordinate. |
void |
setEndY(int y)
Sets the given end y coordinate. |
void |
setHierarchyLevel(int level)
|
void |
setHilited(boolean hilit)
Sets the given hilit flag. |
void |
setLeft(SotaTreeCell l)
Sets the cells (Nodes) left child Cell. |
void |
setLevel(int lev)
Sets the cells level of hierarchy inside the binary tree. |
void |
setLevelInHierarchy(int levelInHierarchy)
|
void |
setMaxDistance(double maxDist)
Sets the given value as maximum distance between the data related to the cell. |
void |
setResource(double res)
Sets the given value as the cells resource value. |
void |
setRight(SotaTreeCell r)
Sets the given Cell as the cells right child Cell. |
void |
setSelected(boolean select)
Sets the given select flag. |
void |
setSister(SotaTreeCell sister)
|
void |
setStartX(int x)
Sets the given start x coordinate. |
void |
setStartY(int y)
Sets the given start y coordinate. |
void |
split()
Splits the current cell that it becomes a Node. |
void |
split(int hierarchicalLev)
Splits the current cell that it becomes a Node. |
void |
split(int lev,
int hierarchicalLev)
Splits the current cell that it becomes a Node. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String DEFAULT_CLASS
Constructor Detail |
---|
public SotaTreeCell(int dimension, int lev, boolean isCell)
isCell
flag.
dimension
- Dimension of the data vector.lev
- hierarchy level of the cellisCell
- flags if cell is a Cell or a Nodepublic SotaTreeCell(int dimension, boolean isCell)
dimension
- dimension of the data vectorisCell
- flags if cell is a Cell or a Nodepublic SotaTreeCell(SotaCell[] dat, int lev, boolean isCell)
dat
- data to set to the data vectorlev
- hierarchy level of the cellisCell
- flags if Cell is a Cell or a Nodepublic SotaTreeCell(SotaCell[] dat, boolean isCell)
dat
- data to set to the data vectorisCell
- flags if cell is a Cell or a NodeMethod Detail |
---|
public String getTreeCellClass()
public void addTreeCellClass(String treeCellClass)
treeCellClass
- the class to assign to the tree cell.public void split(int lev, int hierarchicalLev)
lev
- the level to set to the newly created cellshierarchicalLev
- the fuzzy rule level (is only used when training
with hierarchical fuzzy data)public void split(int hierarchicalLev)
hierarchicalLev
- the fuzzy rule level (is only used when training
with hierarchical fuzzy data)public void split()
public String getDataAsString(int precision)
precision
- the decimal precision to use for the values
public SotaTreeCell getAncestor()
public void setAncestor(SotaTreeCell anc)
anc
- the cells ancestor to setpublic SotaTreeCell getSister()
public void setSister(SotaTreeCell sister)
sister
- The sister to set.public SotaCell[] getData()
public void setData(SotaCell[] dat)
dat
- the cells data array to setpublic ArrayList<Integer> getDataIds()
public void setDataIds(ArrayList<Integer> ids)
ids
- the cells Ids of according data sets to setpublic boolean isCell()
true
if the cell is a Cell, false
if it is a Node.
true
if the cell is a Cell, false
if it is a Nodepublic void setCell(boolean cell)
true
it is a Cell else it
is a Node.
cell
- if true
it is a Cell else it is a Nodepublic SotaTreeCell getLeft()
null
.
null
public void setLeft(SotaTreeCell l)
l
- the cells (Nodes) left child Cell to setpublic int getLevel()
public void setLevel(int lev)
lev
- the cells level of hierarchy inside the binary tree to setpublic double getMaxDistance()
public void setMaxDistance(double maxDist)
maxDist
- the maximum distance between the data related to the cell
to setpublic double getResource()
public void setResource(double res)
res
- the value to set as the cells resource valuepublic SotaTreeCell getRight()
public void setRight(SotaTreeCell r)
r
- the Cell to set as the cells right child Cellpublic int getStartX()
getStartX
in interface Locatable
public int getStartY()
getStartY
in interface Locatable
public int getEndX()
getEndX
in interface Locatable
public int getEndY()
getEndY
in interface Locatable
public void setStartX(int x)
setStartX
in interface Locatable
x
- the start x coordinate to setpublic void setStartY(int y)
setStartY
in interface Locatable
y
- the start y coordinate to setpublic void setEndX(int x)
setEndX
in interface Locatable
x
- the end x coordinate to setpublic void setEndY(int y)
setEndY
in interface Locatable
y
- the end y coordinate to setpublic boolean isHilited()
true
if object is hilited, false
if
not.
isHilited
in interface Hiliteable
true
if object is hilited, false
if
notpublic void setHilited(boolean hilit)
setHilited
in interface Hiliteable
hilit
- hilitflag to setpublic void setCellHilited(boolean hilit)
hilit
- flag to setpublic int getHierarchyLevel()
public void setHierarchyLevel(int level)
level
- the hierarchyLevel to setpublic int getLevelInHierarchy()
public void setLevelInHierarchy(int levelInHierarchy)
levelInHierarchy
- the levelInHierarchy to setpublic ArrayList<RowKey> getRowKeys()
public String getCellType()
public String getRowKeysAsString()
public boolean isSelected()
true
if object is selected, false
if not.
isSelected
in interface Selectable
true
if object is selected, false
if notpublic void setSelected(boolean select)
setSelected
in interface Selectable
select
- selectflag to setpublic void setCellSelected(boolean select)
select
- flag to setpublic void deselectSubtree()
public final void saveTo(ModelContentWO modelContent, int index)
SotaTreeCell
to the given
ModelContentWO
.
modelContent
- The ModelContentWO
to save the cells
to.index
- The index of the cell to save.public void loadFrom(ModelContentRO modelContent, int index, SotaTreeCell anchestor, boolean isLeft) throws InvalidSettingsException
ModelContentWO
.
modelContent
- The ModelContentWO
to load the cells
from.index
- The index of the cell to load.anchestor
- The anchsetor cell of the cell to load.isLeft
- Specifies if the cell to load is a cell at the left side of
its anchestor.
InvalidSettingsException
- If setting to load is not valid.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |