mapVertices implementation

mapVertices that allows changing value types and some tests for different types.