コード例 #1
0
ファイル: RowCluster.cs プロジェクト: pwdlugosz/Horse
        private void HandleNullCluster(RecordSet Means)
        {

            // Increment the fail itterations //
            this._zero_fail_itterations++;

            // Find which nodes are missing //
            List<int> MissingKeys = new List<int>();
            for (int i = 0; i < this._count; i++)
            {
                if (Means.Seek(new Cell(i), 0) == -1)
                {
                    this._zero_fail_counts++;
                    MissingKeys.Add(i);
                }
            }

            // Add back the missing nodes from the current itteration //
            foreach (int x in MissingKeys)
            {
                RecordBuilder rb = new RecordBuilder();
                rb.Add(x);
                rb.Add(Record.Subrecord(this._means[x], 1, this._means.Columns.Count - 1));
                Means.Add(rb.ToRecord());
            }

        }