com.cra.bnet.engine
Class AmgUtilities

java.lang.Object
  |
  +--com.cra.bnet.engine.AmgUtilities

public class AmgUtilities
extends Object

Add-multiply graph utilities.


Constructor Summary
AmgUtilities()
           
 
Method Summary
static double[] createHardEvidence(int length, int state)
          Returns an array of the specified length that represents hard evidence for the specified state.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AmgUtilities

public AmgUtilities()
Method Detail

createHardEvidence

public static double[] createHardEvidence(int length,
                                          int state)
Returns an array of the specified length that represents hard evidence for the specified state. All elements of the returned array will be 0.0 except the element indexed by the specified state which will be 1.0.

Parameters:
length - length of the array, which should be the number of states of the node.
state - index of the array that will be 1.0.
Returns:
an array of the specified length that represents hard evidence for the specified state.