27 #if !defined(_DFT_SPARSE_PATTERN_H_)
28 #define _DFT_SPARSE_PATTERN_H_ 1
30 #if !defined(BEGIN_NAMESPACE)
31 #define BEGIN_NAMESPACE(x) namespace x {
32 #define END_NAMESPACE(x) }
54 void addInterval(
int lo,
int hi);
55 void addIntervals(
int nIntervals,
int (*intervals)[2]);
57 IntervalList::const_iterator current,
end;
59 Iterator(
const IntervalList::const_iterator& beg,
60 const IntervalList::const_iterator& end_,
int p)
61 : current(beg), end(end_), pos(p)
67 if(pos == current->hi)
68 printf(
"Iterator increased to %d current limit %d last? %s %s\n",
70 & *current == & *end ?
"YES" :
"NO",
71 current == end ?
"YES" :
"NO");
73 if(pos >= current->hi) {
82 bool res = !(& *current == & *other.
current && pos == other.
pos);
84 printf(
"Iterator::operator!=() compares %p with %p, returns %s \n",
85 & *current, & *other.
current, res ?
"TRUE" :
"FALSE");
100 IntervalList::const_iterator a = list.begin();
101 IntervalList::const_iterator b = list.
end();
102 return Iterator(a, b, a != list.end() ? a->lo : 0);
106 return Iterator(list.end(),list.end(),0);
111 for(IntervalList::const_iterator i = list.begin();
112 i != list.end(); ++i)
113 result += i->hi- i->lo;
123 : bis(bis_), ranges(new
Column[bis_.noOfBasisFuncs])
132 void add(
int nRanges,
const int (*range)[2]);
134 void save(FILE *f)
const;
137 return ranges[column];
142 return ranges[col].
size();
150 int sizeTotal()
const;