类 DiscreteFunction
java.lang.Object
weka.classifiers.functions.pace.DiscreteFunction
- 所有已实现的接口:
RevisionHandler
Class for handling discrete functions.
A discrete function here is one that takes non-zero values over a finite set of points.
- 版本:
- $Revision: 1.4 $
- 作者:
- Yong Wang (yongwang@cs.waikato.ac.nz)
-
构造器概要
构造器构造器说明Constructs an empty discrete functionConstructs a discrete function with the point values provides and the function values are all 1/n.Constructs a discrete function with both the point values and function values provided. -
方法概要
修饰符和类型方法说明clone()
Clones the discrete functiondouble
getFunctionValue
(int i) Gets a particular function valuedouble
getPointValue
(int i) Gets a particular point valueReturns the revision string.boolean
isEmpty()
Returns true if it is empty.static void
Normalizes the function values with L1-norm.Returns the combined of two discrete functionsReturns the combined of two discrete functions.void
setFunctionValue
(int i, double v) Sets a particular function valuevoid
setPointValue
(int i, double p) Sets a particular point valueint
size()
Returns the size of the point set.void
sort()
Sorts the point values of the discrete function.timesEquals
(double x) All function values are multiplied by a doubletoString()
Converts the discrete function to string.unique()
Makes each individual point value unique
-
构造器详细资料
-
DiscreteFunction
public DiscreteFunction()Constructs an empty discrete function -
DiscreteFunction
Constructs a discrete function with the point values provides and the function values are all 1/n.- 参数:
p
- the point values
-
DiscreteFunction
Constructs a discrete function with both the point values and function values provided.- 参数:
p
- the point valuesv
- the function values
-
-
方法详细资料
-
normalize
Normalizes the function values with L1-norm. -
sort
public void sort()Sorts the point values of the discrete function. -
clone
Clones the discrete function -
unique
Makes each individual point value unique -
size
public int size()Returns the size of the point set. -
getPointValue
public double getPointValue(int i) Gets a particular point value- 参数:
i
- the index
-
getFunctionValue
public double getFunctionValue(int i) Gets a particular function value- 参数:
i
- the index
-
setPointValue
public void setPointValue(int i, double p) Sets a particular point value- 参数:
i
- the index
-
setFunctionValue
public void setFunctionValue(int i, double v) Sets a particular function value- 参数:
i
- the index
-
isEmpty
public boolean isEmpty()Returns true if it is empty. -
plus
Returns the combined of two discrete functions- 参数:
d
- the second discrete function- 返回:
- the combined discrte function
-
plusEquals
Returns the combined of two discrete functions. The first function is replaced with the new one.- 参数:
d
- the second discrete function- 返回:
- the combined discrte function
-
timesEquals
All function values are multiplied by a double- 参数:
x
- the multiplier
-
toString
Converts the discrete function to string. -
getRevision
Returns the revision string.- 指定者:
getRevision
在接口中RevisionHandler
- 返回:
- the revision
-
main
-