-
December 3rd, 2008, 06:49 AM
#1
one class per algorithm or one function per algorithm
Hi !
I want to organize some (pattern recognition) algorithms (like fractal dimension , GLCM , etc) in a library (with lib and include ) , and i don't know which is the best approach , one class for each algorithm or one function for each algorithm .
If i do one algorithm per function , my functions signature will have a long list of parameters ... i actually do not know which is the best approach for this problem .
I also have to implement a detachable test module .
Could you please tell me , how would organize your code and why ... one class for each algorithm or one function for each algorithm .
Thanks in advance ,
d.m.
-
December 3rd, 2008, 07:08 AM
#2
Re: one class per algorithm or one function per algorithm
As long as it's just a single function, I don't think you should worry about the argument list being long. If some parameters are optional, put them last in your argument list and provide some default values.
Nobody cares how it works as long as it works
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|