<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<title>CPPLapack: dcovector_small-specialized.hpp File Reference</title>

<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css" />

<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { searchBox.OnSelectItem(0); });
</script>

</head>
<body>
<div id="top"><!-- do not remove this div! -->


<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  
  
  <td style="padding-left: 0.5em;">
   <div id="projectname">CPPLapack
   
   </div>
   
  </td>
  
  
  
 </tr>
 </tbody>
</table>
</div>

<!-- Generated by Doxygen 1.7.6.1 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="pages.html"><span>Related&#160;Pages</span></a></li>
      <li><a href="annotated.html"><span>Classes</span></a></li>
      <li class="current"><a href="files.html"><span>Files</span></a></li>
      <li><a href="dirs.html"><span>Directories</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="files.html"><span>File&#160;List</span></a></li>
      <li><a href="globals.html"><span>File&#160;Members</span></a></li>
    </ul>
  </div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Classes</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Friends</a></div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

  <div id="nav-path" class="navpath">
    <ul>
      <li class="navelem"><a class="el" href="dir_a37d0dd275f7ec49ee26f1d33d1059f5.html">include</a>      </li>
      <li class="navelem"><a class="el" href="dir_cb17ad2bab547ae9db055464c7b276b8.html">small</a>      </li>
    </ul>
  </div>
</div>
<div class="header">
  <div class="summary">
<a href="#func-members">Functions</a>  </div>
  <div class="headertitle">
<div class="title">dcovector_small-specialized.hpp File Reference</div>  </div>
</div><!--header-->
<div class="contents">

