title: Subsampling an array of numbers
body: <p>I have a series of 100 integer values which I need to reduce/subsample to 77 values for the purpose of fitting into a predefined space on screen. This gives a fraction of 77/100 values-per-pixel - not very neat.</p>
  
  <p>Assuming the 77 is fixed and cannot be changed, what are some typical techniques for subsampling 100 numbers down to 77. I get a sense that it will be a jagged mapping, by which I mean the first new value is the average of [0, 1] then the next value is [3], then average [4, 5] etc. But how do I approach getting the pattern for this mapping?</p>
  
  <p>I am working in C++, although I'm more interested in the technique than implementation.</p>
  
  <p>Thanks in advance.</p>