public static PointMatrixPick SingularMatrixCondition(PointMatrix M, int size1,int size2) { PointMatrixPick p = new PointMatrixPick { Indices = new int[size1, size2], Matrices = new List<PointMatrix> {M} }; for (int i = 0; i < size1; i++) for (int j = 0; j < size2; j++) p.Indices[i, j] = 0; return p; }
public SPD(PointMatrix m, INeighbourhood neighbourhood, int[,] initialConfiguration, IDictionary <int, IStrategy> possibleStrategies, int stepNum, int threadNum = 1, OptimizationKind optimizationKind = OptimizationKind.Absolute) : this( coord => m, neighbourhood, initialConfiguration, possibleStrategies, stepNum, threadNum, optimizationKind) { }
private void Button_Click(object sender, RoutedEventArgs e) { double[] d = Validate(); PointMatrix baseMatrix = new PointMatrix((float) d[3],(float) d[2],(float) d[1],(float) d[0]); SPDView spdView = new SPDView(AdvancedPointMatrix?pointMatrix:PointMatrixPick.SingularMatrixCondition(baseMatrix,_ic.Grid.CellGrid.GetLength(0),_ic.Grid.CellGrid.GetLength(1)), Transform(_ic.Grid), GetNeighboursCount((Neighbourhoods)NeighbourBox.SelectedItem, (int)Slider1.Value), GetNeighbourhood((Neighbourhoods)NeighbourBox.SelectedItem, (Shape)ShapeBox.SelectedItem, (int)Slider1.Value, _ic.Grid.CellGrid.GetLength(0), _ic.Grid.CellGrid.GetLength(1))); spdView.ShowDialog(); }