@Test public void test() throws Exception { VariablesExample.main(null); }
public static void main(String[] args) throws Exception { Variables variables = new Variables(); Variable gaussianVar = variables.newGaussianVariable("Gaussian"); Variable multinomialVar = variables.newMultinomialVariable("Multinomial", 2); Variable multinomialVar2 = variables.newMultinomialVariable("Multinomial2", Arrays.asList("TRUE, FALSE")); FiniteStateSpace states = multinomialVar2.getStateSpaceType(); states.getStatesNames().forEach(System.out::println); System.out.println("Can a Gaussian variable be parent of Multinomial variable? " + (multinomialVar.getDistributionType().isParentCompatible(gaussianVar))); System.out.println("Can a Multinomial variable be parent of Gaussian variable? " + (gaussianVar.getDistributionType().isParentCompatible(multinomialVar))); }
VariablesExample { public static void main(String[] args) throws Exception { Variables variables = new Variables(); Variable gaussianVar = variables.newGaussianVariable("Gaussian"); Variable multinomialVar = variables.newMultinomialVariable("Multinomial", 2); Variable multinomialVar2 = variables.newMultinomialVariable("Multinomial2", Arrays.asList("TRUE, FALSE")); FiniteStateSpace states = multinomialVar2.getStateSpaceType(); states.getStatesNames().forEach(System.out::println); System.out.println("Can a Gaussian variable be parent of Multinomial variable? " + (multinomialVar.getDistributionType().isParentCompatible(gaussianVar))); System.out.println("Can a Multinomial variable be parent of Gaussian variable? " + (gaussianVar.getDistributionType().isParentCompatible(multinomialVar))); } }
VariablesExample { public static void main(String[] args) throws Exception { Variables variables = new Variables(); Variable gaussianVar = variables.newGaussianVariable("Gaussian"); Variable multinomialVar = variables.newMultinomialVariable("Multinomial", 2); Variable multinomialVar2 = variables.newMultinomialVariable("Multinomial2", Arrays.asList("TRUE, FALSE")); FiniteStateSpace states = multinomialVar2.getStateSpaceType(); states.getStatesNames().forEach(System.out::println); System.out.println("Can a Gaussian variable be parent of Multinomial variable? " + (multinomialVar.getDistributionType().isParentCompatible(gaussianVar))); System.out.println("Can a Multinomial variable be parent of Gaussian variable? " + (gaussianVar.getDistributionType().isParentCompatible(multinomialVar))); }  }
VariablesExample { public static void main(String[] args) throws Exception { Variables variables = new Variables(); Variable gaussianVar = variables.newGaussianVariable("Gaussian"); Variable multinomialVar = variables.newMultinomialVariable("Multinomial", 2); Variable multinomialVar2 = variables.newMultinomialVariable("Multinomial2", Arrays.asList("TRUE, FALSE")); FiniteStateSpace states = multinomialVar2.getStateSpaceType(); states.getStatesNames().forEach(System.out::println); System.out.println("Can a Gaussian variable be parent of Multinomial variable? " + (multinomialVar.getDistributionType().isParentCompatible(gaussianVar))); System.out.println("Can a Multinomial variable be parent of Gaussian variable? " + (gaussianVar.getDistributionType().isParentCompatible(multinomialVar))); }  static void main(String[] args); }
VariablesExample { public static void main(String[] args) throws Exception { Variables variables = new Variables(); Variable gaussianVar = variables.newGaussianVariable("Gaussian"); Variable multinomialVar = variables.newMultinomialVariable("Multinomial", 2); Variable multinomialVar2 = variables.newMultinomialVariable("Multinomial2", Arrays.asList("TRUE, FALSE")); FiniteStateSpace states = multinomialVar2.getStateSpaceType(); states.getStatesNames().forEach(System.out::println); System.out.println("Can a Gaussian variable be parent of Multinomial variable? " + (multinomialVar.getDistributionType().isParentCompatible(gaussianVar))); System.out.println("Can a Multinomial variable be parent of Gaussian variable? " + (gaussianVar.getDistributionType().isParentCompatible(multinomialVar))); }  static void main(String[] args);  }