11 template <typename G, typename K, typename KIt>
12 class VectorMapFactory {
22 class VectorMap : public MapBase<G, K, KIt> {
28 VectorMap(Graph& g, MapRegistry<G, K, KIt>& r)
29 : MapBase<G, K, KIt>(g, r) {}
32 ValueType& operator[](const K& key) {
33 int id = graph->id(key);
37 const ValueType& operator[](const K& key) const {
38 int id = graph->id(key);
42 const ValueType& get(const K& key) const {
43 int id = graph->id(key);
47 void set(const K& key, const ValueType& val) {
48 int id = graph->id(key);
52 void add(const K& key) {
53 int id = graph->id(key);
54 std::cerr << id << std::endl;
55 if (id >= container.size()) {
56 container.resize(id + 1);
60 void erase(const K& key) {}
63 typedef std::vector<ValueType> Container;