20 namespace Lucene.Net.Analysis.Shingle.Matrix
24 private readonly Analysis.Shingle.Matrix.Matrix _enclosingInstance;
26 private readonly
int[] _columnRowCounters;
30 _enclosingInstance = enclosingInstance;
31 _columnRowCounters =
new int[_enclosingInstance.Columns.Count];
36 var s = _columnRowCounters.Length;
37 var n = _enclosingInstance.Columns.Count;
38 return s != 0 && n >= s && _columnRowCounters[s - 1] < _enclosingInstance.Columns[s - 1].Rows.Count;
44 throw new Exception(
"no more elements");
46 var rows =
new Row[_columnRowCounters.Length];
48 for (
int i = 0; i < _columnRowCounters.Length; i++)
50 rows[i] = _enclosingInstance.Columns[i].Rows[_columnRowCounters[i]];
53 IncrementColumnRowCounters();
58 private void IncrementColumnRowCounters()
60 for (
int i = 0; i < _columnRowCounters.Length; i++)
62 _columnRowCounters[i]++;
64 if (_columnRowCounters[i] != _enclosingInstance.Columns[i].Rows.Count ||
65 i >= _columnRowCounters.Length - 1)
68 _columnRowCounters[i] = 0;