March 2019
Intermediate to advanced
336 pages
9h 9m
English
The GetValue method of the SparseMatrix class returns the value of the cell whose row and column equal i and j, respectively:
// GetValue methodfunc (sparseMatrix *SparseMatrix) GetValue(i int, j int) float64 { var lol LOL for _, lol = range sparseMatrix.cells { if LessThan(lol, i, j) { continue } if Equal(lol, i, j) { return lol.Value } return 0.0 } return 0.0}
Read now
Unlock full access