-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Sbfds column data changes #251
base: main
Are you sure you want to change the base?
Sbfds column data changes #251
Conversation
... where alone it is used; so that SBFDSColumnData.h does not have implicit dependency on GeneralizedDistance.h
@@ -656,10 +671,12 @@ class SBFDSColumnData | |||
|
|||
//try to insert the value if not already there | |||
auto [inserted_id_entry, inserted] = stringIdValueEntries.emplace(string_id, nullptr); | |||
if(inserted) | |||
if(inserted) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Style is for newline here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also, there's logic in InsertFirstIndexIntoStringIdValueEntry to do the right thing, which mimics the logic above (line 658) for numbers.
static inline double GetMaxDifferenceTerm(const SBFDSColumnData &column, | ||
GeneralizedDistanceEvaluator::FeatureAttributes &feature_attribs) | ||
{ | ||
switch(feature_attribs.featureType) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why should this be static rather than a method of column data?
src/Amalgam/SBFDSColumnData.h
Outdated
@@ -601,7 +616,7 @@ class SBFDSColumnData | |||
{ | |||
invalidIndices.insert(index); | |||
|
|||
if(internedNumberValues.valueInterningEnabled) | |||
if(internedNumberValues.valueInterningEnabled || internedStringIdValues.valueInterningEnabled) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good find!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This one is important enough that I'm going to include it in another PR going in shortly to make the next release.
Results of some microscopic code review of SBFDSColumnData.h.
The one function I haven't yet reviewed to my satisfaction is FindClosestValueIndexForValue