<p><a href="dcovector__small-specialized_8hpp_source.html">Go to the source code of this file.</a></p>
<table class="memberdecls">
<tr><td colspan="2"><h2><a name="func-members"></a>
Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">double&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="dcovector__small-specialized_8hpp.html#abc7237457e9e17f060cc8108d1e0bf7d">operator/</a> (const dcovec2 &amp;A, const dcovec2 &amp;B)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">double&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="dcovector__small-specialized_8hpp.html#aa6f97bbb63b89a3be367622faa03161a">v2t</a> (const dcovec2 &amp;v)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">dcovec2&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="dcovector__small-specialized_8hpp.html#a7c6e40d311633e4c71f998cf49ff39f0">rotate</a> (const dcovec2 &amp;v, const double &amp;<a class="el" href="zrovector-calc_8hpp.html#ad500dfc3f8af25ed0ef176c8f9249fcc">t</a>)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">dcovec3&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="dcovector__small-specialized_8hpp.html#ad9a9aa2ab7bb9902ed9f6ee255d71b17">operator/</a> (const dcovec3 &amp;A, const dcovec3 &amp;B)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">dcovec3&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="dcovector__small-specialized_8hpp.html#a4af7f6d0b6f5aba6afa4990f9cd938d4">operator/=</a> (dcovec3 &amp;A, const dcovec3 &amp;B)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">dquater&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="dcovector__small-specialized_8hpp.html#a98570caae6b2317527786768626ef2b4">vr2q</a> (const dcovec3 &amp;v, const double &amp;r)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">dquater&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="dcovector__small-specialized_8hpp.html#a2ea0dbdf9f1b8de71470bf9d0a356577">vt2q</a> (const dcovec3 &amp;v, const double &amp;theta)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">dcovec3&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="dcovector__small-specialized_8hpp.html#afcf8c7653aeb6f1a819acac50dcc2fbc">rotate</a> (const dcovec3 &amp;v, const dquater &amp;q)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">dquater&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="dcovector__small-specialized_8hpp.html#a4d02fb144f279a197d54d5a4fe53b9ed">conj</a> (const dquater &amp;q)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">dcovec3&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="dcovector__small-specialized_8hpp.html#a2eb38711e1c30cc070f53589d1905fea">imag</a> (const dquater &amp;q)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">dquater&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="dcovector__small-specialized_8hpp.html#a816188231dc59c47c02a0187291207f1">inv</a> (const dquater &amp;q)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">dquater&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="dcovector__small-specialized_8hpp.html#aeb2a5312b5ecd2a6b4f43f98a6fb0bd9">operator*</a> (const dquater &amp;q1, const dquater &amp;q2)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">dquater&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="dcovector__small-specialized_8hpp.html#aba03f5e1f9e7bb0f3235ab64922c65c7">operator/</a> (const dquater &amp;q1, const dquater &amp;q2)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">dquater&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="dcovector__small-specialized_8hpp.html#a15a5d8cabc8a6b70dc5fb2159ef89153">operator*=</a> (dquater &amp;q1, const dquater &amp;q2)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">dquater&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="dcovector__small-specialized_8hpp.html#a38afe3d96f9dd8fee1a43ceb4f842a67">operator/=</a> (dquater &amp;q1, const dquater &amp;q2)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">dcovec3&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="dcovector__small-specialized_8hpp.html#abe7b42c5233b03e0d0d8dcc0ce5c6b14">q2vt</a> (const dquater &amp;q)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">dgemat3&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="dcovector__small-specialized_8hpp.html#a0b8662d50893bcd25e2d80f468b721f5">q2m</a> (const dquater &amp;q)</td></tr>
</table>
<hr/><h2>Function Documentation</h2>
<a class="anchor" id="abc7237457e9e17f060cc8108d1e0bf7d"></a><!-- doxytag: member="dcovector_small&#45;specialized.hpp::operator/" ref="abc7237457e9e17f060cc8108d1e0bf7d" args="(const dcovec2 &amp;A, const dcovec2 &amp;B)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">double operator/ </td>
          <td>(</td>
          <td class="paramtype">const dcovec2 &amp;&#160;</td>
          <td class="paramname"><em>A</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const dcovec2 &amp;&#160;</td>
          <td class="paramname"><em>B</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td><code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>calculate vector product only for 2D vector </p>

<p>Definition at line <a class="el" href="dcovector__small-specialized_8hpp_source.html#l00003">3</a> of file <a class="el" href="dcovector__small-specialized_8hpp_source.html">dcovector_small-specialized.hpp</a>.</p>
<div class="fragment"><pre class="fragment">{VERBOSE_REPORT;
  <span class="keywordflow">return</span> A(0)*B(1) -A(1)*B(0);
}
</pre></div>
</div>
</div>
<a class="anchor" id="aa6f97bbb63b89a3be367622faa03161a"></a><!-- doxytag: member="dcovector_small&#45;specialized.hpp::v2t" ref="aa6f97bbb63b89a3be367622faa03161a" args="(const dcovec2 &amp;v)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">double <a class="el" href="dcovector__small-specialized_8hpp.html#aa6f97bbb63b89a3be367622faa03161a">v2t</a> </td>
          <td>(</td>
          <td class="paramtype">const dcovec2 &amp;&#160;</td>
          <td class="paramname"><em>v</em></td><td>)</td>
          <td><code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Definition at line <a class="el" href="dcovector__small-specialized_8hpp_source.html#l00010">10</a> of file <a class="el" href="dcovector__small-specialized_8hpp_source.html">dcovector_small-specialized.hpp</a>.</p>
<div class="fragment"><pre class="fragment">{VERBOSE_REPORT;
  <span class="keywordflow">return</span> atan2(v(1),v(0));
}
</pre></div>
</div>
</div>
<a class="anchor" id="a7c6e40d311633e4c71f998cf49ff39f0"></a><!-- doxytag: member="dcovector_small&#45;specialized.hpp::rotate" ref="a7c6e40d311633e4c71f998cf49ff39f0" args="(const dcovec2 &amp;v, const double &amp;t)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">dcovec2 <a class="el" href="dsymatrix__small_8hpp.html#a439da5f2564fc8b616bef28f93c5bf3d">rotate</a> </td>
          <td>(</td>
          <td class="paramtype">const dcovec2 &amp;&#160;</td>
          <td class="paramname"><em>v</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const double &amp;&#160;</td>
          <td class="paramname"><em>t</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td><code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Definition at line <a class="el" href="dcovector__small-specialized_8hpp_source.html#l00017">17</a> of file <a class="el" href="dcovector__small-specialized_8hpp_source.html">dcovector_small-specialized.hpp</a>.</p>
<div class="fragment"><pre class="fragment">{VERBOSE_REPORT;
  dcovec2 w;
  w(0)=v(0)*cos(<a class="code" href="__dcovector-calc_8hpp.html#afe5475fdf72e825c1fea5f306d686664">t</a>)-v(1)*sin(<a class="code" href="__dcovector-calc_8hpp.html#afe5475fdf72e825c1fea5f306d686664">t</a>);
  w(1)=v(0)*sin(<a class="code" href="__dcovector-calc_8hpp.html#afe5475fdf72e825c1fea5f306d686664">t</a>)+v(1)*cos(<a class="code" href="__dcovector-calc_8hpp.html#afe5475fdf72e825c1fea5f306d686664">t</a>);
  <span class="keywordflow">return</span> w;
}
</pre></div>
</div>
</div>
<a class="anchor" id="ad9a9aa2ab7bb9902ed9f6ee255d71b17"></a><!-- doxytag: member="dcovector_small&#45;specialized.hpp::operator/" ref="ad9a9aa2ab7bb9902ed9f6ee255d71b17" args="(const dcovec3 &amp;A, const dcovec3 &amp;B)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">dcovec3 operator/ </td>
          <td>(</td>
          <td class="paramtype">const dcovec3 &amp;&#160;</td>
          <td class="paramname"><em>A</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const dcovec3 &amp;&#160;</td>
          <td class="paramname"><em>B</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td><code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>calculate vector product only for 3D vector </p>

<p>Definition at line <a class="el" href="dcovector__small-specialized_8hpp_source.html#l00037">37</a> of file <a class="el" href="dcovector__small-specialized_8hpp_source.html">dcovector_small-specialized.hpp</a>.</p>
<div class="fragment"><pre class="fragment">{VERBOSE_REPORT;
  dcovec3 C;
  C(0) =A(1)*B(2) -A(2)*B(1);
  C(1) =A(2)*B(0) -A(0)*B(2);
  C(2) =A(0)*B(1) -A(1)*B(0);
  <span class="keywordflow">return</span> C;
}
</pre></div>
</div>
</div>
<a class="anchor" id="a4af7f6d0b6f5aba6afa4990f9cd938d4"></a><!-- doxytag: member="dcovector_small&#45;specialized.hpp::operator/=" ref="a4af7f6d0b6f5aba6afa4990f9cd938d4" args="(dcovec3 &amp;A, const dcovec3 &amp;B)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">dcovec3 operator/= </td>
          <td>(</td>
          <td class="paramtype">dcovec3 &amp;&#160;</td>
          <td class="paramname"><em>A</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const dcovec3 &amp;&#160;</td>
          <td class="paramname"><em>B</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td><code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>calculate vector product only for 3D vector </p>

<p>Definition at line <a class="el" href="dcovector__small-specialized_8hpp_source.html#l00048">48</a> of file <a class="el" href="dcovector__small-specialized_8hpp_source.html">dcovector_small-specialized.hpp</a>.</p>
<div class="fragment"><pre class="fragment">{VERBOSE_REPORT;
  A =A/B;
  <span class="keywordflow">return</span> A;
}
</pre></div>
</div>
</div>
<a class="anchor" id="a98570caae6b2317527786768626ef2b4"></a><!-- doxytag: member="dcovector_small&#45;specialized.hpp::vr2q" ref="a98570caae6b2317527786768626ef2b4" args="(const dcovec3 &amp;v, const double &amp;r)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">dquater <a class="el" href="dcovector__small_8hpp.html#a51e6874f8a71597bc380f5f28f60973d">vr2q</a> </td>
          <td>(</td>
          <td class="paramtype">const dcovec3 &amp;&#160;</td>
          <td class="paramname"><em>v</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const double &amp;&#160;</td>
          <td class="paramname"><em>r</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td><code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Definition at line <a class="el" href="dcovector__small-specialized_8hpp_source.html#l00056">56</a> of file <a class="el" href="dcovector__small-specialized_8hpp_source.html">dcovector_small-specialized.hpp</a>.</p>

<p>Referenced by <a class="el" href="dcovector__small-specialized_8hpp_source.html#l00070">rotate()</a>, and <a class="el" href="dcovector__small-specialized_8hpp_source.html#l00063">vt2q()</a>.</p>
<div class="fragment"><pre class="fragment">{VERBOSE_REPORT;
  <span class="keywordflow">return</span> dquater(v(0),v(1),v(2),r);
}
</pre></div>
</div>
</div>
<a class="anchor" id="a2ea0dbdf9f1b8de71470bf9d0a356577"></a><!-- doxytag: member="dcovector_small&#45;specialized.hpp::vt2q" ref="a2ea0dbdf9f1b8de71470bf9d0a356577" args="(const dcovec3 &amp;v, const double &amp;theta)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">dquater <a class="el" href="dcovector__small_8hpp.html#aab227c7411a101f976b2f85ea3745ef0">vt2q</a> </td>
          <td>(</td>
          <td class="paramtype">const dcovec3 &amp;&#160;</td>
          <td class="paramname"><em>v</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const double &amp;&#160;</td>
          <td class="paramname"><em>theta</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td><code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Definition at line <a class="el" href="dcovector__small-specialized_8hpp_source.html#l00063">63</a> of file <a class="el" href="dcovector__small-specialized_8hpp_source.html">dcovector_small-specialized.hpp</a>.</p>

<p>References <a class="el" href="__dcovector-calc_8hpp_source.html#l00017">nrm2()</a>, and <a class="el" href="dcovector__small-specialized_8hpp_source.html#l00056">vr2q()</a>.</p>

<p>Referenced by <a class="el" href="dgematrix__small-specialized_8hpp_source.html#l00092">m2q()</a>.</p>
<div class="fragment"><pre class="fragment">{VERBOSE_REPORT;
  <span class="keywordflow">return</span> <a class="code" href="dcovector__small-specialized_8hpp.html#a98570caae6b2317527786768626ef2b4">vr2q</a>( v/(<a class="code" href="__dcovector-calc_8hpp.html#a892d328603828a5d0a2acedc2c4db7bb">nrm2</a>(v)+DBL_MIN)*std::sin(0.5*theta), std::cos(0.5*theta) );
}
</pre></div>
</div>
</div>
<a class="anchor" id="afcf8c7653aeb6f1a819acac50dcc2fbc"></a><!-- doxytag: member="dcovector_small&#45;specialized.hpp::rotate" ref="afcf8c7653aeb6f1a819acac50dcc2fbc" args="(const dcovec3 &amp;v, const dquater &amp;q)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">dcovec3 <a class="el" href="dsymatrix__small_8hpp.html#a439da5f2564fc8b616bef28f93c5bf3d">rotate</a> </td>
          <td>(</td>
          <td class="paramtype">const dcovec3 &amp;&#160;</td>
          <td class="paramname"><em>v</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const dquater &amp;&#160;</td>
          <td class="paramname"><em>q</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td><code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Definition at line <a class="el" href="dcovector__small-specialized_8hpp_source.html#l00070">70</a> of file <a class="el" href="dcovector__small-specialized_8hpp_source.html">dcovector_small-specialized.hpp</a>.</p>

<p>References <a class="el" href="__zcovector-calc_8hpp_source.html#l00015">conj()</a>, <a class="el" href="dcovector__small-specialized_8hpp_source.html#l00094">imag()</a>, and <a class="el" href="dcovector__small-specialized_8hpp_source.html#l00056">vr2q()</a>.</p>
<div class="fragment"><pre class="fragment">{VERBOSE_REPORT;
  <span class="keywordflow">return</span> <a class="code" href="dcovector__small-specialized_8hpp.html#a2eb38711e1c30cc070f53589d1905fea">imag</a>( q*<a class="code" href="dcovector__small-specialized_8hpp.html#a98570caae6b2317527786768626ef2b4">vr2q</a>(v,0.)*<a class="code" href="__zcovector-calc_8hpp.html#a773c28a661407104353f70c7a3ab88f2">conj</a>(q) );
}
</pre></div>
</div>
</div>
<a class="anchor" id="a4d02fb144f279a197d54d5a4fe53b9ed"></a><!-- doxytag: member="dcovector_small&#45;specialized.hpp::conj" ref="a4d02fb144f279a197d54d5a4fe53b9ed" args="(const dquater &amp;q)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">dquater <a class="el" href="zrovector-calc_8hpp.html#a0119995ed0b05460e70cc5de58575e09">conj</a> </td>
          <td>(</td>
          <td class="paramtype">const dquater &amp;&#160;</td>
          <td class="paramname"><em>q</em></td><td>)</td>
          <td><code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>conjuction </p>

<p>Definition at line <a class="el" href="dcovector__small-specialized_8hpp_source.html#l00087">87</a> of file <a class="el" href="dcovector__small-specialized_8hpp_source.html">dcovector_small-specialized.hpp</a>.</p>
<div class="fragment"><pre class="fragment">{VERBOSE_REPORT;
  <span class="keywordflow">return</span> dquater(-q(0),-q(1),-q(2), q(3));
}
</pre></div>
</div>
</div>
<a class="anchor" id="a2eb38711e1c30cc070f53589d1905fea"></a><!-- doxytag: member="dcovector_small&#45;specialized.hpp::imag" ref="a2eb38711e1c30cc070f53589d1905fea" args="(const dquater &amp;q)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">dcovec3 <a class="el" href="dcovector__small_8hpp.html#a5e2ba22eeeb1ef186923fc1bdc7d4819">imag</a> </td>
          <td>(</td>
          <td class="paramtype">const dquater &amp;&#160;</td>
          <td class="paramname"><em>q</em></td><td>)</td>
          <td><code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>imag </p>

<p>Definition at line <a class="el" href="dcovector__small-specialized_8hpp_source.html#l00094">94</a> of file <a class="el" href="dcovector__small-specialized_8hpp_source.html">dcovector_small-specialized.hpp</a>.</p>

<p>Referenced by <a class="el" href="zhsmatrix-misc_8hpp_source.html#l00251">zhsmatrix::checkup()</a>, <a class="el" href="zhematrix-misc_8hpp_source.html#l00003">zhematrix::complete()</a>, <a class="el" href="__zhematrix-io_8hpp_source.html#l00023">operator&lt;&lt;()</a>, <a class="el" href="dcovector__small-specialized_8hpp_source.html#l00070">rotate()</a>, <a class="el" href="__zhematrix-io_8hpp_source.html#l00050">_zhematrix::write()</a>, and <a class="el" href="zhematrix-io_8hpp_source.html#l00091">zhematrix::write()</a>.</p>
<div class="fragment"><pre class="fragment">{VERBOSE_REPORT;
  <span class="keywordflow">return</span> dcovec3(q(0),q(1),q(2));
}
</pre></div>
</div>
</div>
<a class="anchor" id="a816188231dc59c47c02a0187291207f1"></a><!-- doxytag: member="dcovector_small&#45;specialized.hpp::inv" ref="a816188231dc59c47c02a0187291207f1" args="(const dquater &amp;q)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">dquater <a class="el" href="zhematrix__small_8hpp.html#acc702ee065b3cac5af9247b61715f4b2">inv</a> </td>
          <td>(</td>
          <td class="paramtype">const dquater &amp;&#160;</td>
          <td class="paramname"><em>q</em></td><td>)</td>
          <td><code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>inverse </p>

<p>Definition at line <a class="el" href="dcovector__small-specialized_8hpp_source.html#l00101">101</a> of file <a class="el" href="dcovector__small-specialized_8hpp_source.html">dcovector_small-specialized.hpp</a>.</p>

<p>References <a class="el" href="__zcovector-calc_8hpp_source.html#l00015">conj()</a>, and <a class="el" href="__dcovector-calc_8hpp_source.html#l00017">nrm2()</a>.</p>

<p>Referenced by <a class="el" href="dcovector__small-specialized_8hpp_source.html#l00118">operator/()</a>.</p>
<div class="fragment"><pre class="fragment">{VERBOSE_REPORT;
  <span class="keywordflow">return</span> <a class="code" href="__zcovector-calc_8hpp.html#a773c28a661407104353f70c7a3ab88f2">conj</a>(q)/pow(<a class="code" href="__dcovector-calc_8hpp.html#a892d328603828a5d0a2acedc2c4db7bb">nrm2</a>(q),2);
}
</pre></div>
</div>
</div>
<a class="anchor" id="aeb2a5312b5ecd2a6b4f43f98a6fb0bd9"></a><!-- doxytag: member="dcovector_small&#45;specialized.hpp::operator*" ref="aeb2a5312b5ecd2a6b4f43f98a6fb0bd9" args="(const dquater &amp;q1, const dquater &amp;q2)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">dquater operator* </td>
          <td>(</td>
          <td class="paramtype">const dquater &amp;&#160;</td>
          <td class="paramname"><em>q1</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const dquater &amp;&#160;</td>
          <td class="paramname"><em>q2</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td><code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Definition at line <a class="el" href="dcovector__small-specialized_8hpp_source.html#l00108">108</a> of file <a class="el" href="dcovector__small-specialized_8hpp_source.html">dcovector_small-specialized.hpp</a>.</p>
<div class="fragment"><pre class="fragment">{VERBOSE_REPORT;
  <span class="keywordflow">return</span> dquater(q1(3)*q2(0) +q1(0)*q2(3) +q1(1)*q2(2) -q1(2)*q2(1),
                 q1(3)*q2(1) -q1(0)*q2(2) +q1(1)*q2(3) +q1(2)*q2(0),
                 q1(3)*q2(2) +q1(0)*q2(1) -q1(1)*q2(0) +q1(2)*q2(3),
                 q1(3)*q2(3) -q1(0)*q2(0) -q1(1)*q2(1) -q1(2)*q2(2) );
}
</pre></div>
</div>
</div>
<a class="anchor" id="aba03f5e1f9e7bb0f3235ab64922c65c7"></a><!-- doxytag: member="dcovector_small&#45;specialized.hpp::operator/" ref="aba03f5e1f9e7bb0f3235ab64922c65c7" args="(const dquater &amp;q1, const dquater &amp;q2)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">dquater operator/ </td>
          <td>(</td>
          <td class="paramtype">const dquater &amp;&#160;</td>
          <td class="paramname"><em>q1</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const dquater &amp;&#160;</td>
          <td class="paramname"><em>q2</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td><code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Definition at line <a class="el" href="dcovector__small-specialized_8hpp_source.html#l00118">118</a> of file <a class="el" href="dcovector__small-specialized_8hpp_source.html">dcovector_small-specialized.hpp</a>.</p>

<p>References <a class="el" href="dcovector__small-specialized_8hpp_source.html#l00101">inv()</a>.</p>
<div class="fragment"><pre class="fragment">{VERBOSE_REPORT;
  <span class="keywordflow">return</span> q1*<a class="code" href="dcovector__small-specialized_8hpp.html#a816188231dc59c47c02a0187291207f1">inv</a>(q2);
}
</pre></div>
</div>
</div>
<a class="anchor" id="a15a5d8cabc8a6b70dc5fb2159ef89153"></a><!-- doxytag: member="dcovector_small&#45;specialized.hpp::operator*=" ref="a15a5d8cabc8a6b70dc5fb2159ef89153" args="(dquater &amp;q1, const dquater &amp;q2)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">dquater operator*= </td>
          <td>(</td>
          <td class="paramtype">dquater &amp;&#160;</td>
          <td class="paramname"><em>q1</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const dquater &amp;&#160;</td>
          <td class="paramname"><em>q2</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td><code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Definition at line <a class="el" href="dcovector__small-specialized_8hpp_source.html#l00125">125</a> of file <a class="el" href="dcovector__small-specialized_8hpp_source.html">dcovector_small-specialized.hpp</a>.</p>
<div class="fragment"><pre class="fragment">{VERBOSE_REPORT;
  q1 =q1*q2;
  <span class="keywordflow">return</span> q1;
}
</pre></div>
</div>
</div>
<a class="anchor" id="a38afe3d96f9dd8fee1a43ceb4f842a67"></a><!-- doxytag: member="dcovector_small&#45;specialized.hpp::operator/=" ref="a38afe3d96f9dd8fee1a43ceb4f842a67" args="(dquater &amp;q1, const dquater &amp;q2)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">dquater operator/= </td>
          <td>(</td>
          <td class="paramtype">dquater &amp;&#160;</td>
          <td class="paramname"><em>q1</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const dquater &amp;&#160;</td>
          <td class="paramname"><em>q2</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td><code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Definition at line <a class="el" href="dcovector__small-specialized_8hpp_source.html#l00133">133</a> of file <a class="el" href="dcovector__small-specialized_8hpp_source.html">dcovector_small-specialized.hpp</a>.</p>
<div class="fragment"><pre class="fragment">{VERBOSE_REPORT;
  q1 =q1/q2;
  <span class="keywordflow">return</span> q1;
}
</pre></div>
</div>
</div>
<a class="anchor" id="abe7b42c5233b03e0d0d8dcc0ce5c6b14"></a><!-- doxytag: member="dcovector_small&#45;specialized.hpp::q2vt" ref="abe7b42c5233b03e0d0d8dcc0ce5c6b14" args="(const dquater &amp;q)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">dcovec3 <a class="el" href="dcovector__small_8hpp.html#a19e24689c6ca7082f09baf9f9ea84f20">q2vt</a> </td>
          <td>(</td>
          <td class="paramtype">const dquater &amp;&#160;</td>
          <td class="paramname"><em>q</em></td><td>)</td>
          <td><code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>return vector from quaternion (|vector|=theta) </p>

<p>Definition at line <a class="el" href="dcovector__small-specialized_8hpp_source.html#l00141">141</a> of file <a class="el" href="dcovector__small-specialized_8hpp_source.html">dcovector_small-specialized.hpp</a>.</p>
<div class="fragment"><pre class="fragment">{VERBOSE_REPORT;
  <span class="keywordtype">double</span> sin_theta_half;
  <span class="keywordtype">double</span> theta( 2.*std::acos(q(3)) );
  
  <span class="keywordflow">if</span>(theta&lt;M_PI){
    sin_theta_half =std::sin(0.5*theta);
  }
  <span class="keywordflow">else</span>{
    theta -=2.*M_PI;
    sin_theta_half =-std::sin(0.5*theta);
  }
  
  <span class="keywordflow">return</span> dcovec3( theta*q(0)/sin_theta_half,
                  theta*q(1)/sin_theta_half,
                  theta*q(2)/sin_theta_half );
}
</pre></div>
</div>
</div>
<a class="anchor" id="a0b8662d50893bcd25e2d80f468b721f5"></a><!-- doxytag: member="dcovector_small&#45;specialized.hpp::q2m" ref="a0b8662d50893bcd25e2d80f468b721f5" args="(const dquater &amp;q)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">dgemat3 <a class="el" href="dcovector__small_8hpp.html#a6882d85bea616d0bbf1f1d970a2d8531">q2m</a> </td>
          <td>(</td>
          <td class="paramtype">const dquater &amp;&#160;</td>
          <td class="paramname"><em>q</em></td><td>)</td>
          <td><code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>return rotational matrix made of quaternion </p>

<p>Definition at line <a class="el" href="dcovector__small-specialized_8hpp_source.html#l00161">161</a> of file <a class="el" href="dcovector__small-specialized_8hpp_source.html">dcovector_small-specialized.hpp</a>.</p>

<p>References <a class="el" href="__zcovector-calc_8hpp_source.html#l00015">conj()</a>.</p>

<p>Referenced by <a class="el" href="dgematrix__small-specialized_8hpp_source.html#l00084">rotate()</a>.</p>
<div class="fragment"><pre class="fragment">{VERBOSE_REPORT;
  dquater cq( <a class="code" href="__zcovector-calc_8hpp.html#a773c28a661407104353f70c7a3ab88f2">conj</a>(q) );
  dquater X( dquater(+q(3),+q(2),-q(1),-q(0))*cq );
  dquater Y( dquater(-q(2),+q(3),+q(0),-q(1))*cq );
  dquater Z( dquater(+q(1),-q(0),+q(3),-q(2))*cq );
  dgemat3 mat;
  mat(0,0)=X(0); mat(0,1)=Y(0); mat(0,2)=Z(0);
  mat(1,0)=X(1); mat(1,1)=Y(1); mat(1,2)=Z(1);
  mat(2,0)=X(2); mat(2,1)=Y(2); mat(2,2)=Z(2);
  <span class="keywordflow">return</span> mat;
}
</pre></div>
</div>
</div>
</div><!-- contents -->
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Classes</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Friends</a></div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>



<hr class="footer"/><address class="footer"><small>
Generated by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.7.6.1
</small></address>

</body>
</html>
