Numerical methods of characterizing symmetry protected topological states in one dimension