From 5422a3f74071a9916e090b9693a2c66282447487 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Kruli=C5=A1?= Date: Sat, 13 Jun 2020 00:19:20 +0200 Subject: [PATCH] Updated Score Calculators (markdown) --- Score-Calculators.md | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/Score-Calculators.md b/Score-Calculators.md index b6374ce..40c1ad5 100644 --- a/Score-Calculators.md +++ b/Score-Calculators.md @@ -17,6 +17,17 @@ testWeights: "Test 03": 100 ``` -The keys are test names (must correspond with the `name` column of the `exercise_test`) and the values has to be integers. +The keys are test names (must correspond with the `name` column of the `exercise_test`) and the values has to be integers. When all weights are equal, the weighted calculator behaves exactly as uniform calculator. ## Universal + +The most complex calculator which was added last. It holds an AST (Abstract Syntax Tree) of an expression used to compute the score in the configuration. + +The AST is encoded directly into Yaml structure -- each node is represented as a collection (object). A node must always have property `type`, which holds a string identifier of the node type (types of nodes are below). + +Leaf nodes (without children): +* `value` - a literal value, which holds one float (the value itself is stored in `value` property) +* `test-result` - reference to a test score, which is also a float between 0 and 1 (name of the test is in the `test` property) + +Internal nodes (functions): +* `sum` \ No newline at end of file