/// <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>(); }
/// <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>(); }
public ClusterPair(ClusterX cX, ClusterY cY, Sample sample) { clusterX = cX; clusterY = cY; this.PreviousCenter = 0; this.CurrentCenter = 0; this.samples = new List<Sample>() { sample }; }
public ClusterPair(ClusterX cX, ClusterY cY, Sample sample) { clusterX = cX; clusterY = cY; this.PreviousCenter = 0; this.CurrentCenter = 0; this.samples = new List <Sample>() { sample }; }
// 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)); }
/// <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); }