IEnumerable <Parameter1DimensionalMember <T> > IParameter1DimensionalTypeless <T> .GetEnumerator() { for (int i = 0; i < _values.Length; i++) { yield return(new Parameter1DimensionalMember <T>(Timestep.FromSimulationYear(i), _values[i], _parent.AttachedDimensions)); } }
public FieldVariable1DimensionalTimeEfficient(ModelOutput parent) { _parent = parent; _rollingCurrentYear = Timestep.FromSimulationYear(1); _currentYear = Timestep.FromSimulationYear(-1); _switchtedOrder = false; ControlledConstructor(_parent.Clock.Timestepcount, false); }
public FieldVariable1DimensionalTime(ModelOutput parent) { _parent = parent; _currentYear = Timestep.FromSimulationYear(-1); // TODO Change this to properly find out how many years the model run will have _values = new JaggedArrayWrapper <T>(_parent.Clock.Timestepcount); ControlledConstructor(_parent.Clock.Timestepcount, false); }
public FieldVariable2DimensionalTime(ModelOutput parent) { _parent = parent; _currentYear = Timestep.FromSimulationYear(-1); var d2 = _parent.Dimensions.GetDimension <D2>(); _values = new JaggedArrayWrapper2 <T>(_parent.Clock.Timestepcount, d2.Count); ControlledConstructor(_parent.Clock.Timestepcount, d2.Count, false); }
IEnumerable <Parameter2DimensionalMember <T> > IParameter2DimensionalTypeless <T> .GetEnumerator() { var dimensionValues = _parent.Dimensions.GetValues <D2>(); int dimCount = dimensionValues.Length; for (int i = 0; i < _values.Length0; i++) { for (int l = 0; l < dimCount; l++) { yield return(new Parameter2DimensionalMember <T>(Timestep.FromSimulationYear(i), dimensionValues[l], _values[i, l], _parent.AttachedDimensions)); } } }
public FieldVariable2DimensionalTimeEfficient(ModelOutput parent) { _parent = parent; _rollingCurrentYear = Timestep.FromSimulationYear(1); _currentYear = Timestep.FromSimulationYear(-1); _switchtedOrder = false; var d2 = _parent.Dimensions.GetDimension <D2>(); _rollingValueCurr = new T[d2.Count]; _rollingValuePrev = new T[d2.Count]; ControlledConstructor(_parent.Clock.Timestepcount, d2.Count, false); }