<?php $isip_window_title = "ISIP Homepage"; ?>
<?php include("/data/isip/www/templates/documentation/header/header.html"); ?>

<!--#set var="isip_page_title" value="TrainNode" -->
<?php include("/data/isip/www/templates/documentation/body/index_class.html"); ?>
<?php include("/data/isip/www/templates/documentation/body/bar.html"); ?>

<a name="name">
<b>
name:
<a href="/perl/ifc_document.pl?file=$isip/class/search/TrainNode/TrainNode.h">TrainNode</a> : public <a href="../../math/scalar/String/index.html">String</a>
</b>

<br><br>

<a name="synopsis">
<b>synopsis:</b>

<blockquote>
<pre>
gcc [flags ...] file ... -l /isip/tools/lib/$ISIP_BINARY/lib_search.a

#include &lt;TrainNode.h&gt;

~TrainNode();
TrainNode();
TrainNode(const TrainNode& copy_sym);
</pre>
</blockquote>

<a name="quick_start">
<b>quick start:</b>

<blockquote>
<pre>
#include &lt;TrainNode.h&gt;

TrainNode train_node;

float alpha = -0.3657;
float beta = -0.7865;

Trace new_trace;
train_node.setAlpha(alpha);
train_node.setBeta(beta);
train_node.setTrace(&new_trace);
</pre>
</blockquote>

<a name="description"> 
<b>description:</b>
<br><br>

The TrainNode class specifies a location in a search space.

<br><br>

<a name="dependencies">
<b>dependencies:</b>
<br><br>

<ul>
  <li> <a href="../../math/scalar/Long/index.html">Long</a>
  <li> <a href="../../math/vector/VectorFloat/index.html">VectorFloat</a>
  <li> <a href="../Trace/index.html">Trace</a>
</ul>

<a name="constants">
<b>public constants:</b>
<br><br>

<ul>
  <li> define the class name:

       <pre><a href="/perl/ifc_document.pl?file=$isip/class/search/TrainNode/tnod_00.cc&constant=CLASS_NAME">static const String CLASS_NAME;</a></pre>

  <li> define i/o related constants:

       <pre><a href="/perl/ifc_document.pl?file=$isip/class/search/TrainNode/tnod_00.cc&constant=DEF_PARAM">static const String DEF_PARAM;</a></pre>

  <li> define default values and arguments:

       <pre>static const long DEF_TIMESTAMP = -1;</pre>       

</ul>
	 
<a name="protected">
<b>protected data:</b>
<br><br>

<ul>
  <li> define the time instance (t)

       <pre>long frame_d;</pre>
       
  <li> define the backward probability for the state at time (t) 

       <pre>double beta_d;</pre>

  <li> define the forward probability for the state at time (t)

       <pre>double alpha_d;</pre>

  <li>  define the score associated with the state at time (t)

       <pre>double score_d;</pre>

  <li> define a flag that tells us if the train node is reachable

       <pre>boolean is_valid_d;</pre>
       <pre>boolean is_alpha_valid_d;</pre>
       <pre>boolean is_beta_valid_d;</pre>
       <pre>boolean is_accum_valid_d;</pre>

  <li> define the trace/instance reference pointer

       <pre>void* reference_d;</pre>

  <li> define the statistical model pointer

       <pre>StatisticalModel* stat_model_d;</pre>

  <li> define the memory manager:
       
       <pre><a href="/perl/ifc_document.pl?file=$isip/class/search/TrainNode/tnod_00.cc&static=mgr_d">static MemoryManager mgr_d;</a></pre>
       
  <li> define the debug level:
       
       <pre><a href="/perl/ifc_document.pl?file=$isip/class/search/TrainNode/tnod_00.cc&static=debug_level_d">static Integral::DEBUG debug_level_d;</a></pre>

</ul>

<a name="public">
<b>required public methods:</b>
<br><br>

