private void UpdateMinMax(int index, AttributeGetter <double> getter) { double value = default; getter(ref value); attributeMin[index] = value < attributeMin[index] ? value : attributeMin[index]; attributeMax[index] = value > attributeMax[index] ? value : attributeMax[index]; }
internal override Delegate[] GetTransformingGetters(ICase targetCase) { if (targetCase == null) { throw new ArgumentNullException(nameof(targetCase)); } var getters = new AttributeGetter <double> [AttributeBinding.Count]; foreach (var binding in AttributeBinding) { var min = attributeMin[binding.Binding]; var max = attributeMax[binding.Binding]; var attributeGetter = targetCase.GetAttributeGetter <double>(targetCase.Schema[binding.Attribute]); getters[binding.Binding] = (ref double value) => { attributeGetter(ref value); Normalize(ref value, min, max); }; } return(getters); }
private void PopulateAttributeCheckList() { bool success = false; while (!success) { try { IAttributeGetter ag = new AttributeGetter(serverInstance.server); Attributes = ag.GetAllAttributes(); success = true; } catch { serverInstance.ConnectToServer(); success = false; } } foreach (var attribute in Attributes) { checkedListBox1.Items.Add(attribute.Name); } }