From 2ff6d8aeec824e55cf037b3a3a05d7538a9adf0a Mon Sep 17 00:00:00 2001 From: jlizier Date: Mon, 15 Oct 2018 14:38:46 +1100 Subject: [PATCH] Added getProperty for AIS Kraskov multivariate. Need to re-engineer this class for proper code re-use anyway. --- ...tiveInfoStorageCalculatorMultiVariateKraskov.java | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/java/source/infodynamics/measures/continuous/kraskov/ActiveInfoStorageCalculatorMultiVariateKraskov.java b/java/source/infodynamics/measures/continuous/kraskov/ActiveInfoStorageCalculatorMultiVariateKraskov.java index 01f4d93..9b52e91 100755 --- a/java/source/infodynamics/measures/continuous/kraskov/ActiveInfoStorageCalculatorMultiVariateKraskov.java +++ b/java/source/infodynamics/measures/continuous/kraskov/ActiveInfoStorageCalculatorMultiVariateKraskov.java @@ -332,6 +332,18 @@ public class ActiveInfoStorageCalculatorMultiVariateKraskov } // TODO: PEDRO: should I implement a getProperty here? + // Joe: Yes. But look into this in wider context of what else we could cut from this class -- + // there seems to be an awful lot that's re-implementing variables and code that we + // inherit already ... + @Override + public String getProperty(String propertyName) throws Exception { + if (propertyName.equalsIgnoreCase(PROP_KRASKOV_ALG_NUM)) { + return Integer.toString(kraskovAlgorithmNumber); + } else { + // Assume it was a property for the parent class or underlying conditional MI calculator + return super.getProperty(propertyName); + } + } @Override public void preFinaliseAddObservations() throws Exception {