From 8070dc963753142bb86c4ed698d91fd623ed28e7 Mon Sep 17 00:00:00 2001 From: ziejd2 Date: Thu, 28 Sep 2017 15:04:40 -0500 Subject: BNW using Octave instead of Matlab. This version of BNW should perform the same as the original version. The only difference is that it uses Octave instead of Matlab when running BayesNet Toolbox during parameter learning. I am calling this BNW_1.02. It can be accessed at: compbio.uthsc.edu/BNW_1.02 --- sourcecodes/bnt-master/KPMtools/subv2indTest.m | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 sourcecodes/bnt-master/KPMtools/subv2indTest.m (limited to 'sourcecodes/bnt-master/KPMtools/subv2indTest.m') diff --git a/sourcecodes/bnt-master/KPMtools/subv2indTest.m b/sourcecodes/bnt-master/KPMtools/subv2indTest.m new file mode 100644 index 00000000..e64ab947 --- /dev/null +++ b/sourcecodes/bnt-master/KPMtools/subv2indTest.m @@ -0,0 +1,15 @@ +function ndx = subv2indTest(siz,sub) +%SUBV2IND Linear index from subscript vector. +% SUBV2IND(SIZ,SUB) returns an equivalent single index corresponding to a +% subscript vector for an array of size SIZ. +% If SUB is a matrix, with subscript vectors as rows, then the result is a +% column vector. +% +% This is the opposite of IND2SUBV, so that +% SUBV2IND(SIZ,IND2SUBV(SIZ,IND)) == IND. +% +% See also IND2SUBV, SUB2IND. + +ndx = subv2indMinka(siz,sub); +ndx2 = subv2indKPM(siz,sub); +assert(isequalKPM(ndx,ndx2)) -- cgit 1.4.1