コード例 #1
0
 /// <summary>
 /// create cluster pair with clusterX and clusterY, not set Clusters parents
 /// </summary>
 public ClusterPair()
 {
     this.clusterX = new ClusterX(null);
     this.clusterX.SetClusterPair(this);
     this.clusterY = new ClusterY(null);
     this.clusterY.SetClusterPair(this);
     this.samples = new List <Sample>();
 }
コード例 #2
0
 /// <summary>
 /// create cluster pair with clusterX and clusterY, not set Clusters parents
 /// </summary>
 public ClusterPair()
 {
     this.clusterX = new ClusterX(null);
     this.clusterX.SetClusterPair(this);
     this.clusterY = new ClusterY(null);
     this.clusterY.SetClusterPair(this);
     this.samples = new List<Sample>();
 }
コード例 #3
0
        public ClusterPair(ClusterX cX, ClusterY cY, Sample sample)
        {
            clusterX = cX;
            clusterY = cY;

            this.PreviousCenter = 0;
            this.CurrentCenter = 0;

            this.samples = new List<Sample>() { sample };
        }
コード例 #4
0
        public ClusterPair(ClusterX cX, ClusterY cY, Sample sample)
        {
            clusterX = cX;
            clusterY = cY;

            this.PreviousCenter = 0;
            this.CurrentCenter  = 0;

            this.samples = new List <Sample>()
            {
                sample
            };
        }
コード例 #5
0
 // The special constructor is used to deserialize values.
 public ClusterPair(SerializationInfo info, StreamingContext context)
 {
     clusterX        = (ClusterX)info.GetValue("clusterX", typeof(ClusterX));
     clusterY        = (ClusterY)info.GetValue("clusterY", typeof(ClusterY));
     correspondChild = (Node)info.GetValue("correspondChild", typeof(Node));
 }
コード例 #6
0
 // The special constructor is used to deserialize values.
 public ClusterPair(SerializationInfo info, StreamingContext context)
 {
     clusterX = (ClusterX)info.GetValue("clusterX", typeof(ClusterX));
     clusterY = (ClusterY)info.GetValue("clusterY", typeof(ClusterY));
     correspondChild = (Node)info.GetValue("correspondChild", typeof(Node));
 }
コード例 #7
0
ファイル: Node.cs プロジェクト: cechovsky/DiplomaThesis
        /// <summary>
        /// Create new clusers X and Y and their cluster pair
        /// </summary>
        /// <param name="sample">new sample</param>
        private void CreateNewClusters(Sample sample, Node parent)
        {
            ClusterX newClusterX = new ClusterX(sample, parent);
            this.clustersX.Add(newClusterX);
            ClusterY newClusterY = new ClusterY(sample, parent);
            this.clustersY.Add(newClusterY);

            ClusterPair clusterPair = new ClusterPair(newClusterX, newClusterY, sample);
            newClusterX.SetClusterPair(clusterPair);
            newClusterY.SetClusterPair(clusterPair);

            clusterPair.Id = clusterPairs.Count;
            clusterPair.Samples.Add(sample);

            this.clusterPairs.Add(clusterPair);
        }