/// <summary> /// Build a new vector from a string /// </summary> /// <param name="S">A string, as produced by ToString</param> public Vector(string S) { if (S[0] != '(' || S[S.Length - 1] != ')') { throw new Exception("Formatfehler!"); } string[] P = MathTools.HighLevelSplit(S.Substring(1, S.Length - 2), ';'); data = new double[P.Length]; int i; for (i = 0; i < data.Length; i++) { data[i] = Convert.ToDouble(P[i]); } }
/// <summary> /// Build a new vector from a string /// </summary> /// <param name="s">A string, as produced by ToString</param> public Vector(string s) { if (s[0] != '(' || s[s.Length - 1] != ')') { throw new Exception("Formatfehler!"); } var p = MathTools.HighLevelSplit(s.Substring(1, s.Length - 2), ';'); _data = new double[p.Length]; int i; for (i = 0; i < _data.Length; i++) { _data[i] = Convert.ToDouble(p[i]); } }