1. Longest Common Substring Problem - Should it go in source/ or in include/std?

There are times when some change to an error message changes slightly and a unit test will fail and eye balling the two error messages one below the other, the differences might be slight and might be hard to spot in some circumstances. I thought I would enhance eutest so that it would output with colors or text decoration to specify when individual characters have been deleted, added or changed. In order to do this, I needed to solve the longest common string problem. The solution: The Archive. Now, that this goes into Eutest, should I put it in source, rather than leaving it in include/std?

SD Pringle

new topic     » topic index » view message » categorize

2. Re: Longest Common Substring Problem - Should it go in source/ or in include/std?

How much code are we talking about? I would say it should go into std/search.e since it has to do with string searching/comparison.

-Greg

new topic     » goto parent     » topic index » view message » categorize

3. Re: Longest Common Substring Problem - Should it go in source/ or in include/std?

The whole file is 150 line long but 100 of them are comments. It is actually generalized to be the solution to the longest common subsequence problem. You could have two sequences of ordered number pairs and find the longest subsequence of that.

The function names are currently named LCSubstr_fast, and LCSubstr. Eutest only uses LCSubstr_fast. I'll leave it in source/lsccp.e for now.

new topic     » goto parent     » topic index » view message » categorize

Search



Quick Links

User menu

Not signed in.

Misc Menu