March 2020
Intermediate to advanced
406 pages
8h 39m
English
A DOK matrix is a map in Go. This map links row and column pairs to their associated value. If no value has been defined for a particular coordinate in the matrix, it is assumed to be zero. Usually, a hashmap is used as the underlying data structure, which affords O(1) for random access, but iterating over elements ends up being a little bit slower. A DOK is useful for matrix construction or updating, but it is a non-performant choice for arithmetic operations. A DOK matrix can also be simply converted into a COO matrix once it's been created.
Read now
Unlock full access