GeometryClassLibrary.MatricesMatrix.SetElement C# (CSharp) Method

SetElement() public method

Sets an element to a specific location.
public SetElement ( int rowIndex, int columnIndex, Matrix element ) : void
rowIndex int
columnIndex int
element Matrix
return void
        public void SetElement(int rowIndex, int columnIndex, Matrix element)
        {
            _matrices[rowIndex, columnIndex] = element;
        }

Usage Example

コード例 #1
0
        public void TotalRowsTest_EqualRowDistances()
        {
            Matrix m1 = new Matrix(2);
            Matrix m2 = new Matrix(2, 3);
            Matrix m3 = new Matrix(2);
            Matrix m4 = new Matrix(2, 3);
            
            MatricesMatrix testMatricesMatrix = new MatricesMatrix(2, 2);

            testMatricesMatrix.SetElement(0, 0, m1);
            testMatricesMatrix.SetElement(0, 1, m2);
            testMatricesMatrix.SetElement(1, 0, m3);
            testMatricesMatrix.SetElement(1, 1, m4);

            int expectedResult = 4;

            int actualResult = testMatricesMatrix.TotalRows();

            (actualResult == expectedResult).Should().BeTrue();

        }
All Usage Examples Of GeometryClassLibrary.MatricesMatrix::SetElement