/// <summary> /// Initializes a new instance of the <see cref="SPTreeNode"/> class. /// </summary> /// /// <param name="owner">The tree that this node belongs to.</param> /// <param name="parent">The parent node for this node. Can be null if this node is the root.</param> /// <param name="corner">The starting point of the spatial cell.</param> /// <param name="width">The widths of the spatial cell.</param> /// <param name="index">The index of this node in the children collection of its parent node.</param> /// public SPTreeNode(SPTree owner, SPTreeNode parent, int index, double[] corner, double[] width) : base(index) { int D = owner.Dimension; this.owner = owner; Parent = parent; this.Index = index; boundary = new SPCell(corner, width); center_of_mass = new double[D]; buff = new double[D]; }