-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #620 from hal3/sharedDataBug
fixed shared data/csoaa bugs and static analysis bug
- Loading branch information
Showing
10 changed files
with
111 additions
and
71 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,20 @@ | ||
namespace LabelDict { | ||
typedef v_hashmap< size_t, v_array<feature> > label_feature_map; | ||
struct feature_audit { | ||
v_array<feature> features; | ||
v_array<audit_data> audit; | ||
}; | ||
typedef v_hashmap< size_t, feature_audit > label_feature_map; | ||
inline bool size_t_eq(size_t &a, size_t &b) { return (a==b); } | ||
|
||
void add_example_namespace(example& ec, char ns, v_array<feature> features); | ||
void del_example_namespace(example& ec, char ns, v_array<feature> features); | ||
void add_example_namespace(example& ec, char ns, v_array<feature>& features, v_array<audit_data>* audit); | ||
void del_example_namespace(example& ec, char ns, v_array<feature>& features, bool audit); | ||
|
||
void set_label_features(label_feature_map& data, size_t lab, v_array<feature>features); | ||
void set_label_features(label_feature_map& lfm, size_t lab, v_array<feature>& features, v_array<audit_data>* audit); | ||
|
||
void add_example_namespaces_from_example(example& target, example& source); | ||
void del_example_namespaces_from_example(example& target, example& source); | ||
void add_example_namespace_from_memory(label_feature_map& data, example& ec, size_t lab); | ||
void del_example_namespace_from_memory(label_feature_map& lfm, example& ec, size_t lab); | ||
void add_example_namespaces_from_example(example& target, example& source, bool audit); | ||
void del_example_namespaces_from_example(example& target, example& source, bool audit); | ||
void add_example_namespace_from_memory(label_feature_map& lfm, example& ec, size_t lab, bool audit); | ||
void del_example_namespace_from_memory(label_feature_map& lfm, example& ec, size_t lab, bool audit); | ||
|
||
void free_label_features(label_feature_map& data); | ||
void free_label_features(label_feature_map& lfm); | ||
} |
Oops, something went wrong.