Added mean function

Added "mean.cpp" and "mean.hpp".