I will examine JAXB and Simple according to the following criterias.
1. Ease of use.
2. Performance.
Read more »
Monthly Archives: July 2007
JAXB 2.0 vs. Simple 1.4 for object serialization
JaxB – Unmarshalling namespace prefix
String matching using FFT – 2
Well, lets see how can it be implemented.
Step 1 – Turning a string to complex numbers
I used the Complex.java from Princeton.
Step 2 – Preparing the string to convolution
1. Get the numeric value of all chars in the string.
2. Flip the second (shorter) string.
Step 3 – Calculate searched string value
Step 4 – Convolve
Step 5 – Look for the value in the result
String matching using FFT – 1
I still don’t know how will it work, but the idea is the following.
When we want to match string we need to perform operations which are very much like the convolution.
Of course convolution has the complexity of O(n^2) which is too much for string matching.
Well the idea is to use the FFT to convolve two strings and get the complexity of O(n log(n)).