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

<!--#set var="isip_page_title" value="BiGraphArc" -->
<?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/dstr/BiGraphArc/BiGraphArc.h"> BiGraphArc &lt;TObject&gt; </a></b>

<br><br>

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

<blockquote>
<pre>
g++ [flags ...] file ...

#include <BiGraphArc.h>;

BiGraphArc(const BiGraphArc&lt;TObject&gt;& copy_arc);
boolean setVertex(BiGraphVertex&lt;TObject&gt;* dest);
BiGraphVertex&lt;TObject&gt;* getVertex() const;
boolean containsData() const;
</pre>
</blockquote>

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

<blockquote>
<pre>
// declare the graph arc object
//
BiGraphArc&lt;Char&gt; arc;
BiGraphVertex&lt;Char&gt; vertex;

// set the items
//
arc.setVertex(&vertex);
arc.setWeight(0.9);
arc.setEpsilon(true);
</pre>
</blockquote>

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

BiGraphArc is a generic arc in a graph. The main purpose of an arc is to 
connect two graph vertices. This class also provides support to the
Graph class.

<br><br>

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

<ul>
  <li> <a href="../../io/SofParser/"> SofParser</a>
  <li> <a href="../../system/MemoryManager/"> MemoryManager</a>
  <li> <a href="../../math/scalar/Boolean/"> Boolean</a>
  <li> <a href="../../math/scalar/Float/"> Float</a>
  <li> <a href="../../system/Console"> Console</a>
  <li> <a href="../BiGraphVertex/index.html"> BiGraphVertex</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/dstr/BiGraphArc/BiGraphArc.h&constant=CLASS_NAME">static const String CLASS_NAME = L"BiGraphArc";</a></pre>
       
  <li> i/o related constants:
       
       <pre><a href="/perl/ifc_document.pl?file=$isip/class/dstr/BiGraphArc/BiGraphArc.h&constant=DEF_PARAM">static const String DEF_PARAM = L"arc";</a></pre>

  <li> default arguments to methods:
       
       <pre>static const float DEF_WEIGHT = 0.0;</pre>
       <pre>static const boolean DEF_EPSILON = false;</pre>
</ul>

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

<ul>
  <li> error code indicating BiGraphArc class general error:
       
       <pre><a href="/perl/ifc_document.pl?err=00041000">static const long ERR = 41000;</a></pre>
</ul>
       
<a name="protected">
<b>protected data:</b>
<br><br>

<ul>
  <li> vertex we are pointing to:
       
       <pre>BiGraphVertex&lt;TObject&gt;* vertex_d;</pre>

  <li> weight for the edge:
       
       <pre>Float weight_d;</pre>

  <li> is this an epsilon transition:
       
       <pre>Boolean is_epsilon_d;</pre>

 <li> debugging parameters:

       <pre><a href="/perl/ifc_document.pl?file=$isip/class/dstr/BiGraphArc/BiGraphArc.h&static=debug_level_d">static Integral::DEBUG debug_level_d;</a></pre>

 <li> define the memory manager:

       <pre><a href="/perl/ifc_document.pl?file=$isip/class/dstr/BiGraphArc/BiGraphArc.h&static=mgr_d">static MemoryManager mgr_d;</a></pre>       
</ul>

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

