This implementation is intentionally simple. If and when the need arises,
we can always implement a more performant version.
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
This implementation is intentionally simple. If and when the need arises,
we can always implement a more performant version.
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
If need be, this functionality can be sped up by implementing a
descending iterator on the tree without copying it into an ArrayList.
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
This change reuses the existing insertion sort (which was previously what
Arrays.sort() executed) in a full intro sort pipeline.
The implementation is based on the Musser paper on intro sort (Musser,
David R. "Introspective sorting and selection algorithms." Softw., Pract.
Exper. 27.8 (1997): 983-993.) and Wikipedia's current description of the
heap sort: http://en.wikipedia.org/wiki/Heapsort.
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
This is a very dumb implementation that wastes space and time by
constructing a full-blown ArrayList as backend. However, it is
better to have a dumb implementation than none at all, and we can
always do something about the performance when, and if, that should
become necessary.
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
In the previous commit, we did not support characters in regular
expressions specified via \0..., \x... or \u... yet. This is a bit more
involved, therefore support for them is added in its own commit.
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
When a regular expression contains escaped characters such as the
backslash, it is actually still a literal string. So let's support the
trivially-escaped characters, too, that are documented in
http://docs.oracle.com/javase/7/docs/api/java/util/regex/Pattern.html
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
This implementation is by no means intended to be complete, just enough to
support running http://http://loci.wisc.edu/software/bio-formats's
loci.formats.tools.ImageConverter tool.
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Avian's ByteBuffer implementation is actually fixed to big endian. So
let's throw an exception if the user tries to change that.
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
So far, we only allowed opening in read-only mode. Now, we also support
read/write mode in addition.
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
This implements all the methods required by the DataOutput interface; to
run Bio-Formats' bfconvert tool, actually only the write() and writeByte()
methods would be required.
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
In particular when constructing regular expressions before compiling them,
it is a good idea to state which exact expression is non-trivial when
complaining about it.
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
There was already non-Windows support, but it was put into the
Windows-specific part. Move it outside.
While at it, change the left-over 'st' to 'fileStat' to fix the
compilation.
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>