Vector partition function and generalized Dahmen-Micchelli spaces