public CodeTriangleNew(IFileService fileService, ITriangular triangular, IWordConverter wordConverter) { _fileService = fileService; _triangular = triangular; _wordConverter = wordConverter; _triangular.Number = 26; Words = new List<string>(); }
/// <summary> /// Measures the time of the algorithm. /// Calls Triangular method of MatrixFacade instance. /// </summary> /// <param name="triangular">Passed algorithm for matrix triangular.</param> public override void Triangular(ITriangular triangular) { var stopwatch = new Stopwatch(); stopwatch.Start(); _facade.Triangular(triangular); stopwatch.Stop(); Time = stopwatch.ElapsedMilliseconds; }
private void triangularButton2_Click(object sender, EventArgs e) { TakeBoxes(_right.Matrix, _rightBoxes); ITriangular algorithm = triangularBox2.SelectedIndex switch { 0 => new NativeTriangular(), 1 => new LibraryTriangular(), _ => null }; _right.Triangular(algorithm); RefreshBoxes(_right.Matrix, _rightBoxes); if (_right is TimeDecorator timeDecorator) { timeLabel.Text = timeDecorator.Time + " ms"; } }
/// <summary> /// Triangular matrix using passed algorithm. /// </summary> /// <param name="triangular">Passed algorithm for matrix triangular.</param> public virtual void Triangular(ITriangular triangular) { _history.Backup(); Matrix.TriangularAlgorithm = triangular; Matrix = Matrix.Triangular(); }
/// <summary> /// Calls Triangular method of MatrixFacade instance. /// </summary> /// <param name="triangular">Passed algorithm for matrix triangular.</param> public virtual void Triangular(ITriangular triangular) { _facade.Triangular(triangular); }