public BPGraph BeliefPropagation(int maxIteration, Layer layer)
        {
            BPGraph bpGraph = new BPGraph(this);

            bpGraph.BeliefPropagation(maxIteration, layer);
            return(bpGraph);
        }
Example #2
0
        public BPUnit(BPGraph bpGraph, T baseUnit)
        {
            this.BaseUnit  = baseUnit;
            this.BpGraph   = bpGraph;
            this.Neighbors = new List <BPUnit <T> >();

            this.Messages = new Dictionary <BPUnit <T>, Dictionary <short, double> >();
            this.Belief   = null;
        }