Beispiel #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);
        }
Beispiel #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);
        }
Beispiel #3
0
 public Dict <string, double[]> GetSensitivity(string targetNodeKey, IVertexValueComputer computer)
 {
     return(this.GetSensitivity(targetNodeKey, computer.Compute));
 }
Beispiel #4
0
 public double[,] GetEvidenceStatistic(NetworkVertex networkVertex, IVertexValueComputer valueComputer)
 {
     return(this.GetEvidenceStatistic(networkVertex, valueComputer, this.GetSectionIds()));
 }
Beispiel #5
0
 public double[,] GetBeliefStatistic(IVertexValueComputer valueComputer, NetworkVertex networkVertex)
 {
     return(this.GetBeliefStatistic(valueComputer, networkVertex, this.GetSectionIds()));
 }