subject

In the Matrix class called Matrix. cs:

- matrix is a 2D array of double

- Cols is a read-only property that returns the number of columns in the matrix

- Rows is a read-only property that returns the number of rows in the matrix

- Create an indexer for a matrix. Note that for a matrix you need this[int i, int j] for both dimensions.

- Matrix is a constructor the instantiates the matrix of desired size.

- Create add, subtract and multiply methods that perform their respective operation on two matrices, called A and B matrices, returning a C result matrix. Note that they are called as C = A. add(B);

- The colsEqual, rowsEqual and dimsEqual methods compare the number of columns, rows and dimensions between two matrices for equality. Note bool b = A. dimsEqual(B); returns true if the matrices have the same dimensions.

- Equals is an override method that compares two matrices for equality. They are equal if both are null, or both have the same numeric values in the same element positions.

- GetHashCode is an override method that is implemented as:

// Overrides the GetHashCode method

public override int GetHashCode()

{

// Use sum for hash code

return sum().GetHashCode(); // Note that double overrides this too

}

- sum calculates the sum of all elements in the matrix.

- makeId makes an n x n identity matrix.

- clone returns a copy of this matrix.

- copy accepts a matrix and copied its elements to this.

- populateRand populates this matrix with random doubles.

- populateOrd populates this matrix with sequential doubles from 1.0 in the first element to d in the last, as traversed by a nested loop.

- The operator methods overload the operators to work with matrices.

ansver
Answers: 1

Another question on Computers and Technology

question
Computers and Technology, 24.06.2019 09:10
  to change the number of rows and columns displayed by the excel object a. select the object and drag a size handle on the active object. b. deselect the object and drag a size handle of the object. c. deselect the object and drag a row or column divider of the object. d. select the object and drag a row or column divider on the active object.
Answers: 2
question
Computers and Technology, 24.06.2019 22:00
Is the process of organizing data to reduce redundancy. a. normalization b. primary keying c. specifying relationships d. duplication
Answers: 1
question
Computers and Technology, 25.06.2019 21:30
1. when you save documents or download software to your computer, where are the files most likely stored? a. on the hard drive b. on the software c. on the operating system d. on the central processing unit
Answers: 1
question
Computers and Technology, 26.06.2019 02:30
Is someone has an aptitude for art, they should consider a job a) a banker b) a singer c) a graphic designer d) an engineer
Answers: 2
You know the right answer?
In the Matrix class called Matrix. cs:

- matrix is a 2D array of double

- Co...
Questions
question
Mathematics, 15.09.2021 23:30
question
Mathematics, 15.09.2021 23:30
question
Biology, 15.09.2021 23:30
question
Mathematics, 15.09.2021 23:30
question
Mathematics, 15.09.2021 23:30
Questions on the website: 13722367