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

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

</b>
<br><br>

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

<blockquote>
<pre>

g++ [flags ...] file ... -l /isip/tools/lib/$ISIP_BINARY/lib_search_a

#include &lt;Context.h&gt;

GVSnode* getCentralVertex();
GVSnode* getBeforeCentralVertex();
GVSnode* getAfterCentralVertex();
GVSnode* getLastVertex();
boolean convert();
boolean convert(Context*& output, boolean extended = false);
boolean fold();
boolean extend(GVSnode* pointer_to_vertex);

</pre>
</blockquote>

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

<blockquote>
<pre>

long central_position = 1;
long total_context_length = 3;

GraphVertex<SearchNode>* left_vertex;
GraphVertex<SearchNode>* central_vertex;
GraphVertex<SearchNode>* right_vertex;

Context triphone_context(total_context_length, central_position);

triphone_context.assignAndAdvance((ulong)left_vertex);
triphone_context.assignAndAdvance((ulong)central_vertex);
triphone_context.assignAndAdvance((ulong)right_vertex);

</pre>
</blockquote>

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

This class is used to represent context-dependent search symbols. The search
symbol is represented by the central context of a circular delay line. The
context of the search symbol, left and right search symbols, is represented by
the remaining entries in the circular delay line data member.

<br><br>

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

<ul>
  <li> <a href="/perl/ifc_document.pl?file=$isip/class/dstr/CircularDelayLine/CircularDelayLine.h">CircularDelayLine.h</a>
</ul>

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

<ul>
  <li> define class name:

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

  <li> define i/o constants:
	      
       <pre><a href="/perl/ifc_document.pl?file=$isip/class/search/Context/cont_00.cc&constant=PARAM_CENTRAL">static const String PARAM_CENTRAL;</a></pre>

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

  <li> define default values:
       
       <pre>static const long DEF_LENGTH = 1;</pre>

       <pre>static const long DEF_CENTRAL_INDEX = 1;</pre>

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

       <pre>static const long DEF_EXTENSION_LENGTH = 0;</pre>

</ul>

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

<ul>
  <li> error codes indicating general errors:

       <pre><a href="/perl/ifc_document.pl?err=90100">static const long ERR = 90100;</a></pre>

</ul>

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

<ul>
  <li> index of the central vertex in context:

       <pre>long central_d;</pre>

  <li> length of the future context extension, used if we have a cross-symbol context:

       <pre>long ext_length_d;</pre>

  <li> declare the debugging parameters:

       <pre><a href="/perl/ifc_document.pl?file=$isip/class/search/Context/cont_00.cc&static=debug_level_d">static Integral::DEBUG debug_level_d;</a></pre>

  <li> declare the memory manager:

       <pre><a href="/perl/ifc_document.pl?file=$isip/class/search/Context/cont_00.cc&static=mgr_d">static MemoryManager mgr_d;</a></pre>

  <li> type definition:

       <pre>typedef GraphVertex&lt;SearchNode&gt; GVSnode;</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/Context/Context.h&method=name&instance=0">static const String& name();</a></pre>

  <li> debug methods:

       <pre><a href="/perl/ifc_document.pl?file=$isip/class/search/Context/cont_02.cc&method=diagnose&instance=0">static boolean diagnose(Integral::DEBUG debug_level);</a></pre>

  <li> destructor/constructor(s):

       <pre><a href="/perl/ifc_document.pl?file=$isip/class/search/Context/Context.h&method=destructor&instance=0">~Context();</a></pre>

       <pre><a href="/perl/ifc_document.pl?file=$isip/class/search/Context/Context.h&method=default+constructor&instance=0">Context(long context_length = DEF_LENGTH, long central_index = DEF_CENTRAL_INDEX) : CircularDelayLine&lt;Ulong&gt;(context_length);</a></pre>

       <pre><a href="/perl/ifc_document.pl?file=$isip/class/search/Context/Context.h&method=copy+constructor&instance=0">Context(const Context& copy_context) : CircularDelayLine&lt;Ulong&gt;(copy_context.length());</a></pre>

  <li> assign methods:

       <pre><a href="/perl/ifc_document.pl?file=$isip/class/search/Context/cont_05.cc&method=assign&instance=0">boolean assign(const Context& context_cmp);</a></pre>

  <li> operator= method:

       <pre>not present.</pre>

  <li> i/o methods:

       <pre><a href="/perl/ifc_document.pl?file=$isip/class/search/Context/cont_04.cc&method=sofSize&instance=0">long sofSize() const;</a></pre>

       <pre><a href="/perl/ifc_document.pl?file=$isip/class/search/Context/cont_03.cc&method=read&instance=0">boolean read(Sof& sof, long tag, const String& name = CLASS_NAME);</a></pre>

       <pre><a href="/perl/ifc_document.pl?file=$isip/class/search/Context/cont_04.cc&method=write&instance=0">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/Context/cont_03.cc&method=readData&instance=0">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/Context/cont_04.cc&method=writeData&instance=0">boolean writeData(Sof& sof, const String& pname = String::EMPTY) const;</a></pre>

  <li> equality methods:

       <pre><a href="/perl/ifc_document.pl?file=$isip/class/search/Context/cont_05.cc&method=eq&instance=0">boolean eq(const Context& context_cmp) const;</a></pre>

  <li> memory management methods:

       <pre><a href="/perl/ifc_document.pl?file=$isip/class/search/Context/Context.h&method=new&instance=0">static void* operator new(size_t size);</a></pre>

       <pre><a href="/perl/ifc_document.pl?file=$isip/class/search/Context/Context.h&method=new\[\]&instance=0">static void* operator new[](size_t size);</a></pre>

       <pre><a href="/perl/ifc_document.pl?file=$isip/class/search/Context/Context.h&method=delete&instance=0">static void operator delete(void* ptr);</a></pre>

       <pre><a href="/perl/ifc_document.pl?file=$isip/class/search/Context/Context.h&method=delete\[\]&instance=0">static void operator delete[](void* ptr);</a></pre>

       <pre><a href="/perl/ifc_document.pl?file=$isip/class/search/Context/Context.h&method=setGrowSize&instance=0">static boolean setGrowSize(long grow_size);</a></pre>

