|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectedu.udo.cs.yale.operator.generator.GridFunction
public class GridFunction
Generates a uniformly distributed grid in the given dimensions.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from interface edu.udo.cs.yale.operator.generator.TargetFunction |
|---|
TargetFunction.FunctionException |
| Field Summary | |
|---|---|
private int[] |
counter
|
private double |
dimDistance
|
private double |
lowerBound
|
private int |
maxCounter
|
private int |
numberOfAttributes
|
private int |
numberOfExamples
|
private double |
upperBound
|
| Constructor Summary | |
|---|---|
GridFunction()
|
|
| Method Summary | |
|---|---|
double |
calculate(double[] att)
Calculates the target function on arguments. |
double[] |
createArguments(int number,
RandomGenerator random)
Creates and returns a number of arguments. |
Attribute |
getLabel()
Returns the label attribute. |
private void |
incrementCounter(int[] counter,
int pos)
|
void |
init(RandomGenerator random)
Should be called before the data is created. |
void |
setLowerArgumentBound(double lower)
Sets the lower bound for the arguments. |
void |
setTotalNumberOfAttributes(int number)
Sets the maximal number of attributes. |
void |
setTotalNumberOfExamples(int number)
Sets the maximal number of examples. |
void |
setUpperArgumentBound(double upper)
Sets the upper bound for the arguments. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
private double lowerBound
private double upperBound
private int numberOfExamples
private int numberOfAttributes
private int[] counter
private int maxCounter
private double dimDistance
| Constructor Detail |
|---|
public GridFunction()
| Method Detail |
|---|
public void init(RandomGenerator random)
TargetFunction
init in interface TargetFunctionpublic void setTotalNumberOfExamples(int number)
TargetFunction
setTotalNumberOfExamples in interface TargetFunctionpublic void setTotalNumberOfAttributes(int number)
TargetFunction
setTotalNumberOfAttributes in interface TargetFunctionpublic void setLowerArgumentBound(double lower)
TargetFunction
setLowerArgumentBound in interface TargetFunctionpublic void setUpperArgumentBound(double upper)
TargetFunction
setUpperArgumentBound in interface TargetFunctionpublic Attribute getLabel()
TargetFunction
getLabel in interface TargetFunction
public double calculate(double[] att)
throws TargetFunction.FunctionException
TargetFunction
calculate in interface TargetFunctionTargetFunction.FunctionException
public double[] createArguments(int number,
RandomGenerator random)
throws TargetFunction.FunctionException
TargetFunction
createArguments in interface TargetFunctionTargetFunction.FunctionException
private void incrementCounter(int[] counter,
int pos)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||