Method of encoding information which can be represented by vectors