|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objecttextclassifier.discretization.DiscInterval
public class DiscInterval
A class representing an interval created by discretization step.
Field Summary | |
---|---|
static char |
HEQ
|
static char |
HIG
|
static char |
LEQ
Default chars for interval |
static char |
LES
|
Constructor Summary | |
---|---|
DiscInterval(double min,
double max)
Constructor of the class (only border values) |
|
DiscInterval(double min,
double max,
double center,
double dist,
int count)
Constructor of the class (all characteristics) |
Method Summary | |
---|---|
char |
gerRightBranch()
Returns the type of the right branch |
double |
getCenter()
Returns the center value of the interval |
int |
getCount()
Returns the count of values in the interval |
char |
getLeftBranch()
Returns the type of the left branch |
double |
getMax()
Returns the maximum value of the interval |
double |
getMin()
Returns the minimum value of the interval |
java.lang.String |
getSqlCondition(java.lang.String att_name)
Returns a condition for WHERE clause of SQL command that will take all records of a table that satisfy condition of the interval |
void |
incCount()
Increments the count of values inside the interval |
boolean |
isSingle()
Tests if the interval contains only a single value (minimum and maximum are equal) |
boolean |
isValueIn(double value)
Tests if a specified value is inside the interval |
void |
setLeftBranch(char branch_type)
Sets the type of the left branch of interval |
void |
setMax(double m)
Sets the maximum value of the interval |
void |
setMin(double m)
Sets the minimum value of the interval |
void |
setRightBranch(char branch_type)
Sets the type of the right branch of interval |
void |
setSimpleBranches()
Sets a simple (<, >) type of branche for both left and right branches |
java.lang.String |
toString()
Converts information about interval into one string |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final char LEQ
public static final char LES
public static final char HEQ
public static final char HIG
Constructor Detail |
---|
public DiscInterval(double min, double max)
min
- minimum (left) value of the intervalmax
- maximum (right) value of the intervalpublic DiscInterval(double min, double max, double center, double dist, int count)
min
- minimum (left) value of the intervalmax
- maximum (right) value of the intervalcenter
- average of the values inside the intervaldist
- average distance between values inside the intervalcount
- count of values inside the intervalMethod Detail |
---|
public java.lang.String toString()
toString
in class java.lang.Object
public boolean isValueIn(double value)
value
- a numeric value
public int getCount()
public double getCenter()
public double getMin()
public double getMax()
public void setLeftBranch(char branch_type)
branch_type
- the required type of branchpublic void setRightBranch(char branch_type)
branch_type
- the required type of branchpublic char getLeftBranch()
public char gerRightBranch()
public boolean isSingle()
public void setSimpleBranches()
public void setMin(double m)
m
- required minimum valuepublic void setMax(double m)
m
- required maximum valuepublic java.lang.String getSqlCondition(java.lang.String att_name)
att_name
- name of the attribute for condition
public void incCount()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |