about summary refs log tree commit diff
path: root/sourcecodes/bnt-master/SLP/learning/@jtree_inf_engine2/get.m
diff options
context:
space:
mode:
authorziejd22017-09-28 15:04:40 -0500
committerziejd22017-09-28 15:04:40 -0500
commit8070dc963753142bb86c4ed698d91fd623ed28e7 (patch)
treed0f6dd8fc46a49b819aa55c1a90faa14d8448883 /sourcecodes/bnt-master/SLP/learning/@jtree_inf_engine2/get.m
parent7cc31810d53176e805532b2789955f4eedbce6bb (diff)
downloadBNW-8070dc963753142bb86c4ed698d91fd623ed28e7.tar.gz
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
Diffstat (limited to 'sourcecodes/bnt-master/SLP/learning/@jtree_inf_engine2/get.m')
-rw-r--r--sourcecodes/bnt-master/SLP/learning/@jtree_inf_engine2/get.m95
1 files changed, 95 insertions, 0 deletions
diff --git a/sourcecodes/bnt-master/SLP/learning/@jtree_inf_engine2/get.m b/sourcecodes/bnt-master/SLP/learning/@jtree_inf_engine2/get.m
new file mode 100644
index 00000000..af4f7d88
--- /dev/null
+++ b/sourcecodes/bnt-master/SLP/learning/@jtree_inf_engine2/get.m
@@ -0,0 +1,95 @@
+% ===
+% get
+% ===
+%
+% Description :
+% -------------
+%
+% Reading method for the class' attributes. 
+% 
+% Syntax :
+% --------
+%
+% val = get( obj, attribute_name );
+%
+% Input(s) :
+% ----------
+%
+% obj - class inf_engine
+% An instance of the class inf_engine
+%
+% attribute_name - string
+% The name of a class' attribute
+% For details about the attribute's names, see the constructor
+% (inf_engine.m)
+%
+% Output(s) :
+% -----------
+%
+% val - any
+% The value of the specified attribute
+%
+% Example(s) :
+% ------------
+%
+% val = get( obj, 'attribute_name' );
+%
+% Reference(s) :
+% --------------
+%
+% See also :
+% ----------
+%
+% inf_engine
+% set
+function [ val ] = get( engine, attribute_name )
+
+val = [];
+
+% Processing 
+val = get( engine.inf_engine, attribute_name );
+
+% Processing    
+arg = upper( attribute_name );
+
+switch arg      
+ case upper( 'evidence' )
+  val = engine.evidence;
+ case upper( 'jtree' )
+  val = engine.jtree;
+ case upper( 'cliques' )
+  val = engine.cliques;
+  case upper( 'separator' )
+  val = engine.separator;
+  case upper( 'cliques_bitv' )
+  val = engine.cliques_bitv;
+  case upper( 'clique_weight' )
+  val = engine.clique_weight;
+  case upper( 'clpot' )
+  val = engine.clpot;
+  case upper( 'clq_ass_to_node' )
+  val = engine.clq_ass_to_node;
+ case upper( 'root_clq' )
+  val = engine.root_clq;
+  case upper( 'preorder' )
+  val = engine.preorder;
+  case upper( 'postorder' )
+  val = engine.postorder;
+  case upper( 'preorder_children' )
+  val = engine.preorder_children;
+  case upper( 'postorder_parents' )
+  val = engine.postorder_parents;
+  case upper( 'maximize' )
+  val = engine.maximize;
+  case upper( 'evidence' )
+  val = engine.evidence;
+             
+ otherwise
+  %   warning_str = [ 'inf_engine - get : attribute ' ...
+  % 		  arg ' doesn''t exist' ];
+  
+  %   warning( warning_str );
+end
+
+% End of function
+