How to set value for a vectortype?

I want to set value for a vectortype.
It is a global variable, it contains several basic type, like float.
If can set value element by element, it is better.

I have resolved the problem.
It must create a ConstantVector, then use the setInitializer() api of the vectortype to set the value.
Thanks.