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

<!--#set var="isip_page_title" value="Trace" -->
<?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/Trace/Trace.h">Trace</a>
</b>

<br><br>

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

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

#include &lt;Trace.h&gt;

~Trace();
Trace();
Trace(const Trace& copy_sym);

boolean setScore(float score);
boolean setHistory(const History& copy_history);
boolean setBackPointer(Trace* back_ptr);
ulong incrementRefCount(ulong increment = DEF_REF_INCR);
boolean setFrame(ulong frame);
boolean setActive(boolean is_active);

</pre>
</blockquote>

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

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

// seed the top trace list with the start node of the search graph
//
Trace trace = new Trace();
trace.setFrame(0);
trace.setBackPointer((Trace*)NULL);
trace.getHistory()->push(search_levels_d(0).getSubGraph(0).getStart());
 
</pre>
</blockquote>

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

Trace is the path marker for the search. Trace essentially defines the path we have taken to the current point in the search and maintains the total path score for a point in the search.
<br><br>

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

<ul>
  <li> <a href="../History/index.html">History</a>
  <li> <a href="../../math/scalar/Ulong/index.html">ULong</a>
  <li> <a href="../../math/scalar/Float/index.html">Float</a>
  <li> <a href="../../system/MemoryManager/index.html">MemoryManager</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/Trace/trace_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/Trace/trace_00.cc&constant=PARAM_SCORE">static const String Trace::PARAM_SCORE;</a></pre>

  <li> define the trace mode choices:
       
       <pre>enum TMODE { DECODE = 0, TRAIN, DEF_TMODE = DECODE};</pre>
       
  <li> other important constants:
       
       <pre>static const float INACTIVE_SCORE = -11111111111111.0f;</pre>

  <li> define the default value(s) of the class data:
       
       <pre>static const float DEF_SCORE = 0.0;</pre>
       <pre>static const ulong DEF_FRAME = 0;</pre>

  <li> define default arguments to methods:
       
       <pre>static const ulong DEF_REF_INCR = 1;</pre>
       <pre>static const ulong DEF_REF_DECR = 1;</pre>

</ul>
	 
<a name="error">       
<b>error codes:</b>
<br><br>

<ul>
  <li> error code indicating a general error:
       
       <pre><a href="/perl/ifc_document.pl?err=00090000">static const long ERR = 90000;</a></pre>
       
  <li> error code indicating an i/o error:
       
       <pre><a href="/perl/ifc_document.pl?err=00090001">static const long READ = 90001;</a></pre>
</ul>

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

