Typical elementwise Operations, that will be implemented for some of the matrix classes both as member methods as well as friends taking a matrix as argument are (for operators concerning comparisons, see page Max, Min, Sort, Find)
- abs(): replace a_ih by abs(a_ij)
- inv(): replace a_ij by (1/a_ij)
- sqrt(): replace a_ij by sqrt(a_ij)
- sign(): replace a_ij by 1/0/-1 depnding on a_ij >/=/< 0
- round(): round a_ij to the nearest integer
- floor(): round down a_ij
- ceil(): round up a_ij
For the class matrix this section also contains
- rand(nr,nc): the routine initializes the matrix to a matrix of size nr times nc with all elements chosen independently by the uniform distribution on [0,1].