mardi 25 octobre 2016

Elegant way to provide flatting iterator for vector of vectors

I have an adapter, which goal - provide iterator for pair values pair<FeatureVector, Label>

However in my internal representation I store data as vector<pair<vector<strings>, Label>>

So during iterations I need to flatten it and convert string to FeatureVector

What is the most elegant way for such kind of conversion?

Aucun commentaire:

Enregistrer un commentaire