Accord.Controls.ConfusionMatrixRowView.GetProperties C# (CSharp) Method

GetProperties() public method

Gets the values of the multidimensional array as properties.
public GetProperties ( Attribute attributes ) : PropertyDescriptorCollection
attributes System.Attribute
return System.ComponentModel.PropertyDescriptorCollection
        public PropertyDescriptorCollection GetProperties(Attribute[] attributes)
        {
            GeneralConfusionMatrix matrix = Owner.Matrix;
            int classes = matrix.Classes;

            PropertyDescriptor[] columns = new PropertyDescriptor[classes + 1];

            for (int i = 0; i < classes; i++)
                columns[i] = new ConfusionMatrixPropertyDescriptor(Owner.ColumnNames[i], i);
            columns[classes] = new ConfusionMatrixPropertyDescriptor(Owner.ColumnNames[classes], -1);

            return new PropertyDescriptorCollection(columns);
        }