</ul>

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

<ul>
  <li> context access methods:

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

       <pre><a href="/perl/ifc_document.pl?file=$isip/class/search/Context/Context.h&method=getCentralVertex&instance=0">GVSnode* getCentralVertex();</a></pre>

       <pre><a href="/perl/ifc_document.pl?file=$isip/class/search/Context/Context.h&method=setCentralVertex&instance=0">boolean setCentralVertex(ulong new_gvnode_a);</a></pre>

       <pre><a href="/perl/ifc_document.pl?file=$isip/class/search/Context/Context.h&method=getBeforeCentralVertex&instance=0">GVSnode* getBeforeCentralVertex();</a></pre>

       <pre><a href="/perl/ifc_document.pl?file=$isip/class/search/Context/Context.h&method=getAfterCentralVertex&instance=0">GVSnode* getAfterCentralVertex();</a></pre>

       <pre><a href="/perl/ifc_document.pl?file=$isip/class/search/Context/Context.h&method=getLastVertex&instance=0">GVSnode* getLastVertex();</a></pre>

       <pre><a href="/perl/ifc_document.pl?file=$isip/class/search/Context/Context.h&method=setLastVertex&instance=0">boolean setLastVertex(ulong new_gvnode_a);</a></pre>

  <li> declare display methods:
       
       <pre><a href="/perl/ifc_document.pl?file=$isip/class/search/Context/cont_05.cc&method=print&instance=1">boolean print();</a></pre>

       <pre><a href="/perl/ifc_document.pl?file=$isip/class/search/Context/cont_05.cc&method=print&instance=0">boolean print(String& output);</a></pre>

  <li> declare hash function:
       
       <pre><a href="/perl/ifc_document.pl?file=$isip/class/search/Context/cont_05.cc&method=hash&instance=0">long hash(long capacity) const;</a></pre>

  <li> declare context conversion methods:
       
       <pre><a href="/perl/ifc_document.pl?file=$isip/class/search/Context/cont_05.cc&method=convert&instance=0">boolean convert();</a></pre>

       <pre><a href="/perl/ifc_document.pl?file=$isip/class/search/Context/cont_05.cc&method=convert&instance=1">boolean convert(Context*& output, boolean extended = false);</a></pre>

  <li> declare context manupulation methods:
       
       <pre><a href="/perl/ifc_document.pl?file=$isip/class/search/Context/cont_05.cc&method=fold&instance=0">boolean fold();</a></pre>

       <pre><a href="/perl/ifc_document.pl?file=$isip/class/search/Context/cont_05.cc&method=extend&instance=0">boolean extend(GVSnode* pointer_to_vertex);</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> none.

<pre>
</pre>
</ul>

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

<ul>
  <li> none.
</ul>

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