public PhasePoint(PhasePoint basePoint, PhasePoint step, int[] indices) { coords = new List <double>(basePoint.coords); for (int i = 0; i < coords.Count; i++) { coords[i] += indices[i] * step[i]; } }
public static PhasePoint operator -(PhasePoint p1, PhasePoint p2) { PhasePoint p3 = new PhasePoint(); p3.coords = new List <double>(p1.Dim); for (int i = 0; i < p1.coords.Count; i++) { p3.coords.Add(p1.coords[i] - p2.coords[i]); } return(p3); }
public int CompareTo(PhasePoint that) { int res = 0; for (int i = 0; i < that.coords.Count && res == 0; i++) { if (Tools.LT(this.coords[i], that.coords[i])) { res = -1; } else if (Tools.GT(this.coords[i], that.coords[i])) { res = +1; } } return(res); }
public PhasePoint(PhasePoint prevPoint) { coords = new List <double>(prevPoint.coords); }