Example #1
0
        public RelevantFeatureViewModel(SymbolicFeature feature, int weight, bool vowel, bool consonant, IReadOnlyDictionary<FeatureSymbol, int> valueMetrics)
        {
            _feature = feature;
            _weight = weight;
            _vowel = vowel;
            _consonant = consonant;

            var values = new List<RelevantValueViewModel>();
            foreach (FeatureSymbol symbol in feature.PossibleSymbols)
            {
                var vm = new RelevantValueViewModel(symbol, valueMetrics[symbol]);
                vm.PropertyChanged += ChildPropertyChanged;
                values.Add(vm);
            }
            _values = new ReadOnlyList<RelevantValueViewModel>(values);
        }
Example #2
0
        public RelevantFeatureViewModel(SymbolicFeature feature, int weight, bool vowel, bool consonant, IReadOnlyDictionary <FeatureSymbol, int> valueMetrics)
        {
            _feature   = feature;
            _weight    = weight;
            _vowel     = vowel;
            _consonant = consonant;

            var values = new List <RelevantValueViewModel>();

            foreach (FeatureSymbol symbol in feature.PossibleSymbols)
            {
                var vm = new RelevantValueViewModel(symbol, valueMetrics[symbol]);
                vm.PropertyChanged += ChildPropertyChanged;
                values.Add(vm);
            }
            _values = new ReadOnlyList <RelevantValueViewModel>(values);
        }