Update CFSimpleIndexer authored by Martin Pokorny's avatar Martin Pokorny
......@@ -94,13 +94,13 @@ CFSimpleIndexer
4); // 4 Mueller elements
```
We next must define mappings from indexes in the space defined by `CFSimpleIndexer` to indexes in the full `CFStore2 x CFBuffer` space. For example, the W index in `subset_indexer` can only take the value zero, but this index corresponds to `W_0` in a `CFBuffer`. Such mappings remain outside the scope of `hpg`, and so must be accounted for in client code. Similarly, while the Mueller index in `subset_indexer` has values in the set {0, 1, 2, 3}, these indexes correspond to the Mueller index values {0, 5, 10, 15} in a `CFBuffer` value. These mappings may be defined in many ways, but or the present example, we define the maps from `subset_indexer` indexes to `store` indexes as follows
We next must define mappings from indexes in the space defined by `CFSimpleIndexer` to indexes in the full index space of `store`. For example, the W index in `subset_indexer` can only take the value zero, but this index corresponds to `W_0` in a `CFBuffer`. Such mappings remain outside the scope of `hpg`, and so must be accounted for in client code. Similarly, while the Mueller index in `subset_indexer` has values in the set {0, 1, 2, 3}, these indexes correspond to the Mueller index values {0, 5, 10, 15} in a `CFBuffer` value. These mappings may be defined in many ways, but or the present example, we define the maps from `subset_indexer` indexes to `store` indexes as follows
```c++
unsigned w_map[]{W_0};
unsigned mueller_map[]{0, 5, 10, 15};
```
Finally we define the CF values through a `CFArray` instance with the appropriate element indexing operator (taking some liberties with C++ and CASA syntax):
Finally we define the CF values through a `CFArray` sub-class instance with the appropriate element indexing operator (taking some liberties with C++ and CASA syntax):
```c++
class MyCFArray : public hpg::CFArray {
unsigned m_w_value;
......
......