<ul>
  <li> static methods:  

       <pre><a href="/perl/ifc_document.pl?file=$isip/class/search/TrainNode/TrainNode.h&method=name">static const String& name();</a></pre>
       <pre><a href="/perl/ifc_document.pl?file=$isip/class/search/TrainNode/tnod_02.cc&method=diagnose">static boolean diagnose(Integral::DEBUG debug_level);</a></pre>

  <li> debug methods:

       <pre><a href="/perl/ifc_document.pl?file=$isip/class/search/TrainNode/tnod_01.cc&method=debug">boolean debug(const unichar* message) const;</a></pre>
       <pre><a href="/perl/ifc_document.pl?file=$isip/class/search/TrainNode/TrainNode.h&method=setDebug">static boolean setDebug(Integral::DEBUG debug_level);</a></pre>

  <li> destructor/constructor(s):
       <pre><a href="/perl/ifc_document.pl?file=$isip/class/search/TrainNode/TrainNode.h&method=destructor">~TrainNode();</a></pre>
       <pre><a href="/perl/ifc_document.pl?file=$isip/class/search/TrainNode/tnod_00.cc&method=default constructor">TrainNode();</a></pre>
       <pre><a href="/perl/ifc_document.pl?file=$isip/class/search/TrainNode/tnod_00.cc&method=copy+constructor">TrainNode(const TrainNode& arg);</a></pre>

  <li> assign methods:
       
       <pre><a href="/perl/ifc_document.pl?file=$isip/class/search/TrainNode/tnod_05.cc&method=assign">boolean assign(const TrainNode& copy_node);</a></pre>

  <li> i/o methods:
       
       <pre><a href="/perl/ifc_document.pl?file=$isip/class/search/TrainNode/TrainNode.h&method=sofSize">long sofSize() const;</a></pre>
       <pre><a href="/perl/ifc_document.pl?file=$isip/class/search/TrainNode/TrainNode.h&method=read">boolean read(Sof& sof, long tag, const String& name = CLASS_NAME);</a></pre>
       <pre><a href="/perl/ifc_document.pl?file=$isip/class/search/TrainNode/TrainNode.h&method=write">boolean write(Sof& sof, long tag, const String& name = CLASS_NAME) const;</a></pre>
       <pre><a href="/perl/ifc_document.pl?file=$isip/class/search/TrainNode/TrainNode.h&method=readData">boolean readData(Sof& sof, const String& pname = DEF_PARAM, long size = SofParser::FULL_OBJECT, boolean param = true, boolean nested = false) const;</a></pre>       
       <pre><a href="/perl/ifc_document.pl?file=$isip/class/search/TrainNode/TrainNode.h&method=writeData">boolean writeData(Sof& sof, const String& pname = DEF_PARAM) const;</a></pre>

  <li> equality methods:
       
       <pre><a href="/perl/ifc_document.pl?file=$isip/class/search/TrainNode/tnod_05.cc&method=eq&instance=0">boolean eq(const TrainNode& compare_node) const;</a></pre>

  <li> memory management methods:

       <pre><a href="/perl/ifc_document.pl?file=$isip/class/search/TrainNode/TrainNode.h&method=new">static void* operator new(size_t size);</a></pre>
       <pre><a href="/perl/ifc_document.pl?file=$isip/class/search/TrainNode/TrainNode.h&method=new[]">static void* operator new[](size_t size);</a></pre>
       <pre><a href="/perl/ifc_document.pl?file=$isip/class/search/TrainNode/TrainNode.h&method=delete">static void operator delete(void* ptr);</a></pre>
       <pre><a href="/perl/ifc_document.pl?file=$isip/class/search/TrainNode/TrainNode.h&method=delete[]">static void operator delete[](void* ptr);</a></pre>  
       <pre><a href="/perl/ifc_document.pl?file=$isip/class/search/TrainNode/TrainNode.h&method=setGrowSize">static boolean setGrowSize(long grow_size);</a></pre>
       <pre><a href="/perl/ifc_document.pl?file=$isip/class/search/TrainNode/tnod_05.cc&method=clear">boolean clear(Integral::CMODE ctype = Integral::DEF_CMODE);</a></pre>
       
</ul>

<a name="specific">
<b>class-specific public methods:</b>
<br><br>

