Revision 2673
tmp/org.txm.index.core/src/org/txm/index/core/functions/LineComparator.java (revision 2673) | ||
---|---|---|
62 | 62 |
/** The reverse. */ |
63 | 63 |
boolean reverse; |
64 | 64 |
|
65 |
int focusedSubcorpus = 0;
|
|
65 |
int focusedSubcorpus = -1;
|
|
66 | 66 |
|
67 | 67 |
/** |
68 | 68 |
* Instantiates a new line comparator. |
tmp/org.txm.index.core/src/org/txm/index/core/functions/Index.java (revision 2673) | ||
---|---|---|
977 | 977 |
* @param reverse the reverse |
978 | 978 |
*/ |
979 | 979 |
public void sortLines(LineComparator.SortMode mode, boolean reverse) { |
980 |
LineComparator lc = new LineComparator(mode, 0, reverse);
|
|
980 |
LineComparator lc = new LineComparator(mode, -1, reverse);
|
|
981 | 981 |
lc.initialize(this.getCorpus()); |
982 | 982 |
|
983 | 983 |
Collections.sort(lines, lc); |
tmp/org.txm.index.core/src/org/txm/index/core/functions/Line.java (revision 2673) | ||
---|---|---|
49 | 49 |
public List<int[]> UnitsIds; // the values, for each property there is a list of property values |
50 | 50 |
|
51 | 51 |
/** The properties. */ |
52 |
public List<Property> properties = new ArrayList<Property>(); // the properties name UnitsProperty and properties have the same order
|
|
52 |
public List<Property> properties = new ArrayList<>(); // the properties name UnitsProperty and properties have the same order |
|
53 | 53 |
|
54 | 54 |
/** The signature. */ |
55 | 55 |
private String signature; |
... | ... | |
70 | 70 |
* Instantiates a new line. |
71 | 71 |
*/ |
72 | 72 |
public Line() { |
73 |
this.UnitsProperty = new ArrayList<List<String>>();
|
|
74 |
UnitsIds = new ArrayList<int[]>();
|
|
73 |
this.UnitsProperty = new ArrayList<>(); |
|
74 |
UnitsIds = new ArrayList<>(); |
|
75 | 75 |
} |
76 | 76 |
|
77 | 77 |
/** |
... | ... | |
147 | 147 |
*/ |
148 | 148 |
public int getFrequency(int i) { |
149 | 149 |
if (i >= counts.length || i < 0) { |
150 |
return -1;
|
|
150 |
return total;
|
|
151 | 151 |
} |
152 | 152 |
return counts[i]; |
153 | 153 |
} |
Also available in: Unified diff