public static NodeGrid Update(this NodeGrid nodeGrid, float step, float noiseLevel) { var res = Enumerable.Range(0, nodeGrid.Strides.Count()) .Select(i => nodeGrid.Update(i, noiseLevel, step)); return(new NodeGrid(nodeGrid.Strides, res, nodeGrid.Generation + 1, nodeGrid.NextSeed)); }
public static IEnumerable <P1V <int, float> > UpdateSeveral(this NodeGrid nodeGrid, IEnumerable <int> indexes, float step, float noiseLevel) { return(indexes.Select(dex => nodeGrid.Update(dex, noiseLevel, step))); }