コード例 #1
0
        /// <summary>
        /// Initializes a new instance of the <see cref="rangeFinderCollectionForMetrics{T}"/> class.
        /// </summary>
        /// <param name="learnMetaDataFrom">The learn meta data from.</param>
        public rangeFinderCollectionForMetrics(rangeFinderCollectionForMetrics <T> learnMetaDataFrom)
        {
            hostType = learnMetaDataFrom.hostType;

            foreach (var pair in learnMetaDataFrom.metricProperties)
            {
                metricProperties.Add(pair.Key, new rangeFinderForProperty <T>(pair.Key));
            }
            textProperties     = learnMetaDataFrom.textProperties;
            textPropertyValues = new Dictionary <PropertyInfo, string>();
        }
コード例 #2
0
        public static List <rangeFinderCollectionForMetrics <T> > BuildRangersFromAlligned <T>(this IEnumerable <IEnumerable <T> > input) where T : class, IObjectWithName
        {
            List <rangeFinderCollectionForMetrics <T> > output = new List <rangeFinderCollectionForMetrics <T> >();

            foreach (IEnumerable <T> inner in input)
            {
                if (inner.Any())
                {
                    var term_finder = new rangeFinderCollectionForMetrics <T>();
                    var first       = inner.First();
                    term_finder.name = first.name;

                    term_finder.Learn(inner);
                    output.Add(term_finder);
                }
            }

            return(output);
        }