PointCloudLibrary/pcl — pull request #471 by taketwo (2014-01-24 11:05:11+00:00)
Title: Modify default template parameter for `OctreePointCloudAdjacencyContainer`

`OctreePointCloudAdjacencyContainer` is used as a leaf container in `OctreePointCloudAdjacency`. It has two template parameters: input point type and data storage type. Currently, the default values are:

```cpp
template
class OctreePointCloudAdjacencyContainer : public OctreeContainerBase
```

Unfortunately, this does not provide any sensible default behavior. That means, every user has to implement his own data storage and, what's more, should make explicit instantiations of `OctreePointCloudAdjacencyContainer::addPoint()` and `OctreePointCloudAdjacencyContainer::computeData()` functions for his point type and data storage type pair.

Arguably, the default behavior for such a container should be averaging of the points contained in the leaf. This pull request introduces this kind of behavior. It adds a new `AveragePoint` class that is capable of averaging the data contained in input points field-wise. As usual, with a little bit of meta-programming magic, this class enables/disables support for averaging particular fields at compilation time, depending on the `PointT` type.

The new class is used as a default data storage type for `OctreePointCloudAdjacencyContainer`. As a result, a user that simply instantiated `OctreePointCloudAdjacency` with some random point type will get absolutely reasonable behavior.

@jpapon What do you think?