From 4ca2a30249ed700e2f9953995cacc18ebbfa8884 Mon Sep 17 00:00:00 2001 From: bwhitn Date: Mon, 18 Dec 2017 05:33:52 -0800 Subject: [PATCH] Fixed minor errors --- src/core/config/OperationConfig.js | 4 ++-- src/core/operations/Entropy.js | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/core/config/OperationConfig.js b/src/core/config/OperationConfig.js index b914e10d..98fff442 100755 --- a/src/core/config/OperationConfig.js +++ b/src/core/config/OperationConfig.js @@ -3190,9 +3190,9 @@ const OperationConfig = { module: "Default", description: "Calculates the Chi Square distribution of values.", inputType: "byteArray", - outputType: "", + outputType: "number", args: [] - } + }, "Numberwang": { module: "Default", description: "Based on the popular gameshow by Mitchell and Webb.", diff --git a/src/core/operations/Entropy.js b/src/core/operations/Entropy.js index 7ca87bb3..6952010f 100755 --- a/src/core/operations/Entropy.js +++ b/src/core/operations/Entropy.js @@ -176,7 +176,7 @@ const Entropy = { let distArray = new Array(256).fill(0), total = 0; for (let i = 0; i < input.length; i++) { - distArray[data[i]]++; + distArray[input[i]]++; } for (let i = 0; i < distArray.length; i++) { if (distArray[i] > 0) { @@ -184,7 +184,7 @@ const Entropy = { } } return total; - } + }, }; export default Entropy;