Closed danyaljj closed 8 years ago
Why all these sort functions inside? I don't understand the logic ...: https://github.com/IllinoisCogComp/lbjava/blob/master/lbjava/src/main/java/edu/illinois/cs/cogcomp/lbjava/util/DVector.java#L189-L192 https://github.com/IllinoisCogComp/lbjava/blob/master/lbjava/src/main/java/edu/illinois/cs/cogcomp/lbjava/util/DVector2D.java#L236-L238 https://github.com/IllinoisCogComp/lbjava/blob/master/lbjava/src/main/java/edu/illinois/cs/cogcomp/lbjava/util/FVector.java#L197-L200 https://github.com/IllinoisCogComp/lbjava/blob/master/lbjava/src/main/java/edu/illinois/cs/cogcomp/lbjava/util/OVector.java#L201-L203
The reason is stated below in the binarySearch method:
binarySearch
This vector must be sorted (as by the sort() method) prior to making this call.
sort()
FYI @cowchipkid
Why all these sort functions inside? I don't understand the logic ...: https://github.com/IllinoisCogComp/lbjava/blob/master/lbjava/src/main/java/edu/illinois/cs/cogcomp/lbjava/util/DVector.java#L189-L192 https://github.com/IllinoisCogComp/lbjava/blob/master/lbjava/src/main/java/edu/illinois/cs/cogcomp/lbjava/util/DVector2D.java#L236-L238 https://github.com/IllinoisCogComp/lbjava/blob/master/lbjava/src/main/java/edu/illinois/cs/cogcomp/lbjava/util/FVector.java#L197-L200 https://github.com/IllinoisCogComp/lbjava/blob/master/lbjava/src/main/java/edu/illinois/cs/cogcomp/lbjava/util/OVector.java#L201-L203