Accord.Statistics.Visualizations.Scatterplot.initialize C# (CSharp) Method

initialize() private method

private initialize ( double x, double y, int z ) : void
x double
y double
z int
return void
        private void initialize(double[] x, double[] y, int[] z)
        {
            this.XAxis = x;
            this.YAxis = y;
            this.LabelAxis = z;

            if (z == null)
            {
                LabelValues = new int[] { };
            }
            else
            {
                LabelValues = LabelAxis.Distinct();
            }

            LabelNames = new string[LabelValues.Length];
            for (int i = 0; i < LabelNames.Length; i++)
                LabelNames[i] = i.ToString();

            var classes = new ScatterplotClassValueCollection[LabelValues.Length];
            for (int i = 0; i < classes.Length; i++)
                classes[i] = new ScatterplotClassValueCollection(this, i);
            Classes = new ReadOnlyCollection<ScatterplotClassValueCollection>(classes);
        }