14 const Vector & vector,
15 std::map<IndexType, typename Vector::value_type> & map,
16 const typename Vector::value_type & background = Vector::value_type( 0 ) )
18 typename Vector::const_iterator iv, ev = vector.end();
20 for( iv=vector.begin(); iv!=ev; ++iv, ++n )
21 if( *iv != background )
void toMap(const Vector &vector, std::map< IndexType, typename Vector::value_type > &map, const typename Vector::value_type &background=Vector::value_type(0))
convert a vector or list into a sparse toMap