9 #include <fei_macros.hpp>
10 #include <snl_fei_RaggedTable_specialize.hpp>
15 RaggedTable<MapContig<fei::ctg_set<int>*>,
fei::ctg_set<int> >::RaggedTable(
int firstKey,
int lastKey)
16 : map_(firstKey, lastKey),
20 int len = lastKey-firstKey+1;
22 map_type::value_type val;
23 for(
int i=0; i<len; ++i) {
24 val.first = firstKey+i;
25 row_type* row = poolAllocatorSet_.allocate(1);
26 poolAllocatorSet_.construct(row,dummy);
39 void RaggedTable<MapContig<fei::ctg_set<int>*>,
fei::ctg_set<int> >::addIndices(
int row,
43 iterator m_end = map_.
end();
44 iterator m_iter = map_.lower_bound(row);
46 map_type::mapped_type mapped_indices = (*m_iter).second;
48 if (mapped_indices == NULL) {
49 throw std::runtime_error(
"RaggedTable<MapContig>, NULL row.");
52 for(
int i=0; i<numIndices; ++i) {
53 mapped_indices->insert2(indices[i]);
58 RaggedTable<MapContig<fei::ctg_set<int>*>,
fei::ctg_set<int> >::addIndices(
int numRows,
63 iterator m_end = map_.
end();
64 map_type::mapped_type mapped_indices = NULL;
66 for(
int i=0; i<numRows; ++i) {
68 iterator m_iter = map_.lower_bound(row);
70 mapped_indices = (*m_iter).second;
71 if (mapped_indices == NULL) {
72 throw std::runtime_error(
"RaggedTable<MapContig>, NULL row.");
75 for(
int j=0; j<numIndices; ++j) {
76 mapped_indices->insert2(indices[j]);
81 void RaggedTable<MapContig<fei::ctg_set<int>*>,
fei::ctg_set<int> >::addDiagonals(
int numIndices,
84 for(
int i=0; i<numIndices; ++i) {
86 addIndices(ind, 1, &ind);
static const_iterator end()