19 template <
class Each,
class EachIndexMap>
23 typedef std::pair<Each,Each> key_type;
24 typedef size_t value_type;
25 typedef size_t reference;
26 typedef boost::readable_property_map_tag category;
27 const EachIndexMap & eachmap;
29 pair_index_map(
const EachIndexMap & in_eachmap,
const size_t in_ncols) :
30 eachmap(in_eachmap), ncols(in_ncols) {}
33 template <
class Each,
class EachIndexMap>
37 size_t i =
get(map.eachmap, k.first);
38 size_t j =
get(map.eachmap, k.second);
39 return i*map.ncols + j;
Convert a master index to a row-major-order matrix index pair.
Definition: pair_index_map.h:20