|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectsdf.SDF
public class SDF
Shortest distance functions are an example of a valuation algebra and this class is a possible implementation of the valuation interface for the case of shortest distance functions. Internally it is represented by a two- dimensional hashtable.
Nested Class Summary | |
---|---|
class |
SDF.SDF_Predictor
A weight predictor for distance functions implemented with the SINGLETON design pattern. |
Nested classes/interfaces inherited from interface nenok.va.Idempotency |
---|
Idempotency.Implementor |
Nested classes/interfaces inherited from interface nenok.va.Predictability |
---|
Predictability.Implementor |
Constructor Summary | |
---|---|
|
SDF(FiniteVariable[] variables,
double[][] values)
Constructor: |
protected |
SDF(FiniteVariable[] variables,
Hashtable<FiniteVariable,Hashtable<FiniteVariable,Double>> values)
Constructor: |
Method Summary | |
---|---|
Object |
clone()
Clones this SDF. |
Valuation |
combine(Valuation val)
Combines this SDF with val and returns a new SDF object. |
boolean |
equals(Object o)
Compares SDFs for equality. |
Valuation |
extension(Domain dom)
Calculates the vacuous extension of this SDF to the specified domain. |
Separativity |
inverse()
|
Domain |
label()
Returns the domain of this SDF. |
Valuation |
marginalize(Domain dom)
Marginalizes this SDF to the domain dom. |
protected static boolean |
numericTest(double d1,
double d2)
This test compares two numeric double values on equality. |
Predictor |
predictor()
|
Scalability |
scale()
|
String |
toString()
|
int |
weight()
|
Methods inherited from class java.lang.Object |
---|
finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public SDF(FiniteVariable[] variables, double[][] values)
variables
- The nodes of the network that this distance function covers.values
- The values for each possible link. (bidimensional array)
If variables is of size n, then values must be of size n*n.protected SDF(FiniteVariable[] variables, Hashtable<FiniteVariable,Hashtable<FiniteVariable,Double>> values)
variables
- The nodes of the network that this distance function covers.values
- The values for each possible link. (bidimensional hashtable)
If variables is of size n, then values must be of size n*n.Method Detail |
---|
public Domain label()
label
in interface Labeled
Labeled.label()
public Valuation combine(Valuation val)
combine
in interface Valuation
val
- the SDF this SDF is to be combined with
Valuation.combine(nenok.va.Valuation)
public Valuation marginalize(Domain dom)
marginalize
in interface Valuation
dom
- the domain this SDF is to be projected to
Valuation.marginalize(nenok.va.Domain)
public Valuation extension(Domain dom)
dom
- The domain to which this SDF is to be extended.
public Object clone()
clone
in class Object
Object.clone()
public Separativity inverse()
inverse
in interface Separativity
Regularity
public Scalability scale()
scale
in interface Scalability
Scalability.scale()
public int weight()
weight
in interface Valuation
Valuation.weight()
public Predictor predictor()
predictor
in interface Predictability
public boolean equals(Object o)
equals
in class Object
o
- the object this SDF is to be compared to
Object.equals(java.lang.Object)
public String toString()
toString
in class Object
Object.toString()
protected static boolean numericTest(double d1, double d2)
d1
- The first value.d2
- The second value.
true
, if the two values are equal.
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |