gerd.lorsch...@onlinehome.de wrote:
Hello,
your note that filters are more or less queries is right. In the
product they are called everywhere filters, so I prefer to keep it.
treeFilter and dbFilter are already independent, so there is no need
for changes.
If the user wants to filter by position and header search he performs
a third query, which is the conjunction of the previous one. In the
backend its name is "filter" and it is used by other functions, so I
would not change it.
UpdateMainFilter is an optimized way to calculate filter out of
treeFilter and dbFilter. There may be other ways doing this, but I
would like to look at this when everything else is implemented. There
may be a direct update between dbFilter, treeFilter and filter.
I'm sorry, i read your post many times trying to understand it, but i'm
still puzzled.
Please consider that i don't know you and your programming skills, i
really don't want to be disrespectful or lecture anyone.
Be kind if i say some obvious stuff.
In object oriented programming you define class of objects and take
instances.
For example you define a class "Cars" and makes two object: a shiny
black bmw and a silver metallic mercedes.
The bmw and the mercedes don't know each other and don't care about each
other, they are independent.
If, for example, we paint blue the mercedes, the bmw don't notice.
We have a class "Filter" and three object: filter, dbFilter and treeFilter
They are not independent, if we paint blue the treeFilter we need to
inform the other filters calling "UpdateMainFilter"
treeFilter needs to be recalculated whenever the position on the board
changes. It has a check that it does not calculate the same position
twice. sc_tree_search is maybe slow but it is very fast for what it
does and there is no alternative.
sc_tree_search is astonishingly fast and in fact is the only reason why
i started to use scid.
For example the storedline stuff is pure genius.
Who wrote it deserves awe if, for example, you compare scid's tree speed
with the chessbase "reference tab"
I cannot understand "there is no alternative"
Say you have a 4million games db and filter it to 1k interesting games.
You are interested only to the 1k games, but you search all the 4million
games every time the position change.
In my opinion it will be faster to search only the 1k games.
Until now there were only one comment from Joost to my picture in one
of the mails before. the statisticsFitler does not yet exist and I can
live with my personal solution having a hardcoded 2300 limit for large
bases. If we agree to go this way so that the full picture will be
implemented, I am willing to help. A statisticsFilter could be
something like
MINIMAL_ELO_FOR_EACH_PLAYER && MINIMAL_ELO_AVERAGE_FOR_BOTH_PLAYER
This could be saved as a database dependend property and loaded and
evaluated at Scid startup or open of this base.
I'm sorry but i don't understand the statisticsFilter either.
Is it a fixed thing, you can search only by elo, or for example by year too?
How the user choose between normal filter and statisticFilter ?
Do you want to store the full filter in the database or only the
parameters and recalculate the filter when the base is opened?
My idea was to have independent filters so in the future we can have
multiple ones.
Then you can have multiple "Game List" windows too, one for each filter.
You open two (three, four... that's the beauty of object oriented
programming) "Game List" windows and set your preferred filter for each one.
For example i would be nice to have a filter for games with elo > 2500
and a separate filter for games of your next opponent.
And for each one you can choose to "temporarily restrics the current
filter by the current board position".
I understand that it takes much more time to write encapsulated code,
and that all scid code was written from a c point of view, so maybe it
really don't make sense to write decent code.
But when i see something like "UpdateMainFilter" I get chills down my spine.
And I probably would have done the same as a quick hack, but code like this:
+ cBaseNum = currentBase;
+ currentBase = strGetInteger(argv[3]) - 1;
+ cdb = db;
+ db = &(dbList[currentBase]);
is really ugly, isn't it?
Again i say this with all the respect and i'm sorry if i misunderstood you.
Bye,
Fulvio
------------------------------------------------------------------------------
Special Offer-- Download ArcSight Logger for FREE (a $49 USD value)!
Finally, a world-class log management solution at an even better price-free!
Download using promo code Free_Logger_4_Dev2Dev. Offer expires
February 28th, so secure your free ArcSight Logger TODAY!
http://p.sf.net/sfu/arcsight-sfd2d
_______________________________________________
Scid-users mailing list
Scid-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/scid-users