/// <summary> /// Create a valueset based on the provided values. /// </summary> public ValueSetArray(IList <IList <T> > values) { _values2D = new ListArray <T>(values.Count); for (int i = 0; i < values.Count; i++) { _values2D.Add(new T[values[i].Count]); int numElmts = values[i].Count; for (int j = 0; j < numElmts; j++) { _values2D[i][j] = values[i][j]; } } }
/// <summary> /// Create a valueset with one time step and a number of element values. /// </summary> public ValueSetArray(ICollection <T> elementValues) { T[] elementArray = new T[elementValues.Count]; int i = 0; foreach (T value in elementValues) { elementArray[i++] = value; } _values2D = new ListArray <T>(1) { elementArray }; }
/// <summary> /// Create a valueset based on the provided values. /// </summary> public ValueSetArray(ListArray <T> values) { _values2D = values; }
public ValueSetArray() { _values2D = new ListArray <T>(); }