From d47a3b442e2e884223845411fc6a1fbc3e16abf5 Mon Sep 17 00:00:00 2001 From: howsohazard <143410553+howsohazard@users.noreply.github.com> Date: Sun, 3 Dec 2023 08:53:53 -0500 Subject: [PATCH] 18540: Enables distance queries to retrieve any number of other values from entity labels, MINOR (#38) --- docs/language.js | 10 ++-- src/Amalgam/amlg_code/full_test.amlg | 6 ++ src/Amalgam/entity/EntityManipulation.h | 13 +++-- src/Amalgam/entity/EntityQueries.cpp | 4 +- src/Amalgam/entity/EntityQueries.h | 15 +++-- src/Amalgam/entity/EntityQueryBuilder.h | 30 ++++++++-- src/Amalgam/entity/EntityQueryCaches.cpp | 8 +-- src/Amalgam/out.txt | 74 +++++++++++++----------- 8 files changed, 100 insertions(+), 60 deletions(-) diff --git a/docs/language.js b/docs/language.js index a3e5a370..837e4529 100644 --- a/docs/language.js +++ b/docs/language.js @@ -1599,7 +1599,7 @@ var data = [ "parameter" : "query_within_generalized_distance number max_distance list axis_labels list axis_values list|assoc|number weights list|assoc distance_types list|assoc attributes list|assoc|number deviations [number p_value] [string|number distance_transform] [string entity_weight_label_name] [number random_seed] [string radius_label] [string numerical_precision] [* output_sorted_list]", "output" : "query", "new value" : "new", - "description" : "When used as a query argument, selects entities which represent a point within a certain generalized norm to a given point. axis_labels specifies the names of the coordinate axes (as labels on the target entity), and axis_values the specifies the corresponding values for the point to test from. p_value is the generalized norm parameter. weights is a list or assoc of dimension weights to use for the query, each value mapping to its respective element in the vectors. If weights is null, then it will assume that the weights are 1 and additionally will ignore null values for the vectors instead of treating them as unknown differences. The parameter distance_types is either a list strings or an assoc of strings indicating the type of distance for each feature. Allowed values are \"nominal\" (checks for exact matches), \"continuous\" (takes the numeric difference between two values), \"cyclic\" (takes the numeric difference where the min and max wrap around), \"string\" (computes the edit distance between strings), and \"code\" (computes the edit distance between trees or graphs of code). For attributes, the particular distance_types specifies what is expected. For a nominal distance_type, a number indicates the nominal count, whereas null will infer from the values available. For continuous, a null means unbounded where distance for a null will be computed automatically from the relevant data; a single number indicates the difference between a value and a null, a specified uncertainty. Cyclic requires either a single value or a list of two values; a list of two values indicates that the first value, the lower bound, will wrap around to the upper bound, the second value specified; if only a single number is provided instead of a list, then it will assume that number for the upper bound and 0 for the lower bound. For the string distance type, the value specified can be a number indicating the maximum possible string length, inferred if null is provided. For code, the value specified can be a number indicating the maximum number of nodes in the code (including labels), inferred if null is provided. Deviations contains numbers that are used during the distance calculation, per-element, prior to exponentiation. Specifying null as deviations is equivalent to setting each deviation to 0. max_distance is the maximum distance allowed. The optional radius_label parameter represents the label name of the radius of the entity (if the radius is within the distance, the entity is selected). The optional numerical_precision represents one of three values: \"precise\", which computes every distance with high numerical precision, \"fast\", which computes every distance with lower but faster numerical precison, and \"recompute_precise\", which computes distances quickly with lower precision but then recomputes any distance values that will be returned with higher precision. If called last with compute_on_contained_entities, then it returns an assoc of the entity ids with their distances. If these distances are returned, then a transform may be applied to them based on distance_transform. If distance_transform is \"surprisal_to_prob\" then distances will be assumed to be surprisals and will be transformed back into probabilities before being returned. If distance_transform is a number or omitted, which will default to 1.0, then it will be treated as a distance weight exponent, and will be applied to each distance as distance^distance_weight_exponent. If entity_weight_label_name is specified, it will multiply the resulting value for each entity (after distance_weight_exponent, etc. have been applied) by the value in the label of entity_weight_label_name. If output_sorted_list is not specified or is false, then it will return an assoc of entity string id as the key with the distance as the value; if output_sorted_list is true, then it will return a list of lists, where the first list is the entity ids and the second list contains the corresponding distances, where both lists are in sorted order starting with the closest or most important (based on whether distance_weight_exponent is positive or negative respectively). If output_sorted_list is a string, then it will additionally return a list where the values correspond to the values for each respective entity.", + "description" : "When used as a query argument, selects entities which represent a point within a certain generalized norm to a given point. axis_labels specifies the names of the coordinate axes (as labels on the target entity), and axis_values the specifies the corresponding values for the point to test from. p_value is the generalized norm parameter. weights is a list or assoc of dimension weights to use for the query, each value mapping to its respective element in the vectors. If weights is null, then it will assume that the weights are 1 and additionally will ignore null values for the vectors instead of treating them as unknown differences. The parameter distance_types is either a list strings or an assoc of strings indicating the type of distance for each feature. Allowed values are \"nominal\" (checks for exact matches), \"continuous\" (takes the numeric difference between two values), \"cyclic\" (takes the numeric difference where the min and max wrap around), \"string\" (computes the edit distance between strings), and \"code\" (computes the edit distance between trees or graphs of code). For attributes, the particular distance_types specifies what is expected. For a nominal distance_type, a number indicates the nominal count, whereas null will infer from the values available. For continuous, a null means unbounded where distance for a null will be computed automatically from the relevant data; a single number indicates the difference between a value and a null, a specified uncertainty. Cyclic requires either a single value or a list of two values; a list of two values indicates that the first value, the lower bound, will wrap around to the upper bound, the second value specified; if only a single number is provided instead of a list, then it will assume that number for the upper bound and 0 for the lower bound. For the string distance type, the value specified can be a number indicating the maximum possible string length, inferred if null is provided. For code, the value specified can be a number indicating the maximum number of nodes in the code (including labels), inferred if null is provided. Deviations contains numbers that are used during the distance calculation, per-element, prior to exponentiation. Specifying null as deviations is equivalent to setting each deviation to 0. max_distance is the maximum distance allowed. The optional radius_label parameter represents the label name of the radius of the entity (if the radius is within the distance, the entity is selected). The optional numerical_precision represents one of three values: \"precise\", which computes every distance with high numerical precision, \"fast\", which computes every distance with lower but faster numerical precison, and \"recompute_precise\", which computes distances quickly with lower precision but then recomputes any distance values that will be returned with higher precision. If called last with compute_on_contained_entities, then it returns an assoc of the entity ids with their distances. If these distances are returned, then a transform may be applied to them based on distance_transform. If distance_transform is \"surprisal_to_prob\" then distances will be assumed to be surprisals and will be transformed back into probabilities before being returned. If distance_transform is a number or omitted, which will default to 1.0, then it will be treated as a distance weight exponent, and will be applied to each distance as distance^distance_weight_exponent. If entity_weight_label_name is specified, it will multiply the resulting value for each entity (after distance_weight_exponent, etc. have been applied) by the value in the label of entity_weight_label_name. If output_sorted_list is not specified or is false, then it will return an assoc of entity string id as the key with the distance as the value; if output_sorted_list is true, then it will return a list of lists, where the first list is the entity ids and the second list contains the corresponding distances, where both lists are in sorted order starting with the closest or most important (based on whether distance_weight_exponent is positive or negative respectively). If output_sorted_list is a string, then it will additionally return a list where the values correspond to the values of the labels for each respective entity. If output_sorted_list is a list of strings, then it will additionally return a list of values for each of the label values for each respective entity.", "example" : "(contained_entities \"TestContainerExec\" (list\n (query_within_generalized_distance 60 (list \"x\" \"y\") (list 0.0 0.0) (null) (null) (null) (null) 0.5 1 (null) \"random seed 1234\" \"radius\")\n))" }, @@ -1607,7 +1607,7 @@ var data = [ "parameter" : "query_nearest_generalized_distance number entities_returned list axis_labels list axis_values list|assoc weights list|assoc distance_types list|assoc attributes list|assoc deviations [number p_value] [string|number distance_transform] [string entity_weight_label_name] [number random_seed] [string radius_label] [string numerical_precision] [* output_sorted_list]", "output" : "query", "new value" : "new", - "description" : "When used as a query argument, selects the closest entities which represent a point within a certain generalized norm to a given point. axis_labels specifies the names of the coordinate axes (as labels on the target entity), and axis_values the specifies the corresponding values for the point to test from. p_value is the generalized norm parameter. weights is a list or assoc of dimension weights to use for the query, each value mapping to its respective element in the vectors. If weights is null, then it will assume that the weights are 1 and additionally will ignore null values for the vectors instead of treating them as unknown differences. The parameter distance_types is either a list strings or an assoc of strings indicating the type of distance for each feature. Allowed values are \"nominal\" (checks for exact matches), \"continuous\" (takes the numeric difference between two values), \"cyclic\" (takes the numeric difference where the min and max wrap around), \"string\" (computes the edit distance between strings), and \"code\" (computes the edit distance between trees or graphs of code). \nFor attributes, the particular distance_types specifies what particular attributes are expected. In all cases, there is the option to specify a list of values, where the second last value is the difference to use when one of the values being compared is null, and the last value is the difference to use when both of the values are null. If the last value is omitted, it will use the second last value for both. If both of the null values are omitted, then it will compute the maximum difference and use that for both. For a nominal distance_type, a number indicates the nominal count, whereas null will infer from the values given. Cyclic requires a single value, which is the upper bound of the difference for the cycle range (e.g., if the value is 360, then the supremum difference between two values will be 360, leading 1 and 359 to have a difference of 2).\n Deviations contains numbers that are used during the distance calculation, per-element, prior to exponentiation. Specifying null as deviations is equivalent to setting each deviation to 0. entities_returned specifies the number of entities to return. The optional radius_label parameter represents the label name of the radius of the entity (if the radius is within the distance, the entity is selected). The optional numerical_precision represents one of three values: \"precise\", which computes every distance with high numerical precision, \"fast\", which computes every distance with lower but faster numerical precison, and \"recompute_precise\", which computes distances quickly with lower precision but then recomputes any distance values that will be returned with higher precision. If called last with compute_on_contained_entities, then it returns an assoc of the entity ids with their distances. If these distances are returned, then a transform may be applied to them based on distance_transform. If distance_transform is \"surprisal_to_prob\" then distances will be assumed to be surprisals and will be transformed back into probabilities before being returned. If distance_transform is a number or omitted, which will default to 1.0, then it will be treated as a distance weight exponent, and will be applied to each distance as distance^distance_weight_exponent. If entity_weight_label_name is specified, it will multiply the resulting value for each entity (after distance_weight_exponent, etc. have been applied) by the value in the label of entity_weight_label_name. If output_sorted_list is not specified or is false, then it will return an assoc of entity string id as the key with the distance as the value; if output_sorted_list is true, then it will return a list of lists, where the first list is the entity ids and the second list contains the corresponding distances, where both lists are in sorted order starting with the closest or most important (based on whether distance_weight_exponent is positive or negative respectively). If output_sorted_list is a string, then it will additionally return a list where the values correspond to the values for each respective entity.", + "description" : "When used as a query argument, selects the closest entities which represent a point within a certain generalized norm to a given point. axis_labels specifies the names of the coordinate axes (as labels on the target entity), and axis_values the specifies the corresponding values for the point to test from. p_value is the generalized norm parameter. weights is a list or assoc of dimension weights to use for the query, each value mapping to its respective element in the vectors. If weights is null, then it will assume that the weights are 1 and additionally will ignore null values for the vectors instead of treating them as unknown differences. The parameter distance_types is either a list strings or an assoc of strings indicating the type of distance for each feature. Allowed values are \"nominal\" (checks for exact matches), \"continuous\" (takes the numeric difference between two values), \"cyclic\" (takes the numeric difference where the min and max wrap around), \"string\" (computes the edit distance between strings), and \"code\" (computes the edit distance between trees or graphs of code). \nFor attributes, the particular distance_types specifies what particular attributes are expected. In all cases, there is the option to specify a list of values, where the second last value is the difference to use when one of the values being compared is null, and the last value is the difference to use when both of the values are null. If the last value is omitted, it will use the second last value for both. If both of the null values are omitted, then it will compute the maximum difference and use that for both. For a nominal distance_type, a number indicates the nominal count, whereas null will infer from the values given. Cyclic requires a single value, which is the upper bound of the difference for the cycle range (e.g., if the value is 360, then the supremum difference between two values will be 360, leading 1 and 359 to have a difference of 2).\n Deviations contains numbers that are used during the distance calculation, per-element, prior to exponentiation. Specifying null as deviations is equivalent to setting each deviation to 0. entities_returned specifies the number of entities to return. The optional radius_label parameter represents the label name of the radius of the entity (if the radius is within the distance, the entity is selected). The optional numerical_precision represents one of three values: \"precise\", which computes every distance with high numerical precision, \"fast\", which computes every distance with lower but faster numerical precison, and \"recompute_precise\", which computes distances quickly with lower precision but then recomputes any distance values that will be returned with higher precision. If called last with compute_on_contained_entities, then it returns an assoc of the entity ids with their distances. If these distances are returned, then a transform may be applied to them based on distance_transform. If distance_transform is \"surprisal_to_prob\" then distances will be assumed to be surprisals and will be transformed back into probabilities before being returned. If distance_transform is a number or omitted, which will default to 1.0, then it will be treated as a distance weight exponent, and will be applied to each distance as distance^distance_weight_exponent. If entity_weight_label_name is specified, it will multiply the resulting value for each entity (after distance_weight_exponent, etc. have been applied) by the value in the label of entity_weight_label_name. If output_sorted_list is not specified or is false, then it will return an assoc of entity string id as the key with the distance as the value; if output_sorted_list is true, then it will return a list of lists, where the first list is the entity ids and the second list contains the corresponding distances, where both lists are in sorted order starting with the closest or most important (based on whether distance_weight_exponent is positive or negative respectively). If output_sorted_list is a string, then it will additionally return a list where the values correspond to the values of the labels for each respective entity. If output_sorted_list is a string, then it will additionally return a list where the values correspond to the values of the labels for each respective entity. If output_sorted_list is a list of strings, then it will additionally return a list of values for each of the label values for each respective entity.", "example" : "(contained_entities \"TestContainerExec\" (list\n (query_nearest_generalized_distance (list \"x\" \"y\") (list 0.0 0.0) 0.5 (list 0.25 0.75) (list 5 0) (list null (list 0 360)) (list 0.5 0.0) 10 \"radius\")\n))\n(contained_entities \"TestContainerExec\" (list\n (query_nearest_generalized_distance (list \"x\" \"y\") (list 0.0 0.0) 0.5 (null) (null) 10 \"radius\")\n))" }, @@ -1616,7 +1616,7 @@ var data = [ "output" : "query", "new value" : "new", "concurrency" : true, - "description" : "When used as a query argument, computes the case conviction for every case given in case_ids_to_compute with respect to *all* cases in the contained entities set input during a query. If case_ids_to_compute is null/emptylist, case conviction is computed for all cases. feature_labels specifies the names of the features to consider the during computation. p_value is the generalized norm parameter. If weights is null, then it will assume that the weights are 1 and additionally will ignore null values for the vectors instead of treating them as unknown differences. The parameter distance_types is either a list strings or an assoc of strings indicating the type of distance for each feature. Allowed values are \"nominal\" (checks for exact matches), \"continuous\" (takes the numeric difference between two values), \"cyclic\" (takes the numeric difference where the min and max wrap around), \"string\" (computes the edit distance between strings), and \"code\" (computes the edit distance between trees or graphs of code). \nFor attributes, the particular distance_types specifies what particular attributes are expected. In all cases, there is the option to specify a list of values, where the second last value is the difference to use when one of the values being compared is null, and the last value is the difference to use when both of the values are null. If the last value is omitted, it will use the second last value for both. If both of the null values are omitted, then it will compute the maximum difference and use that for both. For a nominal distance_type, a number indicates the nominal count, whereas null will infer from the values given. Cyclic requires a single value, which is the upper bound of the difference for the cycle range (e.g., if the value is 360, then the supremum difference between two values will be 360, leading 1 and 359 to have a difference of 2).\n Deviations contains numbers that are used during the distance calculation, per-element, prior to exponentiation. Specifying null as deviations is equivalent to setting each deviation to 0. entities_returned specifies the number of entities to return. The optional radius_label parameter represents the label name of the radius of the entity (if the radius is within the distance, the entity is selected). The optional numerical_precision represents one of three values: \"precise\", which computes every distance with high numerical precision, \"fast\", which computes every distance with lower but faster numerical precison, and \"recompute_precise\", which computes distances quickly with lower precision but then recomputes any distance values that will be returned with higher precision. If called last with compute_on_contained_entities, then it returns an assoc of the entity ids with their convictions. A transform will be applied to these distances based on distance_transform. If distance_transform is \"surprisal_to_prob\" then distances will be assumed to be surprisals and will be transformed back into probabilities for aggregating, and then transformed back to surprisals. If distance_transform is a number or omitted, which will default to 1.0, then it will be used as a parameter for a generalized mean (e.g., -1 yields the harmonic mean) to average the distances. If entity_weight_label_name is specified, it will multiply the resulting value for each entity (after distance_weight_exponent, etc. have been applied) by the value in the label of entity_weight_label_name. If conviction_of_removal is true, then it will compute the conviction as if the entities specified by entity_ids_to_compute were removed; if false (the default), then will compute the conviction as if those entities were added or included. If output_sorted_list is not specified or is false, then it will return an assoc of entity string id as the key with the distance as the value; if output_sorted_list is true, then it will return a list of lists, where the first list is the entity ids and the second list contains the corresponding distances, where both lists are in sorted order starting with the closest or most important (based on whether distance_weight_exponent is positive or negative respectively). If output_sorted_list is a string, then it will additionally return a list where the values correspond to the values for each respective entity.", + "description" : "When used as a query argument, computes the case conviction for every case given in case_ids_to_compute with respect to *all* cases in the contained entities set input during a query. If case_ids_to_compute is null/emptylist, case conviction is computed for all cases. feature_labels specifies the names of the features to consider the during computation. p_value is the generalized norm parameter. If weights is null, then it will assume that the weights are 1 and additionally will ignore null values for the vectors instead of treating them as unknown differences. The parameter distance_types is either a list strings or an assoc of strings indicating the type of distance for each feature. Allowed values are \"nominal\" (checks for exact matches), \"continuous\" (takes the numeric difference between two values), \"cyclic\" (takes the numeric difference where the min and max wrap around), \"string\" (computes the edit distance between strings), and \"code\" (computes the edit distance between trees or graphs of code). \nFor attributes, the particular distance_types specifies what particular attributes are expected. In all cases, there is the option to specify a list of values, where the second last value is the difference to use when one of the values being compared is null, and the last value is the difference to use when both of the values are null. If the last value is omitted, it will use the second last value for both. If both of the null values are omitted, then it will compute the maximum difference and use that for both. For a nominal distance_type, a number indicates the nominal count, whereas null will infer from the values given. Cyclic requires a single value, which is the upper bound of the difference for the cycle range (e.g., if the value is 360, then the supremum difference between two values will be 360, leading 1 and 359 to have a difference of 2).\n Deviations contains numbers that are used during the distance calculation, per-element, prior to exponentiation. Specifying null as deviations is equivalent to setting each deviation to 0. entities_returned specifies the number of entities to return. The optional radius_label parameter represents the label name of the radius of the entity (if the radius is within the distance, the entity is selected). The optional numerical_precision represents one of three values: \"precise\", which computes every distance with high numerical precision, \"fast\", which computes every distance with lower but faster numerical precison, and \"recompute_precise\", which computes distances quickly with lower precision but then recomputes any distance values that will be returned with higher precision. If called last with compute_on_contained_entities, then it returns an assoc of the entity ids with their convictions. A transform will be applied to these distances based on distance_transform. If distance_transform is \"surprisal_to_prob\" then distances will be assumed to be surprisals and will be transformed back into probabilities for aggregating, and then transformed back to surprisals. If distance_transform is a number or omitted, which will default to 1.0, then it will be used as a parameter for a generalized mean (e.g., -1 yields the harmonic mean) to average the distances. If entity_weight_label_name is specified, it will multiply the resulting value for each entity (after distance_weight_exponent, etc. have been applied) by the value in the label of entity_weight_label_name. If conviction_of_removal is true, then it will compute the conviction as if the entities specified by entity_ids_to_compute were removed; if false (the default), then will compute the conviction as if those entities were added or included. If output_sorted_list is not specified or is false, then it will return an assoc of entity string id as the key with the distance as the value; if output_sorted_list is true, then it will return a list of lists, where the first list is the entity ids and the second list contains the corresponding distances, where both lists are in sorted order starting with the closest or most important (based on whether distance_weight_exponent is positive or negative respectively). If output_sorted_list is a string, then it will additionally return a list where the values correspond to the values of the labels for each respective entity. If output_sorted_list is a list of strings, then it will additionally return a list of values for each of the label values for each respective entity.", "example" : "(compute_on_contained_entities \"TestContainerExec\" (list\n (compute_entity_convictions (list \"feature_1\" \"feature_2\") (list entity_id_1 entity_id_2 entity_id 3) 1.0 (list 0.25 0.75) (list 5 0) (list null (list 0 360)) (list 0.5 0.0) 10 \"radius\")\n))\n(compute_on_contained_entities \"TestContainerExec\" (list\n (compute_entity_convictions (list \"x\" \"y\") (null) 2.0 (null) (null) 10 \"radius\")\n))" }, @@ -1634,7 +1634,7 @@ var data = [ "output" : "query", "new value" : "new", "concurrency" : true, - "description" : "When used as a query argument, computes the case conviction for every case given in case_ids_to_compute with respect to *all* cases in the contained entities set input during a query. If case_ids_to_compute is null/emptylist, case conviction is computed for all cases. feature_labels specifies the names of the features to consider the during computation. p_value is the generalized norm parameter. If weights is null, then it will assume that the weights are 1 and additionally will ignore null values for the vectors instead of treating them as unknown differences. The parameter distance_types is either a list strings or an assoc of strings indicating the type of distance for each feature. Allowed values are \"nominal\" (checks for exact matches), \"continuous\" (takes the numeric difference between two values), \"cyclic\" (takes the numeric difference where the min and max wrap around), \"string\" (computes the edit distance between strings), and \"code\" (computes the edit distance between trees or graphs of code). \nFor attributes, the particular distance_types specifies what particular attributes are expected. In all cases, there is the option to specify a list of values, where the second last value is the difference to use when one of the values being compared is null, and the last value is the difference to use when both of the values are null. If the last value is omitted, it will use the second last value for both. If both of the null values are omitted, then it will compute the maximum difference and use that for both. For a nominal distance_type, a number indicates the nominal count, whereas null will infer from the values given. Cyclic requires a single value, which is the upper bound of the difference for the cycle range (e.g., if the value is 360, then the supremum difference between two values will be 360, leading 1 and 359 to have a difference of 2).\n Deviations contains numbers that are used during the distance calculation, per-element, prior to exponentiation. Specifying null as deviations is equivalent to setting each deviation to 0. entities_returned specifies the number of entities to return. The optional radius_label parameter represents the label name of the radius of the entity (if the radius is within the distance, the entity is selected). The optional numerical_precision represents one of three values: \"precise\", which computes every distance with high numerical precision, \"fast\", which computes every distance with lower but faster numerical precison, and \"recompute_precise\", which computes distances quickly with lower precision but then recomputes any distance values that will be returned with higher precision. If called last with compute_on_contained_entities, then it returns an assoc of the entity ids with their convictions. A transform will be applied to these distances based on distance_transform. If distance_transform is \"surprisal_to_prob\" then distances will be assumed to be surprisals and will be transformed back into probabilities for aggregating, and then transformed back to surprisals. If distance_transform is a number or omitted, which will default to 1.0, then it will be used as a parameter for a generalized mean (e.g., -1 yields the harmonic mean) to average the distances. If entity_weight_label_name is specified, it will multiply the resulting value for each entity (after distance_weight_exponent, etc. have been applied) by the value in the label of entity_weight_label_name. If output_sorted_list is not specified or is false, then it will return an assoc of entity string id as the key with the distance as the value; if output_sorted_list is true, then it will return a list of lists, where the first list is the entity ids and the second list contains the corresponding distances, where both lists are in sorted order starting with the closest or most important (based on whether distance_weight_exponent is positive or negative respectively). If output_sorted_list is a string, then it will additionally return a list where the values correspond to the values for each respective entity.", + "description" : "When used as a query argument, computes the case conviction for every case given in case_ids_to_compute with respect to *all* cases in the contained entities set input during a query. If case_ids_to_compute is null/emptylist, case conviction is computed for all cases. feature_labels specifies the names of the features to consider the during computation. p_value is the generalized norm parameter. If weights is null, then it will assume that the weights are 1 and additionally will ignore null values for the vectors instead of treating them as unknown differences. The parameter distance_types is either a list strings or an assoc of strings indicating the type of distance for each feature. Allowed values are \"nominal\" (checks for exact matches), \"continuous\" (takes the numeric difference between two values), \"cyclic\" (takes the numeric difference where the min and max wrap around), \"string\" (computes the edit distance between strings), and \"code\" (computes the edit distance between trees or graphs of code). \nFor attributes, the particular distance_types specifies what particular attributes are expected. In all cases, there is the option to specify a list of values, where the second last value is the difference to use when one of the values being compared is null, and the last value is the difference to use when both of the values are null. If the last value is omitted, it will use the second last value for both. If both of the null values are omitted, then it will compute the maximum difference and use that for both. For a nominal distance_type, a number indicates the nominal count, whereas null will infer from the values given. Cyclic requires a single value, which is the upper bound of the difference for the cycle range (e.g., if the value is 360, then the supremum difference between two values will be 360, leading 1 and 359 to have a difference of 2).\n Deviations contains numbers that are used during the distance calculation, per-element, prior to exponentiation. Specifying null as deviations is equivalent to setting each deviation to 0. entities_returned specifies the number of entities to return. The optional radius_label parameter represents the label name of the radius of the entity (if the radius is within the distance, the entity is selected). The optional numerical_precision represents one of three values: \"precise\", which computes every distance with high numerical precision, \"fast\", which computes every distance with lower but faster numerical precison, and \"recompute_precise\", which computes distances quickly with lower precision but then recomputes any distance values that will be returned with higher precision. If called last with compute_on_contained_entities, then it returns an assoc of the entity ids with their convictions. A transform will be applied to these distances based on distance_transform. If distance_transform is \"surprisal_to_prob\" then distances will be assumed to be surprisals and will be transformed back into probabilities for aggregating, and then transformed back to surprisals. If distance_transform is a number or omitted, which will default to 1.0, then it will be used as a parameter for a generalized mean (e.g., -1 yields the harmonic mean) to average the distances. If entity_weight_label_name is specified, it will multiply the resulting value for each entity (after distance_weight_exponent, etc. have been applied) by the value in the label of entity_weight_label_name. If output_sorted_list is not specified or is false, then it will return an assoc of entity string id as the key with the distance as the value; if output_sorted_list is true, then it will return a list of lists, where the first list is the entity ids and the second list contains the corresponding distances, where both lists are in sorted order starting with the closest or most important (based on whether distance_weight_exponent is positive or negative respectively). If output_sorted_list is a string, then it will additionally return a list where the values correspond to the values of the labels for each respective entity. If output_sorted_list is a list of strings, then it will additionally return a list of values for each of the label values for each respective entity.", "example" : "(compute_on_contained_entities \"TestContainerExec\" (list\n (compute_entity_distance_contributions (list \"feature_1\" \"feature_2\") (list entity_id_1 entity_id_2 entity_id 3) 1.0 (list 0.25 0.75) (list 5 0) (list null (list 0 360)) (list 0.5 0.0) 10 \"radius\")\n))\n(compute_on_contained_entities \"TestContainerExec\" (list\n (compute_entity_distance_contributions (list \"x\" \"y\") (null) 2.0 (null) (null) 10 \"radius\")\n))" }, @@ -1643,7 +1643,7 @@ var data = [ "output" : "query", "new value" : "new", "concurrency" : true, - "description" : "When used as a query argument, computes the case conviction for every case given in case_ids_to_compute with respect to *all* cases in the contained entities set input during a query. If case_ids_to_compute is null/emptylist, case conviction is computed for all cases. feature_labels specifies the names of the features to consider the during computation. p_value is the generalized norm parameter. If weights is null, then it will assume that the weights are 1 and additionally will ignore null values for the vectors instead of treating them as unknown differences. The parameter distance_types is either a list strings or an assoc of strings indicating the type of distance for each feature. Allowed values are \"nominal\" (checks for exact matches), \"continuous\" (takes the numeric difference between two values), \"cyclic\" (takes the numeric difference where the min and max wrap around), \"string\" (computes the edit distance between strings), and \"code\" (computes the edit distance between trees or graphs of code). \nFor attributes, the particular distance_types specifies what particular attributes are expected. In all cases, there is the option to specify a list of values, where the second last value is the difference to use when one of the values being compared is null, and the last value is the difference to use when both of the values are null. If the last value is omitted, it will use the second last value for both. If both of the null values are omitted, then it will compute the maximum difference and use that for both. For a nominal distance_type, a number indicates the nominal count, whereas null will infer from the values given. Cyclic requires a single value, which is the upper bound of the difference for the cycle range (e.g., if the value is 360, then the supremum difference between two values will be 360, leading 1 and 359 to have a difference of 2).\n Deviations contains numbers that are used during the distance calculation, per-element, prior to exponentiation. Specifying null as deviations is equivalent to setting each deviation to 0. entities_returned specifies the number of entities to return. The optional radius_label parameter represents the label name of the radius of the entity (if the radius is within the distance, the entity is selected). The optional numerical_precision represents one of three values: \"precise\", which computes every distance with high numerical precision, \"fast\", which computes every distance with lower but faster numerical precison, and \"recompute_precise\", which computes distances quickly with lower precision but then recomputes any distance values that will be returned with higher precision. If called last with compute_on_contained_entities, then it returns an assoc of the entity ids with their convictions. A transform will be applied to these distances based on distance_transform. If distance_transform is \"surprisal_to_prob\" then distances will be assumed to be surprisals and will be transformed back into probabilities for aggregating, and then transformed back to surprisals. If distance_transform is a number or omitted, which will default to 1.0, then it will be used as a parameter for a generalized mean (e.g., -1 yields the harmonic mean) to average the distances. If entity_weight_label_name is specified, it will multiply the resulting value for each entity (after distance_weight_exponent, etc. have been applied) by the value in the label of entity_weight_label_name. If conviction_of_removal is true, then it will compute the conviction as if the entities specified by entity_ids_to_compute were removed; if false (the default), then will compute the conviction as if those entities were added or included. If output_sorted_list is not specified or is false, then it will return an assoc of entity string id as the key with the distance as the value; if output_sorted_list is true, then it will return a list of lists, where the first list is the entity ids and the second list contains the corresponding distances, where both lists are in sorted order starting with the closest or most important (based on whether distance_weight_exponent is positive or negative respectively). If output_sorted_list is a string, then it will additionally return a list where the values correspond to the values for each respective entity.", + "description" : "When used as a query argument, computes the case conviction for every case given in case_ids_to_compute with respect to *all* cases in the contained entities set input during a query. If case_ids_to_compute is null/emptylist, case conviction is computed for all cases. feature_labels specifies the names of the features to consider the during computation. p_value is the generalized norm parameter. If weights is null, then it will assume that the weights are 1 and additionally will ignore null values for the vectors instead of treating them as unknown differences. The parameter distance_types is either a list strings or an assoc of strings indicating the type of distance for each feature. Allowed values are \"nominal\" (checks for exact matches), \"continuous\" (takes the numeric difference between two values), \"cyclic\" (takes the numeric difference where the min and max wrap around), \"string\" (computes the edit distance between strings), and \"code\" (computes the edit distance between trees or graphs of code). \nFor attributes, the particular distance_types specifies what particular attributes are expected. In all cases, there is the option to specify a list of values, where the second last value is the difference to use when one of the values being compared is null, and the last value is the difference to use when both of the values are null. If the last value is omitted, it will use the second last value for both. If both of the null values are omitted, then it will compute the maximum difference and use that for both. For a nominal distance_type, a number indicates the nominal count, whereas null will infer from the values given. Cyclic requires a single value, which is the upper bound of the difference for the cycle range (e.g., if the value is 360, then the supremum difference between two values will be 360, leading 1 and 359 to have a difference of 2).\n Deviations contains numbers that are used during the distance calculation, per-element, prior to exponentiation. Specifying null as deviations is equivalent to setting each deviation to 0. entities_returned specifies the number of entities to return. The optional radius_label parameter represents the label name of the radius of the entity (if the radius is within the distance, the entity is selected). The optional numerical_precision represents one of three values: \"precise\", which computes every distance with high numerical precision, \"fast\", which computes every distance with lower but faster numerical precison, and \"recompute_precise\", which computes distances quickly with lower precision but then recomputes any distance values that will be returned with higher precision. If called last with compute_on_contained_entities, then it returns an assoc of the entity ids with their convictions. A transform will be applied to these distances based on distance_transform. If distance_transform is \"surprisal_to_prob\" then distances will be assumed to be surprisals and will be transformed back into probabilities for aggregating, and then transformed back to surprisals. If distance_transform is a number or omitted, which will default to 1.0, then it will be used as a parameter for a generalized mean (e.g., -1 yields the harmonic mean) to average the distances. If entity_weight_label_name is specified, it will multiply the resulting value for each entity (after distance_weight_exponent, etc. have been applied) by the value in the label of entity_weight_label_name. If conviction_of_removal is true, then it will compute the conviction as if the entities specified by entity_ids_to_compute were removed; if false (the default), then will compute the conviction as if those entities were added or included. If output_sorted_list is not specified or is false, then it will return an assoc of entity string id as the key with the distance as the value; if output_sorted_list is true, then it will return a list of lists, where the first list is the entity ids and the second list contains the corresponding distances, where both lists are in sorted order starting with the closest or most important (based on whether distance_weight_exponent is positive or negative respectively). If output_sorted_list is a string, then it will additionally return a list where the values correspond to the values of the labels for each respective entity. If output_sorted_list is a list of strings, then it will additionally return a list of values for each of the label values for each respective entity.", "example" : "(compute_on_contained_entities \"TestContainerExec\" (list\n (compute_entity_kl_divergences (list \"feature_1\" \"feature_2\") (list entity_id_1 entity_id_2 entity_id 3) 1.0 (list 0.25 0.75) (list 5 0) (list null (list 0 360)) (list 0.5 0.0) 10 \"radius\")\n))\n(compute_on_contained_entities \"TestContainerExec\" (list\n (compute_entity_kl_divergences (list \"x\" \"y\") (null) 2.0 (null) (null) 10 \"radius\")\n))" }, diff --git a/src/Amalgam/amlg_code/full_test.amlg b/src/Amalgam/amlg_code/full_test.amlg index ebd10677..ea21c682 100644 --- a/src/Amalgam/amlg_code/full_test.amlg +++ b/src/Amalgam/amlg_code/full_test.amlg @@ -2470,6 +2470,12 @@ )) ) + (print "weighted query list of lists with multiple values: " + (compute_on_contained_entities "TestContainerExec" (list + (query_nearest_generalized_distance 5 (list "y" ) (list 0) (null) (null) (null) (null) 1 1 (null) (null) (null) (null) (list "y" "x")) + )) + ) + (create_entities "OverflowQueryContainer" (null) ) (create_entities (list "OverflowQueryContainer" "sess") (lambda (null ##.steps (list 1 2)))) (create_entities "OverflowQueryContainer" (lambda (null ##a 2))) diff --git a/src/Amalgam/entity/EntityManipulation.h b/src/Amalgam/entity/EntityManipulation.h index 11f12514..36fbda4d 100644 --- a/src/Amalgam/entity/EntityManipulation.h +++ b/src/Amalgam/entity/EntityManipulation.h @@ -137,7 +137,7 @@ class EntityManipulation template static inline EvaluableNodeReference ConvertResultsToEvaluableNodes( std::vector> &results, - EvaluableNodeManager *enm, bool as_sorted_list, StringInternPool::StringID additional_sorted_list_label, + EvaluableNodeManager *enm, bool as_sorted_list, std::vector &additional_sorted_list_labels, GetEntityFunction get_entity) { if(as_sorted_list) @@ -145,24 +145,27 @@ class EntityManipulation //build list of results EvaluableNode *query_return = enm->AllocNode(ENT_LIST); auto &qr_ocn = query_return->GetOrderedChildNodesReference(); - qr_ocn.resize(additional_sorted_list_label == string_intern_pool.NOT_A_STRING_ID ? 2 : 3); + //returning ids and computed values plus any additional values being retrieved + qr_ocn.resize(2 + additional_sorted_list_labels.size()); qr_ocn[0] = CreateListOfStringsIdsFromIteratorAndFunction(results, enm, [get_entity](auto &drp) { return get_entity(drp.reference)->GetIdStringId(); }); qr_ocn[1] = CreateListOfNumbersFromIteratorAndFunction(results, enm, [](auto drp) { return drp.distance; }); //if adding on a label, retrieve the values from the entities - if(additional_sorted_list_label != string_intern_pool.NOT_A_STRING_ID) + for(size_t label_offset = 0; label_offset < additional_sorted_list_labels.size(); label_offset++) { + auto label = additional_sorted_list_labels[label_offset]; + //make a copy of the value at additionalSortedListLabel for each entity EvaluableNode *list_of_values = enm->AllocNode(ENT_LIST); - qr_ocn[2] = list_of_values; + qr_ocn[2 + label_offset] = list_of_values; auto &list_ocn = list_of_values->GetOrderedChildNodes(); list_ocn.resize(results.size()); for(size_t i = 0; i < results.size(); i++) { Entity *entity = get_entity(results[i].reference); - list_ocn[i] = entity->GetValueAtLabel(additional_sorted_list_label, enm, false); + list_ocn[i] = entity->GetValueAtLabel(label, enm, false); //update cycle checks and idempotency if(list_ocn[i] != nullptr) diff --git a/src/Amalgam/entity/EntityQueries.cpp b/src/Amalgam/entity/EntityQueries.cpp index 0eb5a34e..defb2696 100644 --- a/src/Amalgam/entity/EntityQueries.cpp +++ b/src/Amalgam/entity/EntityQueries.cpp @@ -745,7 +745,7 @@ EvaluableNodeReference EntityQueryCondition::GetMatchingEntities(Entity *contain distance_transform.TransformDistances(entity_values, returnSortedList); return EntityManipulation::ConvertResultsToEvaluableNodes(entity_values, - enm, returnSortedList, additionalSortedListLabel, [](auto entity) { return entity; }); + enm, returnSortedList, additionalSortedListLabels, [](auto entity) { return entity; }); } case ENT_QUERY_WITHIN_GENERALIZED_DISTANCE: @@ -782,7 +782,7 @@ EvaluableNodeReference EntityQueryCondition::GetMatchingEntities(Entity *contain distance_transform.TransformDistances(entity_values, returnSortedList); return EntityManipulation::ConvertResultsToEvaluableNodes(entity_values, - enm, returnSortedList, additionalSortedListLabel, [](auto entity) { return entity; }); + enm, returnSortedList, additionalSortedListLabels, [](auto entity) { return entity; }); } default: diff --git a/src/Amalgam/entity/EntityQueries.h b/src/Amalgam/entity/EntityQueries.h index 524e2597..2e4a960c 100644 --- a/src/Amalgam/entity/EntityQueries.h +++ b/src/Amalgam/entity/EntityQueries.h @@ -52,8 +52,11 @@ class EntityQueryCondition //pairs of ids and pairs of values std::vector>> pairedLabels; - std::vector positionLabels; //the labels that comprise each dimension of the position - std::vector valueToCompare;//sometimes used for position values in conjunction with positionLabels + //the labels that comprise each dimension of the position + std::vector positionLabels; + + //the labels corresponding to positionLabels when appropriate + std::vector valueToCompare; GeneralizedDistance distParams; @@ -108,10 +111,12 @@ class EntityQueryCondition //indicates whether a compute result should be returned as a sorted list bool returnSortedList; - //for ENT_QUERY_NEAREST_GENERALIZED_DISTANCE and ENT_QUERY_WITHIN_GENERALIZED_DISTANCE, if returnSortedList is true, additionally return this label if valid - StringInternPool::StringID additionalSortedListLabel; + //for ENT_QUERY_NEAREST_GENERALIZED_DISTANCE and ENT_QUERY_WITHIN_GENERALIZED_DISTANCE, if returnSortedList is true, + // additionally return these labels if valid + std::vector additionalSortedListLabels; - //if conviction_of_removal is true, then it will compute the conviction as if the entities were removed, if false, will compute added or included + //if conviction_of_removal is true, then it will compute the conviction as if the entities were removed, if false, + // will compute added or included bool convictionOfRemoval; //if true, use concurrency if applicable diff --git a/src/Amalgam/entity/EntityQueryBuilder.h b/src/Amalgam/entity/EntityQueryBuilder.h index 8868eae0..89eb7923 100644 --- a/src/Amalgam/entity/EntityQueryBuilder.h +++ b/src/Amalgam/entity/EntityQueryBuilder.h @@ -371,15 +371,25 @@ namespace EntityQueryBuilder } cur_condition->returnSortedList = false; - cur_condition->additionalSortedListLabel = string_intern_pool.NOT_A_STRING_ID; + cur_condition->additionalSortedListLabels.clear(); if(condition_type == ENT_QUERY_WITHIN_GENERALIZED_DISTANCE || condition_type == ENT_QUERY_NEAREST_GENERALIZED_DISTANCE || condition_type == ENT_COMPUTE_ENTITY_DISTANCE_CONTRIBUTIONS) { if(ocn.size() > NUM_MINKOWSKI_DISTANCE_QUERY_PARAMETERS + 0) { EvaluableNode *list_param = ocn[NUM_MINKOWSKI_DISTANCE_QUERY_PARAMETERS + 0]; cur_condition->returnSortedList = EvaluableNode::IsTrue(list_param); - if(!EvaluableNode::IsEmptyNode(list_param) && list_param->GetType() != ENT_TRUE && list_param->GetType() != ENT_FALSE) - cur_condition->additionalSortedListLabel = EvaluableNode::ToStringIDIfExists(list_param); + if(!EvaluableNode::IsEmptyNode(list_param)) + { + if(list_param->GetType() == ENT_STRING) + { + cur_condition->additionalSortedListLabels.push_back(list_param->GetStringIDReference()); + } + else + { + for(auto label_node : list_param->GetOrderedChildNodes()) + cur_condition->additionalSortedListLabels.push_back(EvaluableNode::ToStringIDIfExists(label_node)); + } + } } } else if(condition_type == ENT_COMPUTE_ENTITY_CONVICTIONS || condition_type == ENT_COMPUTE_ENTITY_GROUP_KL_DIVERGENCE || condition_type == ENT_COMPUTE_ENTITY_KL_DIVERGENCES) @@ -394,8 +404,18 @@ namespace EntityQueryBuilder { EvaluableNode *list_param = ocn[NUM_MINKOWSKI_DISTANCE_QUERY_PARAMETERS + 1]; cur_condition->returnSortedList = EvaluableNode::IsTrue(list_param); - if(!EvaluableNode::IsEmptyNode(list_param) && list_param->GetType() != ENT_TRUE && list_param->GetType() != ENT_FALSE) - cur_condition->additionalSortedListLabel = EvaluableNode::ToStringIDIfExists(list_param); + if(!EvaluableNode::IsEmptyNode(list_param)) + { + if(list_param->GetType() == ENT_STRING) + { + cur_condition->additionalSortedListLabels.push_back(list_param->GetStringIDReference()); + } + else + { + for(auto label_node : list_param->GetOrderedChildNodes()) + cur_condition->additionalSortedListLabels.push_back(EvaluableNode::ToStringIDIfExists(label_node)); + } + } } } } diff --git a/src/Amalgam/entity/EntityQueryCaches.cpp b/src/Amalgam/entity/EntityQueryCaches.cpp index 0ea16f5e..22aeee67 100644 --- a/src/Amalgam/entity/EntityQueryCaches.cpp +++ b/src/Amalgam/entity/EntityQueryCaches.cpp @@ -84,10 +84,10 @@ void EntityQueryCaches::EnsureLabelsAreCached(EntityQueryCondition *cond) labels_to_add.push_back(cond->weightLabel); } - if(cond->additionalSortedListLabel != StringInternPool::NOT_A_STRING_ID) + for(auto label : cond->additionalSortedListLabels) { - if(!DoesHaveLabel(cond->additionalSortedListLabel)) - labels_to_add.push_back(cond->additionalSortedListLabel); + if(!DoesHaveLabel(label)) + labels_to_add.push_back(label); } break; @@ -1249,7 +1249,7 @@ EvaluableNodeReference EntityQueryCaches::GetMatchingEntitiesFromQueryCaches(Ent || last_query_type == ENT_COMPUTE_ENTITY_KL_DIVERGENCES) { return EntityManipulation::ConvertResultsToEvaluableNodes(compute_results, - enm, last_query->returnSortedList, last_query->additionalSortedListLabel, + enm, last_query->returnSortedList, last_query->additionalSortedListLabels, [&contained_entities](auto entity_index) { return contained_entities[entity_index]; }); } else //if there are no compute results, return an assoc of the requested labels for each entity diff --git a/src/Amalgam/out.txt b/src/Amalgam/out.txt index 69a4c05f..543b4150 100644 --- a/src/Amalgam/out.txt +++ b/src/Amalgam/out.txt @@ -1008,7 +1008,7 @@ abcdef "2020-06-08 lunes 11.33.48" ) --indices-- -(list "4" "a" "c" "b") +(list "a" "c" "b" "4") (list 0 1 @@ -1020,7 +1020,7 @@ abcdef 7 ) --values-- -(list "d" 1 3 2) +(list 1 3 2 "d") (list "a" 1 @@ -1041,7 +1041,7 @@ abcdef 4 "d" ) -(list "d" 1 0 3 2) +(list 1 0 3 2 "d") (list 1 2 @@ -1252,7 +1252,7 @@ current_index: 2 interpreter "C:\\Users\\Chris Hazard\\Desktop\\Howso_repos\\amalgam\\x64\\MT_Release_EXE\\Amalgam.exe" raaa 2 rwww 1 - start_time 1701482606.173477 + start_time 1701560610.772288 www 1 x 12 zz 10 @@ -1295,7 +1295,7 @@ current_index: 2 interpreter "C:\\Users\\Chris Hazard\\Desktop\\Howso_repos\\amalgam\\x64\\MT_Release_EXE\\Amalgam.exe" raaa 2 rwww 1 - start_time 1701482606.173477 + start_time 1701560610.772288 www 1 x 12 zz 10 @@ -1337,7 +1337,7 @@ current_index: 2 interpreter "C:\\Users\\Chris Hazard\\Desktop\\Howso_repos\\amalgam\\x64\\MT_Release_EXE\\Amalgam.exe" raaa 2 rwww 1 - start_time 1701482606.173477 + start_time 1701560610.772288 www 1 x 12 zz 10 @@ -1485,7 +1485,7 @@ infinity test c or d: (list "c" @(get (target 0) 0) "d" @(get (target 0) 0)) (assoc a 29 b 44 c 27) -(list "3" "8" "1") +(list "7" "3" "1") --get_rand_seed-- °³È¼¿\¨KOaVÆT zÿ @@ -1605,7 +1605,7 @@ e: - .inf 25: (assoc a 1) -current date-time in epoch: 2023-12-01-21.03.26.5207280 +current date-time in epoch: 2023-12-02-18.43.31.0723590 2020-06-07 00:22:59 1391230800 1391230800 @@ -2689,10 +2689,10 @@ MergeEntityChild1 (associate "x" 3 "y" 4) MergeEntityChild2 (associate "p" 3 "q" 4) -_2280722175 -(associate "E" 3 "F" 4) _2169689611 (associate "e" 3 "f" 4) +_2280722175 +(associate "E" 3 "F" 4) --union_entities-- (associate "b" 4 "a" 3 "c" 3) MergeEntityChild1 @@ -2710,17 +2710,6 @@ MergeEntityChild2 "w" 7 ) -_2280722175 -(associate - "E" - 3 - "F" - 4 - "G" - 5 - "H" - 6 -) _2169689611 (associate "e" @@ -2732,11 +2721,7 @@ _2169689611 "h" 6 ) -(parallel - ##p - (list "_3990396532" "_3330773578" "_3990396532" "_3330773578") -) -_3990396532 +_2280722175 (associate "E" 3 @@ -2747,6 +2732,10 @@ _3990396532 "H" 6 ) +(parallel + ##p + (list "_3990396532" "_3330773578" "_3990396532" "_3330773578") +) _3330773578 (associate "e" @@ -2758,6 +2747,17 @@ _3330773578 "h" 6 ) +_3990396532 +(associate + "E" + 3 + "F" + 4 + "G" + 5 + "H" + 6 +) --difference_entities-- (declare (assoc _ (null)) @@ -3388,10 +3388,10 @@ MergeEntityChild2 "w" 7 ) -_2280722175 -(associate "E" 3 "F" 4) _2169689611 -(associate "e" 3 "f" 4 "g" 5) +(associate "e" 3 "f" 4) +_2280722175 +(associate "E" 3 "F" 4 "G" 5) --get_entity_comments-- Full test This is a suite of unit tests. @@ -3446,7 +3446,7 @@ deep sets --set_entity_root_permission-- RootTest -1701482606.71256 +1701560611.471558 (true) RootTest @@ -3670,7 +3670,7 @@ hello ) ) ) - (set_entity_rand_seed new_entity "ø0]e×ø0Ñ”-I´»ÿ") + (set_entity_rand_seed new_entity "<¢õ®¦gR0Ñ”-I´»ÿ") (set_entity_rand_seed (first (create_entities @@ -3680,7 +3680,7 @@ hello ) ) ) - " °9Y€Jüzë†Þé!ÜŠÿ" + "’‰<ö°ÿ°öXe/·äï$ÿ" ) (set_entity_rand_seed (first @@ -3713,7 +3713,7 @@ hello ) ) ) - (set_entity_rand_seed new_entity "ø0]e×ø0Ñ”-I´»ÿ") + (set_entity_rand_seed new_entity "<¢õ®¦gR0Ñ”-I´»ÿ") (set_entity_rand_seed (first (create_entities @@ -3953,6 +3953,12 @@ weighted query list of lists: (list (list 1 2 4 10 100) (list -1 2 4 10 100) ) +weighted query list of lists with multiple values: (list + (list "Child2" "Child6" "Child1" "Child7" "Child3") + (list 1 2 4 10 100) + (list -1 2 4 10 100) + (list -1 1 3 0 100) +) (list (list "_290180734" @@ -4654,4 +4660,4 @@ Expecting 1000: 1000 concurrent entity writes successful: (true) --total execution time-- -1.2170350551605225 +1.2860238552093506