Merge-style sparse dot product
Mathematical Formulation
Computes x·y = Σ x_i * y_i where x and y share index i Uses sorted merge to find common indices in linear time.
Complexity
O(k1 + k2) where k1, k2 are the number of nonzeros @pre Both vectors must be sorted by increasing index
Implementations
CoinUtils
- CoinPackedVector.hpp - Sparse vector that owns its index/value storage
CoinPackedVector stores a sparse vector as parallel arrays of indices and values. Unlike CoinShallowPackedVector, this class owns its storage and supports modification operations.