public void setDistributionList(List<EF_ConditionalDistribution> distributionList_) {

    distributionList = distributionList_;

    sizeSS = 0;
    for (EF_ConditionalDistribution ef_dist : distributionList) {
      sizeSS += ef_dist.sizeOfSufficientStatistics();
    }

    CompoundVector vectorNatural = this.createEmtpyCompoundVector();

    for (EF_ConditionalDistribution dist : distributionList) {
      vectorNatural.setVectorByPosition(dist.getVariable().getVarID(), dist.getNaturalParameters());
    }
    this.naturalParameters = vectorNatural;
    this.momentParameters = null;
  }
  public EF_BayesianNetwork(BayesianNetwork network) {
    distributionList = new ArrayList(network.getNumberOfVars());

    sizeSS = 0;
    for (ConditionalDistribution dist : network.getConditionalDistributions()) {
      EF_ConditionalDistribution ef_dist = dist.toEFConditionalDistribution();
      distributionList.add(ef_dist.getVariable().getVarID(), ef_dist);
      sizeSS += ef_dist.sizeOfSufficientStatistics();
    }

    CompoundVector vectorNatural = this.createEmtpyCompoundVector();

    for (EF_ConditionalDistribution dist : distributionList) {
      vectorNatural.setVectorByPosition(dist.getVariable().getVarID(), dist.getNaturalParameters());
    }
    this.naturalParameters = vectorNatural;
    this.momentParameters = null;
  }
  public EF_BayesianNetwork(List<ParentSet> parentSets) {
    distributionList = new ArrayList(parentSets.size());

    sizeSS = 0;
    for (ParentSet parentSet : parentSets) {
      // ConditionalDistribution dist =
      // parentSet.getMainVar().newConditionalDistribution(parentSet.getParents());
      // dist.randomInitialization(new Random(0));
      EF_ConditionalDistribution ef_dist =
          parentSet
              .getMainVar()
              .getDistributionType()
              .newEFConditionalDistribution(parentSet.getParents());
      distributionList.add(ef_dist.getVariable().getVarID(), ef_dist);
      sizeSS += ef_dist.sizeOfSufficientStatistics();
    }
    CompoundVector vectorNatural = this.createEmtpyCompoundVector();

    for (EF_ConditionalDistribution dist : distributionList) {
      vectorNatural.setVectorByPosition(dist.getVariable().getVarID(), dist.getNaturalParameters());
    }
    this.naturalParameters = vectorNatural;
    this.momentParameters = null;
  }