previous | start | next

## Parallel Vectors

- Suppose you want to process a series of product data, and the display the product information, making the best value (with the best price/score ratio).

  >                    ACMA P600 Price: 995 Score75
  >                    ALaris Nx686 Price 798 Score 57
  >                    AMAX Powerstation 600 Price: 999 Score 75
  >                    AMS Infogold P600 Price: 795 Score: 69
  >                    AST PRemmia Price: 2080 Score: 80
  >                    Austin 600 Price: 1499 Score: 95
  >     beast value => Blackship NX-600 Price 598 Score: 60
  >                    Kompac 690 Price: 695 Score: 60

- One possibility is to create three vectors (names, price, scores) of the same length. (See `bestval1.cpp`)
- These vectors are called parallel vectors because they must be processed together.
- Each slice - `names[i]`, `prices[i]`, `scores[i]` - contains data that needs to be processed together.

previous | start | next