<ul>
  <li> methods to get/set alpha

       <pre><a href="/perl/ifc_document.pl?file=$isip/class/search/TrainNode/TrainNode.h&method=setAlpha">boolean setAlpha(float arg);</a></pre>
       <pre><a href="/perl/ifc_document.pl?file=$isip/class/search/TrainNode/TrainNode.h&method=getAlpha">double getAlpha();</a></pre>       

  <li> methods to get/set beta

       <pre><a href="/perl/ifc_document.pl?file=$isip/class/search/TrainNode/TrainNode.h&method=setBeta">boolean setBeta(float arg);</a></pre>
       <pre><a href="/perl/ifc_document.pl?file=$isip/class/search/TrainNode/TrainNode.h&method=getBeta">double getBeta();</a></pre>       

  <li> methods to get/set frame

       <pre><a href="/perl/ifc_document.pl?file=$isip/class/search/TrainNode/TrainNode.h&method=setFrame">boolean setFrame(long arg);</a></pre>
       <pre><a href="/perl/ifc_document.pl?file=$isip/class/search/TrainNode/TrainNode.h&method=getFrame">long getFrame();</a></pre>   

  <li>methods to get/set score

       <pre><a href="/perl/ifc_document.pl?file=$isip/class/search/TrainNode/TrainNode.h&method=setScore">boolean setScore(double arg);</a></pre>
       <pre><a href="/perl/ifc_document.pl?file=$isip/class/search/TrainNode/TrainNode.h&method=getScore">double getScore();</a></pre>
  
  <li> methods to get/set reference

       <pre><a href="/perl/ifc_document.pl?file=$isip/class/search/TrainNode/TrainNode.h&method=setReference">boolean setReference(void* arg);</a></pre>
       <pre><a href="/perl/ifc_document.pl?file=$isip/class/search/TrainNode/TrainNode.h&method=getReference">void* getReference();</a></pre>       


  <li> methods to get/set statistical model

       <pre><a href="/perl/ifc_document.pl?file=$isip/class/search/TrainNode/TrainNode.h&method=setStatisticalModel">boolean setStatisticalModel(StatisticalModel* arg);</a></pre>
       <pre><a href="/perl/ifc_document.pl?file=$isip/class/search/TrainNode/TrainNode.h&method=getStatisticalModel">StatisticalModel* getStatisticalModel();</a></pre>       

       
  <li> methods to get valid model

       <pre><a href="/perl/ifc_document.pl?file=$isip/class/search/TrainNode/TrainNode.h&method=getValidModel">boolean getValidModel();</a></pre>

  <li> methods to get/set valid node

       <pre><a href="/perl/ifc_document.pl?file=$isip/class/search/TrainNode/TrainNode.h&method=setValidNode">boolean setValidNode(boolean arg);</a></pre>
       <pre><a href="/perl/ifc_document.pl?file=$isip/class/search/TrainNode/TrainNode.h&method=getValidNode">boolean getValidNode();</a></pre>

  <li> methods to accumulate/update statistics
       
       <pre><a href="/perl/ifc_document.pl?file=$isip/class/search/TrainNode/tnod_05.cc&method=update">boolean update(VectorFloat& param);</a></pre>
       <pre><a href="/perl/ifc_document.pl?file=$isip/class/search/TrainNode/tnod_05.cc&method=accumulate">boolean accumulate(float utter_prob, Vector<VectorFloat>& data, float min_mpd, float min_occupancy);</a></pre>

  <li> methods to check if forward probability is valid
      
       <pre><a href="/perl/ifc_document.pl?file=$isip/class/search/TrainNode/TrainNode.h&method=setAlphaValid">boolean setAlphaValid(boolean arg = true);</a></pre>
       <pre><a href="/perl/ifc_document.pl?file=$isip/class/search/TrainNode/TrainNode.h&method=isAlphaValid">boolean isAlphaValid();</a></pre>

  <li> methods to check if backward probability is valid
      
       <pre><a href="/perl/ifc_document.pl?file=$isip/class/search/TrainNode/TrainNode.h&method=setBetaValid">boolean setBetaValid(boolean arg = true);</a></pre>
       <pre><a href="/perl/ifc_document.pl?file=$isip/class/search/TrainNode/TrainNode.h&method=isBetaValid">boolean isBetaValid();</a></pre>

  <li> methods to check if accumulator is valid

       <pre><a href="/perl/ifc_document.pl?file=$isip/class/search/TrainNode/TrainNode.h&method=setAccumulatorValid">boolean setAccumulatorValid(boolean arg = true);</a></pre>
       <pre><a href="/perl/ifc_document.pl?file=$isip/class/search/TrainNode/TrainNode.h&method=isAccumulatorValid">boolean isAccumulatorValid();</a></pre>

</ul>

<a name="private">
<b>private methods:</b>
<br><br>

<ul>
  
  <li> none
</ul>

<a name="notes">
<b>notes:</b>
<br><br>

<ul>
  <li> The TrainNode class is primarily used during training, i.e., it is used to generate the trellis. The trellis is in turn used to compute the state occupancy probability of the states and reestimate the parameters of the model.
</ul>

<!--#include virtual="/hse/ies/templates/documentation/footer/footer.html" -->