<ul>

  <li> define a trace mode flag:
       
     <pre>TMODE trace_mode_d;</pre>
       
  <li> define a structure to maintain previous n-symbols:

     <pre>Context** nsymbol_d;</pre>

  <li> define a back pointer to the previous trace(s):

       <pre>SingleLinkedList&lt;Trace&gt back_ptr_d;</pre>

  <li> define a structure to maintain the trace's location in the search space:

       <pre>History history_d;</pre>

  <li> define the reference to symbol graph node

	<pre>SymbolGraphNode* symbol_node_d;</pre>
  
  <li> define the score for the path in the search space that this trace represents:

       <pre>float score_d;</pre>

  <li> define the lm score for the path in the search space that this trace represents
	<pre>float lm_score_d;</pre>

  <li> the time frame that this trace is in:

       <pre>ulong frame_d;</pre>
  
  <li> define a reference count that says when this trace can be deleted:

       <pre>ulong reference_count_d;</pre>
  
  <li> memory manager:
       
       <pre><a href="/perl/ifc_document.pl?file=$isip/class/search/Trace/trace_00.cc&static=mgr_d">static MemoryManager mgr_d;</a></pre>
       
  <li> debug level:
       
       <pre><a href="/perl/ifc_document.pl?file=$isip/class/search/Trace/trace_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/Trace/Trace.h&method=name">static const String& name();</a></pre>
       <pre><a href="/perl/ifc_document.pl?file=$isip/class/search/Trace/trace_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/Trace/trace_01.cc&method=debug">boolean debug(const unichar* message) const;</a></pre>
       <pre><a href="/perl/ifc_document.pl?file=$isip/class/search/Trace/Trace.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/Trace/trace_00.cc&method=destructor">~Trace();</a></pre>
       <pre><a href="/perl/ifc_document.pl?file=$isip/class/search/Trace/Trace.h&method=default constructor">Trace(float score = DEF_SCORE);</a></pre>
       <pre><a href="/perl/ifc_document.pl?file=$isip/class/search/Trace/Trace.h&method=copy+constructor">Trace(const Trace& arg);</a></pre>

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

  <li> i/o methods:
       
       <pre><a href="/perl/ifc_document.pl?file=$isip/class/search/Trace/Trace.h&method=sofSize">long sofSize() const;</a></pre>
       <pre><a href="/perl/ifc_document.pl?file=$isip/class/search/Trace/Trace.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/Trace/Trace.h&method=readData">boolean readData(Sof& sof, const String& pname = String::EMPTY, long size = SofParser::FULL_OBJECT, boolean param = true, boolean nested = false);</a></pre>
       <pre><a href="/perl/ifc_document.pl?file=$isip/class/search/Trace/Trace.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/Trace/Trace.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/Trace/trace_07.cc&method=eq&instance=0">boolean eq(const Trace& compare_trace) const;</a></pre>

       <pre><a href="/perl/ifc_document.pl?file=$isip/class/search/Trace/Trace.h&method=&lt;&instance=0">boolean operator &lt; (const Trace& trace_a);</a></pre>

       <pre><a href="/perl/ifc_document.pl?file=$isip/class/search/Trace/Trace.h&method=&gt;&instance=0">boolean operator &gt; (const Trace& trace_a);</a></pre>

  <li> memory management methods:

       <pre><a href="/perl/ifc_document.pl?file=$isip/class/search/Trace/Trace.h&method=new">static void* operator new(size_t size);</a></pre>
       <pre><a href="/perl/ifc_document.pl?file=$isip/class/search/Trace/Trace.h&method=new[]">static void* operator new[](size_t size);</a></pre>
       <pre><a href="/perl/ifc_document.pl?file=$isip/class/search/Trace/Trace.h&method=delete">static void operator delete(void* ptr);</a></pre>
       <pre><a href="/perl/ifc_document.pl?file=$isip/class/search/Trace/Trace.h&method=delete[]">static void operator delete[](void* ptr);</a></pre>  
       <pre><a href="/perl/ifc_document.pl?file=$isip/class/search/Trace/Trace.h&method=setGrowSize">static boolean setGrowSize(long grow_size);</a></pre>
       <pre><a href="/perl/ifc_document.pl?file=$isip/class/search/Trace/trace_06.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> trace set/get methods:
       <pre><a href="/perl/ifc_document.pl?file=$isip/class/search/Trace/Trace.h&method=setTraceMode">boolean setTraceMode(TMODE arg);</a></pre>
       <pre><a href="/perl/ifc_document.pl?file=$isip/class/search/Trace/Trace.h&method=getTraceMode">TMODE getTraceMode();</a></pre>
  <li> score manipulation methods:

       <pre><a href="/perl/ifc_document.pl?file=$isip/class/search/Trace/Trace.h&method=setScore">boolean setScore(float score);</a></pre>
       <pre><a href="/perl/ifc_document.pl?file=$isip/class/search/Trace/Trace.h&method=getScore">float getScore() const;</a></pre>

       <pre><a href="/perl/ifc_document.pl?file=$isip/class/search/Trace/Trace.h&method=setLMScore">boolean setLMScore(float score);</a></pre>
       <pre><a href="/perl/ifc_document.pl?file=$isip/class/search/Trace/Trace.h&method=getLMScore">float getLMScore() const;</a></pre>

       <pre><a href="/perl/ifc_document.pl?file=$isip/class/search/Trace/Trace.h&method=setNSymbol">boolean setNSymbol(Context**& arg);</a></pre>
       <pre><a href="/perl/ifc_document.pl?file=$isip/class/search/Trace/Trace.h&method=getNSymbol">Context**& getNSymbol();</a></pre>

       <pre><a href="/perl/ifc_document.pl?file=$isip/class/search/Trace/Trace.h&method=setSymbolNode">boolean setSymbolNode(SymbolGraphNode* arg);</a></pre>
       <pre><a href="/perl/ifc_document.pl?file=$isip/class/search/Trace/Trace.h&method=getSymbolNode">SymbolGraphNode* getSymbolNode();</a></pre>

  <li> history related methods:
	    
       <pre><a href="/perl/ifc_document.pl?file=$isip/class/search/Trace/trace_07.cc&method=setHistory">boolean setHistory(const History& copy_history);</a></pre>
       <pre><a href="/perl/ifc_document.pl?file=$isip/class/search/Trace/trace_07.cc&method=getHistory">History* getHistory() const;</a></pre>
       <pre><a href="/perl/ifc_document.pl?file=$isip/class/search/Trace/trace_05.cc&method=setBackPointer">boolean setBackPointer(Trace* back_ptr);</a></pre>
       <pre><a href="/perl/ifc_document.pl?file=$isip/class/search/Trace/Trace.h&method=getBackPointer">Trace* getBackPointer() const;</a></pre>
       <pre><a href="/perl/ifc_document.pl?file=$isip/class/search/Trace/trace_05.cc&method=decrementRefCount">ulong decrementRefCount(ulong decrement = DEF_REF_DECR);</a></pre>
       <pre><a href="/perl/ifc_document.pl?file=$isip/class/search/Trace/Trace.h&method=incrementRefCount">ulong incrementRefCount(ulong increment = DEF_REF_INCR);</a></pre>
       <pre><a href="/perl/ifc_document.pl?file=$isip/class/search/Trace/Trace.h&method=getRefCount">ulong getRefCount() const;</a></pre>
       <pre><a href="/perl/ifc_document.pl?file=$isip/class/search/Trace/Trace.h&method=setRefCount">boolean setRefCount(ulong count);</a></pre>
       <pre><a href="/perl/ifc_document.pl?file=$isip/class/search/Trace/Trace.h&method=setFrame">boolean setFrame(ulong frame);</a></pre>
       <pre><a href="/perl/ifc_document.pl?file=$isip/class/search/Trace/Trace.h&method=getFrame">ulong getFrame() const;</a></pre>

  <li> trace activity methods:
	    
       <pre><a href="/perl/ifc_document.pl?file=$isip/class/search/Trace/trace_05.cc&method=setActive">boolean setActive(boolean is_active);</a></pre>
       <pre><a href="/perl/ifc_document.pl?file=$isip/class/search/Trace/Trace.h&method=isActive">boolean isActive() const;</a></pre>
       
  <li> trace deletion methods:

       <pre><a href="/perl/ifc_document.pl?file=$isip/class/search/Trace/trace_06.cc&method=deleteTrace&instance=0">static boolean deleteTrace(Trace* in_trace, boolean is_recursive, boolean clean_search_node = false);</a></pre>
       <pre><a href="/perl/ifc_document.pl?file=$isip/class/search/Trace/trace_06.cc&method=deleteTrace&instance=1">static boolean deleteTrace(Trace* in_trace, boolean is_recursive, BiGraph&lt;TrainNode&gt* trellis, HashTable&lt;HashKey&lt;Trace&gt, BiGraphVertex&lt;TrainNode&gt &gt* mapping, boolean clean_search_node = false);</a></pre>
       
       <pre><a href="/perl/ifc_document.pl?file=$isip/class/search/Trace/trace_06.cc&method=deleteBackTraces&instance=0">static boolean deleteBackTraces(Trace* in_trace, boolean is_recursive, boolean clean_search_node = false);</a></pre>
       <pre><a href="/perl/ifc_document.pl?file=$isip/class/search/Trace/trace_06.cc&method=deleteBackTraces&instance=1">static boolean deleteBackTraces(Trace* in_trace, boolean is_recursive, BiGraph&lt;TrainNode&gt* trellis, HashTable&lt;HashKey&lt;Trace&gt, BiGraphVertex&lt;TrainNode&gt &gt* mapping, boolean clean_search_node = false);</a></pre>

       <pre><a href="/perl/ifc_document.pl?file=$isip/class/search/Trace/trace_05.cc&method=hash">long hash(long capacity) const;</a></pre>

</ul>

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

<ul>
  <li> none
</ul>

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

<ul>
  <li> This <a href="/perl/ifc_document.pl?file=$isip/doc/examples/class/search/search_example_00/example.cc">example</a> shows how to build a simple search structure and how to generate all paths through it.
</ul>

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

<ul>
  <li> none
</ul>

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