|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectweka.core.setupgenerator.SpaceDimension
public class SpaceDimension
Represents a single dimension in a multi-dimensional space.
| Field Summary | |
|---|---|
protected String |
m_Label
the label for the axis. |
protected String[] |
m_List
the underlying list of values. |
protected double |
m_Max
the maximum on the axis. |
protected double |
m_Min
the minimum on the axis. |
protected double |
m_Step
the step size for the axis. |
protected int |
m_Type
the type of dimension. |
protected int |
m_Width
the number of points on the axis. |
| Constructor Summary | |
|---|---|
SpaceDimension(AbstractParameter param)
initializes the dimension (for numeric values). |
|
SpaceDimension(double min,
double max,
double step,
String label)
initializes the dimension (for numeric values). |
|
SpaceDimension(int min,
int max,
String[] list,
String label)
initializes the dimension (for list values). |
|
| Method Summary | |
|---|---|
boolean |
equals(Object o)
Tests itself against the provided dimension object. |
String |
getLabel()
returns the label for the axis. |
String[] |
getList()
Returns the list of values, null in case of a numeric dimension that is based on a mathematical function. |
int |
getLocation(Object value)
returns the closest index for the given value in the dimension. |
double |
getMax()
returns the right border. |
double |
getMin()
returns the left border. |
double |
getStep()
returns the step size on the axis. |
int |
getType()
returns the tye of dimension. |
Object |
getValue(int x)
returns the value at the given point in the dimension. |
protected void |
initFunction(double min,
double max,
double step,
String label)
initializes the dimension (for numeric values). |
protected void |
initList(int min,
int max,
String[] list,
String label)
initializes the dimension (for list values). |
boolean |
isOnBorder(double value)
checks whether the given value is on the border of the dimension. |
boolean |
isOnBorder(int location)
checks whether the given location is on the border of the dimension. |
SpaceDimension |
subdimension(int left,
int right)
returns a sub-dimension with the same type/step/list, but different borders. |
String |
toString()
Returns a string representation of the dimension. |
int |
width()
returns the number of points on the axis (incl. |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected int m_Type
protected double m_Min
protected double m_Max
protected double m_Step
protected String m_Label
protected int m_Width
protected String[] m_List
| Constructor Detail |
|---|
public SpaceDimension(AbstractParameter param)
throws Exception
param - the search parameter to obtain the data from
Exception - if splitting of list fails using Utils.splitOptions(String)AbstractParameter#getList(),
Utils.splitOptions(String)
public SpaceDimension(double min,
double max,
double step,
String label)
min - the minimum on the axismax - the maximum on the axisstep - the step size for the axislabel - the label for the axis
public SpaceDimension(int min,
int max,
String[] list,
String label)
min - the minimum index in the list (0-based index)max - the maximum index in the list (0-based index)list - the available valueslabel - the label for the axis| Method Detail |
|---|
protected void initFunction(double min,
double max,
double step,
String label)
min - the minimum on the axismax - the maximum on the axisstep - the step size for the axislabel - the label for the axis
protected void initList(int min,
int max,
String[] list,
String label)
min - the minimum index in the list (0-based index)max - the maximum index in the list (0-based index)list - the available valueslabel - the label for the axispublic boolean equals(Object o)
equals in class Objecto - the dimension object to compare against
public int getType()
MultiSearch#TYPE_FUNCTION,
MultiSearch#TYPE_LISTpublic double getMin()
public double getMax()
public double getStep()
public String getLabel()
public int width()
public String[] getList()
public Object getValue(int x)
x - the x-th point on the axis
public int getLocation(Object value)
value - the value to get the index for
public boolean isOnBorder(double value)
value - the value to check
public boolean isOnBorder(int location)
location - the location to check
public SpaceDimension subdimension(int left,
int right)
left - the left indexright - the right index
public String toString()
toString in class Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||