<ul>
  <li> static methods: this class currently does not have a standalone
       diagnose method. Instead, it is tested extensively in the

       <a href="../BiGraph/index.html">BiGraph</a>

       classes.
       
       <pre><a href="/perl/ifc_document.pl?file=$isip/class/dstr/BiGraphArc/BiGraphArc.h&method=name">static const String& name();</a></pre>
       
  <li> debug methods:

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

  <li> destructor/constructor(s):
       
       <pre><a href="/perl/ifc_document.pl?file=$isip/class/dstr/BiGraphArc/BiGraphArc.h&method=destructor">~BiGraphArc();</a></pre>
       <pre><a href="/perl/ifc_document.pl?file=$isip/class/dstr/BiGraphArc/BiGraphArc.h&method=default+constructor">BiGraphArc(BiGraphVertex&lt;TObject&gt;* = (BiGraphVertex&lt;TObject&gt;*)NULL, float weight = DEF_WEIGHT, boolean is_epsilon = DEF_EPSILON);</a></pre>
       <pre><a href="/perl/ifc_document.pl?file=$isip/class/dstr/BiGraphArc/BiGraphArc.h&method=copy+constructor">BiGraphArc(const BiGraphArc&lt;TObject&gt;& copy_arc);</a></pre>
       
  <li> assign methods:
       
       <pre><a href="/perl/ifc_document.pl?file=$isip/class/dstr/BiGraphArc/BiGraphArc.h&method=assign&instance=0">boolean assign(const BiGraphArc&lt;TObject&gt;& copy_arc);</a></pre>

  <li> operator= methods:
       
       <pre><a href="/perl/ifc_document.pl?file=$isip/class/dstr/BiGraphArc/BiGraphArc.h&method=operator%3D">BiGraphArc&lt;TObject&gt;& operator=(const BiGraphArc&lt;TObject&gt;& arg);</a></pre>
       
  <li> equality methods:

       <pre><a href="/perl/ifc_document.pl?file=$isip/class/dstr/BiGraphArc/BiGraphArc.h&method=eq">boolean eq(const BiGraphArc&lt;TObject&gt;& compare_arc) const;</a></pre>
       
  <li> i/o methods:

       <pre>i/o methods are not defined for this class.</pre>

  <li> memory management methods:

       <pre><a href="/perl/ifc_document.pl?file=$isip/class/dstr/BiGraphArc/BiGraphArc.h&method=new">void* operator new(size_t size);</a></pre>
       <pre><a href="/perl/ifc_document.pl?file=$isip/class/dstr/BiGraphArc/BiGraphArc.h&method=new[]">void* operator new[](size_t size);</a></pre>
       <pre><a href="/perl/ifc_document.pl?file=$isip/class/dstr/BiGraphArc/BiGraphArc.h&method=delete">void operator delete(void* ptr);</a></pre>
       <pre><a href="/perl/ifc_document.pl?file=$isip/class/dstr/BiGraphArc/BiGraphArc.h&method=delete[]">void operator delete[](void* ptr);</a></pre>
       <pre><a href="/perl/ifc_document.pl?file=$isip/class/dstr/BiGraphArc/BiGraphArc.h&method=setGrowSize">static boolean setGrowSize(long grow_size);</a></pre>
       <pre><a href="/perl/ifc_document.pl?file=$isip/class/dstr/BiGraphArc/BiGraphArc.h&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> endpoint vertex get and set methods:
       
       <pre><a href="/perl/ifc_document.pl?file=$isip/class/dstr/BiGraphArc/BiGraphArc.h&method=setVertex">boolean setVertex(BiGraphArcVertex&lt;TObject&gt;* dest);</a></pre>
       <pre><a href="/perl/ifc_document.pl?file=$isip/class/dstr/BiGraphArc/BiGraphArc.h&method=getVertex">BiGraphVertex&lt;TObject&gt;* getVertex() const;</a></pre>

  <li> arc weight get and set methods:
       
       <pre><a href="/perl/ifc_document.pl?file=$isip/class/dstr/BiGraphArc/BiGraphArc.h&method=setWeight">boolean setWeight(float weight);</a></pre>
       <pre><a href="/perl/ifc_document.pl?file=$isip/class/dstr/BiGraphArc/BiGraphArc.h&method=getWeight">float getWeight() const;</a></pre>

  <li> arc epsilon flag get and set methods:
       
       <pre><a href="/perl/ifc_document.pl?file=$isip/class/dstr/BiGraphArc/BiGraphArc.h&method=setEpsilon">boolean setEpsilon(boolean is_epsilon = DEF_EPSILON);</a></pre>
       <pre><a href="/perl/ifc_document.pl?file=$isip/class/dstr/BiGraphArc/BiGraphArc.h&method=getEpsilon">boolean getEpsilon() const;</a></pre>

  <li> method to check if the arc has any information that need to be written:
       
       <pre><a href="/perl/ifc_document.pl?file=$isip/class/dstr/BiGraphArc/BiGraphArc.h&method=containsData">boolean containsData() 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 example shows how to assign a BiGraphArc:
       
       <pre>
// create some temporary objects and items
//  
BiGraphVertex<TObject> vert0;
BiGraphVertex<TObject> vert1;
  
BiGraphArc<TObject> tmp_arc;
BiGraphArc<TObject>* tmp_dyn_arc = new BiGraphArc<TObject>();
  
// set the items
//
tmp_dyn_arc->setVertex(&vert1);
tmp_dyn_arc->setWeight(0.79);
tmp_dyn_arc->setEpsilon(true);

// try the copy assign
//
tmp_arc.assign(*tmp_dyn_arc);
  
if ((tmp_arc.vertex_d != &vert1) ||
    (tmp_dyn_arc->vertex_d != &vert1) ||
    !(tmp_arc.weight_d.almostEqual(0.79)) ||
    !(tmp_dyn_arc->weight_d.almostEqual(0.79)) ||
    !tmp_arc.is_epsilon_d ||
    !tmp_dyn_arc->is_epsilon_d) {
  Console::put(L"Error in assign method");  
}</pre>       
</ul>

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

<ul>
  <li> The BiGraphArc class is a support class for the

       <a href="../BiGraph/index.html">BiGraph</a>

       class.

       <br><br>
</ul>

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