예제 #1
0
        public double[,] GetBeliefStatistic(NetworkVertex networkVertex, IVertexValueComputer valueComputer, IEnumerable <string> sectionIds)
        {
            foreach (var sectionId in (IEnumerable <string>) this.sectionEvidences.Keys)
            {
                Console.WriteLine(sectionId);
            }

            return(null);
        }
예제 #2
0
        public double[,] GetEvidenceStatistic(NetworkVertex networkVertex, IVertexValueComputer valueComputer, IEnumerable <string> sectionIds)
        {
            var sectionIdList = sectionIds as IList <string> ?? sectionIds.ToList();

            var nRows = sectionIdList.Count();
            var nCols = this.GetEvidence(sectionIdList.First()).Keys.Count;

            var statistic = new double[nRows, nCols];

            var row = 0;

            foreach (var sectionId in sectionIdList)
            {
                var col = 0;

                var sectionEvidence = this.GetEvidence(sectionId);

                if (sectionEvidence == null)
                {
                    continue;
                }

                foreach (var year in sectionEvidence.Keys)
                {
                    if (sectionEvidence[year][networkVertex.Key].Value != null)
                    {
                        statistic[row, col] = valueComputer.Compute(networkVertex, sectionEvidence[year][networkVertex.Key].Value, null);
                    }

                    col++;
                }

                row++;
            }

            return(statistic);
        }
예제 #3
0
 public Dict <string, double[]> GetSensitivity(string targetNodeKey, IVertexValueComputer computer)
 {
     return(this.GetSensitivity(targetNodeKey, computer.Compute));
 }
예제 #4
0
 public double[,] GetEvidenceStatistic(NetworkVertex networkVertex, IVertexValueComputer valueComputer)
 {
     return(this.GetEvidenceStatistic(networkVertex, valueComputer, this.GetSectionIds()));
 }
예제 #5
0
 public double[,] GetBeliefStatistic(IVertexValueComputer valueComputer, NetworkVertex networkVertex)
 {
     return(this.GetBeliefStatistic(valueComputer, networkVertex, this.GetSectionIds()));
 }