public IHyperCube<double> GenerateRandom( IHyperCube<double> point ) { string[] varNames = point.GetVariableNames( ); IHyperCube<double> result = point.Clone( ) as IHyperCube<double> ; for( int i = 0; i < varNames.Length; i++ ) { string v = varNames[i]; // We take the bounds of the result point, to cater for cascading parameter constraints. double min = result.GetMinValue(v); double max = result.GetMaxValue(v); checkFeasibleInterval(min, max, v); result.SetValue( varNames[i], GetRandomisedValue(min, max) ); } return result; }
public IHyperCube <double> GenerateRandom(IHyperCube <double> point) { string[] varNames = point.GetVariableNames( ); IHyperCube <double> result = point.Clone( ) as IHyperCube <double>; for (int i = 0; i < varNames.Length; i++) { string v = varNames[i]; // We take the bounds of the result point, to cater for cascading parameter constraints. double min = result.GetMinValue(v); double max = result.GetMaxValue(v); checkFeasibleInterval(min, max, v); result.SetValue(varNames[i], GetRandomisedValue(min, max)); } return(result); }