@Test public void test() throws Exception { DynamicVariablesExample.main(null); }
public static void main(String[] args) throws Exception { DynamicVariables variables = new DynamicVariables(); Variable gaussianVar = variables.newGaussianDynamicVariable("GaussianVar"); Variable multinomialVar = variables.newMultinomialDynamicVariable("MultinomialVar", 2); Variable multinomialVar2 = variables.newMultinomialDynamicVariable("MultinomialVar2", Arrays.asList("TRUE, FALSE")); variables.block(); Variable gaussianVarInt = gaussianVar.getInterfaceVariable(); Variable multinomialVarInt = multinomialVar.getInterfaceVariable(); Variable mainMultinomialVar = variables.getVariableFromInterface(multinomialVarInt); System.out.println("Is Variable "+gaussianVar.getName()+" an interface variable? " +gaussianVar.isInterfaceVariable()); System.out.println("Is Variable "+gaussianVarInt.getName()+" an interface variable? " +gaussianVarInt.isInterfaceVariable()); System.out.println("Is Variable "+multinomialVar.getName()+" a dynamic variable? " +gaussianVar.isDynamicVariable()); }
DynamicVariablesExample { public static void main(String[] args) throws Exception { DynamicVariables variables = new DynamicVariables(); Variable gaussianVar = variables.newGaussianDynamicVariable("GaussianVar"); Variable multinomialVar = variables.newMultinomialDynamicVariable("MultinomialVar", 2); Variable multinomialVar2 = variables.newMultinomialDynamicVariable("MultinomialVar2", Arrays.asList("TRUE, FALSE")); variables.block(); Variable gaussianVarInt = gaussianVar.getInterfaceVariable(); Variable multinomialVarInt = multinomialVar.getInterfaceVariable(); Variable mainMultinomialVar = variables.getVariableFromInterface(multinomialVarInt); System.out.println("Is Variable "+gaussianVar.getName()+" an interface variable? " +gaussianVar.isInterfaceVariable()); System.out.println("Is Variable "+gaussianVarInt.getName()+" an interface variable? " +gaussianVarInt.isInterfaceVariable()); System.out.println("Is Variable "+multinomialVar.getName()+" a dynamic variable? " +gaussianVar.isDynamicVariable()); } }
DynamicVariablesExample { public static void main(String[] args) throws Exception { DynamicVariables variables = new DynamicVariables(); Variable gaussianVar = variables.newGaussianDynamicVariable("GaussianVar"); Variable multinomialVar = variables.newMultinomialDynamicVariable("MultinomialVar", 2); Variable multinomialVar2 = variables.newMultinomialDynamicVariable("MultinomialVar2", Arrays.asList("TRUE, FALSE")); variables.block(); Variable gaussianVarInt = gaussianVar.getInterfaceVariable(); Variable multinomialVarInt = multinomialVar.getInterfaceVariable(); Variable mainMultinomialVar = variables.getVariableFromInterface(multinomialVarInt); System.out.println("Is Variable "+gaussianVar.getName()+" an interface variable? " +gaussianVar.isInterfaceVariable()); System.out.println("Is Variable "+gaussianVarInt.getName()+" an interface variable? " +gaussianVarInt.isInterfaceVariable()); System.out.println("Is Variable "+multinomialVar.getName()+" a dynamic variable? " +gaussianVar.isDynamicVariable()); }  }
DynamicVariablesExample { public static void main(String[] args) throws Exception { DynamicVariables variables = new DynamicVariables(); Variable gaussianVar = variables.newGaussianDynamicVariable("GaussianVar"); Variable multinomialVar = variables.newMultinomialDynamicVariable("MultinomialVar", 2); Variable multinomialVar2 = variables.newMultinomialDynamicVariable("MultinomialVar2", Arrays.asList("TRUE, FALSE")); variables.block(); Variable gaussianVarInt = gaussianVar.getInterfaceVariable(); Variable multinomialVarInt = multinomialVar.getInterfaceVariable(); Variable mainMultinomialVar = variables.getVariableFromInterface(multinomialVarInt); System.out.println("Is Variable "+gaussianVar.getName()+" an interface variable? " +gaussianVar.isInterfaceVariable()); System.out.println("Is Variable "+gaussianVarInt.getName()+" an interface variable? " +gaussianVarInt.isInterfaceVariable()); System.out.println("Is Variable "+multinomialVar.getName()+" a dynamic variable? " +gaussianVar.isDynamicVariable()); }  static void main(String[] args); }
DynamicVariablesExample { public static void main(String[] args) throws Exception { DynamicVariables variables = new DynamicVariables(); Variable gaussianVar = variables.newGaussianDynamicVariable("GaussianVar"); Variable multinomialVar = variables.newMultinomialDynamicVariable("MultinomialVar", 2); Variable multinomialVar2 = variables.newMultinomialDynamicVariable("MultinomialVar2", Arrays.asList("TRUE, FALSE")); variables.block(); Variable gaussianVarInt = gaussianVar.getInterfaceVariable(); Variable multinomialVarInt = multinomialVar.getInterfaceVariable(); Variable mainMultinomialVar = variables.getVariableFromInterface(multinomialVarInt); System.out.println("Is Variable "+gaussianVar.getName()+" an interface variable? " +gaussianVar.isInterfaceVariable()); System.out.println("Is Variable "+gaussianVarInt.getName()+" an interface variable? " +gaussianVarInt.isInterfaceVariable()); System.out.println("Is Variable "+multinomialVar.getName()+" a dynamic variable? " +gaussianVar.isDynamicVariable()); }  static void main(String[] args);  }