Currently we need to save at least one invalid value in the forward and reverse weight vectors here and here.
We do this so that the index saved here works for all three vectors (even though the number of coordinates is always the number of segments plus one).
However we can save some space if we do some index arithmetic. By just omitting the invalid values we can compute the correct indices to the weight vectors as:
begin = id + m_compressed_geometry_index[id] and begin = id + 1 + m_compressed_geometry_index[id+1]. This would need an adaption in GetUncompressedForwardWeights and GetUncompressedBackwardWeights (and also the shared memory version of those functions).
Currently we need to save at least one invalid value in the forward and reverse weight vectors here and here.
We do this so that the index saved here works for all three vectors (even though the number of coordinates is always the number of segments plus one).
However we can save some space if we do some index arithmetic. By just omitting the invalid values we can compute the correct indices to the weight vectors as:
begin = id + m_compressed_geometry_index[id]
andbegin = id + 1 + m_compressed_geometry_index[id+1]
. This would need an adaption in GetUncompressedForwardWeights and GetUncompressedBackwardWeights (and also the shared memory version of those functions)./cc @jakepruitt @danpat