Boost logo

Boost Users :

From: Jairo19_at_[hidden]
Date: 2007-11-20 15:24:52


    Hola:

    I'm new to boost (1.33.1 on Fedora 7) and while setting up some examples I was trying to get the size/length if my instance of vector_property_map, but there is no size() method. To test and to move along, I made a copy of vector_property_map.hpp and added:

        typename std::vector<T>::size_type size()
        {
            return store->size();
        }


       I'm new to this, so I may be doing it all wrong.

        Questions:
  is there any reason why this method was not included in the library ? (I understand we may have less elements than the actual vector size) ,

  how do I get the vector size and the real size ? (without iterating ?),  while writing this I remember that on vectors I can do:  m.storage_end() - m.storage_begin()

  how do I get the keys used in the map ?

   Are these thread safe ?

  lastly, this is what I want to do:

     I want to store 8000 rows and about 300 columns of data, row key is either an int or a string, let's say an int, column key is an int, in this case months to allow me to use: 200711, 200710, 200709, etc as columns. I would like to sort the rows based on the values of some of the columns (let's say I add all columns from 200611 to 200605 for each row and sort descending. Because rows do not have values for all the columns, I figured vector_property_map is a good fit to store the columns and maybe multi_index, multi_array or a simpler property_map are also good for the rows. Any suggestions ?

      Thanks.


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net