public ClustersDrawer(IMatrixDrawer gridDrawer) { this.gridDrawer = gridDrawer; ClustersIterator clustersIterator = new ClustersIterator(new DrawOption(gridDrawer)); }
private void MainWindow_OnLoaded(object sender, RoutedEventArgs e) { _matrixDrawer = new CanvasMatrixDrawer(MatrixCanvas, new FirstMatrixScheme()); var matrixRef = new Ref <IMatrix>(() => _matrix, x => _matrix = x); new InitializeAppCommand(matrixRef).Execute(); DisplayMatrixes(); }
public void Draw(IMatrixDrawer matrixDrawer, int startRowIndex, int startColumnIndex, bool toClear) { if (toClear) { matrixDrawer.Clear(); } foreach (var matrix in _matrixes) { matrix.Draw(matrixDrawer, startRowIndex, startColumnIndex, false); startColumnIndex += matrix.ColumnCount; } }
public void Set(int x, int y, int z) { Console.WriteLine("\n"); Console.WriteLine($"({x}, {y}, {z})"); gridDrawer = new MatrixDrawer(AbstractGraph.Clusters[x, y, z].Matrix); gridDrawer.Draw(); foreach (AbstractNode node in AbstractGraph.Clusters[x, y, z].AbstractNodes) { Console.WriteLine($"\nNode {node.Id}: ({node.LocationL0.X}, {node.LocationL0.Y}, {node.LocationL0.Z})"); NeighborsPathPrint(node.Id, AbstractGraph.Clusters[x, y, z]); } }
public override void Draw(IMatrixDrawer matrixDrawer, int startRowIndex = 0, int startColumnIndex = 0, bool toClear = true) { if (toClear) { matrixDrawer.Clear(); } for (int i = 0; i < RowCount; i++) { for (int j = 0; j < ColumnCount; j++) { matrixDrawer.DrawCell(this, i, j, startRowIndex, startColumnIndex); } } }
void IMatrix.Draw(IMatrixDrawer matrixDrawer, int startRowIndex, int startColumnIndex, bool toClear) { if (toClear) { matrixDrawer.Clear(); } var thisMatrix = (IMatrix)this; for (int i = 0; i < thisMatrix.RowCount; i++) { for (int j = 0; j < thisMatrix.ColumnCount; j++) { matrixDrawer.DrawCell(this, i, j); } } }
public abstract void Draw(IMatrixDrawer matrixDrawer, int startRowIndex = 0, int startColumnIndex = 0, bool toClear = true);
public DrawOption(IMatrixDrawer gridDrawer) { this.gridDrawer = gridDrawer; }
private void MainWindow_OnLoaded(object sender, RoutedEventArgs e) { _simpleMatrixDrawer = new CanvasMatrixDrawer(SimpleMatrixCanvas, SelecedVisualizationScheme); _sparseMatrixDrawer = new CanvasMatrixDrawer(SparseMatrixCanvas, SelecedVisualizationScheme); }
public void SetMatrixDrawer(IMatrixDrawer md) { _matrixDrawer = md; Refresh(); }