コード例 #1
0
        /// <summary>
        /// Method for counting quantifiers values for hypothese
        /// </summary>
        /// <param name="HypId">Hypothesis id to count values for</param>
        /// <returns>Counted quantifiers values</returns>
        private CountedValues[] GetQuantifiers(int HypId)
        {
            List<string> names = this.GetAllQuantifierNames();
            List<double> values = this.CountAllQuantifiers(this.Hypotheses[HypId]);
            CountedValues[] quantifiers = new CountedValues[values.Count];

            for (int i = 0; i < values.Count; i++)
            {
                quantifiers[i].Name = names[i];
                quantifiers[i].Value = values[i];
            }
            return quantifiers;
        }
コード例 #2
0
 /// <summary>
 /// Method for counting statistics values for hypothese
 /// </summary>
 /// <param name="HypId">Hypothesis id to count values for</param>
 /// <returns>Counted statistics values</returns>
 private CountedValues[] GetStatistics(int HypId)
 {
     CountedValues[] returnList = new CountedValues[this.statisticsProxies.Count];
     for (int i = 0; i < this.statisticsProxies.Count; i++)
     {
         returnList[i].Name = this.cachedStatisticsNames[i];
         returnList[i].Value = this.statisticsProxies[i].getStatistics(this.Hypotheses[HypId].quantifierSetting);
     }
     return returnList;
 }
コード例 #3
0
 /// <summary>
 /// Method for reading statistics from cache
 /// </summary>
 /// <param name="hypid">Hypothesis id to read statistics for</param>
 /// <param name="precision">Number of decimal places of precision</param>
 /// <returns>List of counted values</returns>
 public List<CountedValues> ReadStatisticsFromCache(int hypid, int precision)
 {
     List<CountedValues> statistics = new List<CountedValues>();
     for (int i = 0; i < cachedHypotheses[hypid].StatisticsList.Length; i++)
     {
         CountedValues temp = new CountedValues();
         temp.Name = cachedHypotheses[hypid].StatisticsList[i].Name;
         temp.Value = Math.Round(cachedHypotheses[hypid].StatisticsList[i].Value, precision);
         statistics.Add(temp);
     }
     return statistics;
 }