<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1"> <title>The MRPT project: Homogeneous.h Source File</title> <link href="doxygen.css" rel="stylesheet" type="text/css"> <link href="tabs.css" rel="stylesheet" type="text/css"> </head><body> <div align="left"><a href="http://www.mrpt.org/">Main MRPT website</a> > <b>C++ reference</b> </div> <div align="right"> <a href="index.html"><img border="0" src="mrpt_logo.png" alt="MRPT logo"></a> </div> <!-- Generated by Doxygen 1.7.2 --> <script type="text/javascript"><!-- var searchBox = new SearchBox("searchBox", "search",false,'Search'); --></script> <div class="navigation" id="top"> <div class="tabs"> <ul class="tablist"> <li><a href="index.html"><span>Main Page</span></a></li> <li><a href="pages.html"><span>Related Pages</span></a></li> <li><a href="modules.html"><span>Modules</span></a></li> <li><a href="namespaces.html"><span>Namespaces</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 id="searchli"> <div id="MSearchBox" class="MSearchBoxInactive"> <span class="left"> <form id="FSearchBox" action="search.php" method="get"> <img id="MSearchSelect" src="search/mag.png" alt=""/> <input type="text" id="MSearchField" name="query" value="Search" size="20" accesskey="S" onfocus="searchBox.OnSearchFieldFocus(true)" onblur="searchBox.OnSearchFieldFocus(false)"/> </form> </span><span class="right"></span> </div> </li> </ul> </div> <div class="tabs2"> <ul class="tablist"> <li><a href="files.html"><span>File List</span></a></li> <li><a href="globals.html"><span>File Members</span></a></li> </ul> </div> <div class="header"> <div class="headertitle"> <h1>Homogeneous.h</h1> </div> </div> <div class="contents"> <a href="_homogeneous_8h.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">// This file is part of Eigen, a lightweight C++ template library</span> <a name="l00002"></a>00002 <span class="comment">// for linear algebra.</span> <a name="l00003"></a>00003 <span class="comment">//</span> <a name="l00004"></a>00004 <span class="comment">// Copyright (C) 2009-2010 Gael Guennebaud <gael.guennebaud@inria.fr></span> <a name="l00005"></a>00005 <span class="comment">//</span> <a name="l00006"></a>00006 <span class="comment">// Eigen is free software; you can redistribute it and/or</span> <a name="l00007"></a>00007 <span class="comment">// modify it under the terms of the GNU Lesser General Public</span> <a name="l00008"></a>00008 <span class="comment">// License as published by the Free Software Foundation; either</span> <a name="l00009"></a>00009 <span class="comment">// version 3 of the License, or (at your option) any later version.</span> <a name="l00010"></a>00010 <span class="comment">//</span> <a name="l00011"></a>00011 <span class="comment">// Alternatively, you can redistribute it and/or</span> <a name="l00012"></a>00012 <span class="comment">// modify it under the terms of the GNU General Public License as</span> <a name="l00013"></a>00013 <span class="comment">// published by the Free Software Foundation; either version 2 of</span> <a name="l00014"></a>00014 <span class="comment">// the License, or (at your option) any later version.</span> <a name="l00015"></a>00015 <span class="comment">//</span> <a name="l00016"></a>00016 <span class="comment">// Eigen is distributed in the hope that it will be useful, but WITHOUT ANY</span> <a name="l00017"></a>00017 <span class="comment">// WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS</span> <a name="l00018"></a>00018 <span class="comment">// FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License or the</span> <a name="l00019"></a>00019 <span class="comment">// GNU General Public License for more details.</span> <a name="l00020"></a>00020 <span class="comment">//</span> <a name="l00021"></a>00021 <span class="comment">// You should have received a copy of the GNU Lesser General Public</span> <a name="l00022"></a>00022 <span class="comment">// License and a copy of the GNU General Public License along with</span> <a name="l00023"></a>00023 <span class="comment">// Eigen. If not, see <http://www.gnu.org/licenses/>.</span> <a name="l00024"></a>00024 <a name="l00025"></a>00025 <span class="preprocessor">#ifndef EIGEN_HOMOGENEOUS_H</span> <a name="l00026"></a>00026 <span class="preprocessor"></span><span class="preprocessor">#define EIGEN_HOMOGENEOUS_H</span> <a name="l00027"></a>00027 <span class="preprocessor"></span><span class="comment"></span> <a name="l00028"></a>00028 <span class="comment">/** \geometry_module \ingroup Geometry_Module</span> <a name="l00029"></a>00029 <span class="comment"> *</span> <a name="l00030"></a>00030 <span class="comment"> * \class Homogeneous</span> <a name="l00031"></a>00031 <span class="comment"> *</span> <a name="l00032"></a>00032 <span class="comment"> * \brief Expression of one (or a set of) homogeneous vector(s)</span> <a name="l00033"></a>00033 <span class="comment"> *</span> <a name="l00034"></a>00034 <span class="comment"> * \param MatrixType the type of the object in which we are making homogeneous</span> <a name="l00035"></a>00035 <span class="comment"> *</span> <a name="l00036"></a>00036 <span class="comment"> * This class represents an expression of one (or a set of) homogeneous vector(s).</span> <a name="l00037"></a>00037 <span class="comment"> * It is the return type of MatrixBase::homogeneous() and most of the time</span> <a name="l00038"></a>00038 <span class="comment"> * this is the only way it is used.</span> <a name="l00039"></a>00039 <span class="comment"> *</span> <a name="l00040"></a>00040 <span class="comment"> * \sa MatrixBase::homogeneous()</span> <a name="l00041"></a>00041 <span class="comment"> */</span> <a name="l00042"></a>00042 <a name="l00043"></a>00043 <span class="keyword">namespace </span>internal { <a name="l00044"></a>00044 <a name="l00045"></a>00045 <span class="keyword">template</span><<span class="keyword">typename</span> MatrixType,<span class="keywordtype">int</span> Direction> <a name="l00046"></a><a class="code" href="structinternal_1_1traits_3_01_homogeneous_3_01_matrix_type_00_01_direction_01_4_01_4.html">00046</a> <span class="keyword">struct </span>traits<<a class="code" href="class_homogeneous.html">Homogeneous</a><MatrixType,Direction> > <a name="l00047"></a>00047 : traits<MatrixType> <a name="l00048"></a>00048 { <a name="l00049"></a><a class="code" href="structinternal_1_1traits_3_01_homogeneous_3_01_matrix_type_00_01_direction_01_4_01_4.html#af1d3d623abafefba8c3ffa3f408632b4">00049</a> <span class="keyword">typedef</span> <span class="keyword">typename</span> traits<MatrixType>::StorageKind <a class="code" href="structinternal_1_1traits_3_01_homogeneous_3_01_matrix_type_00_01_direction_01_4_01_4.html#af1d3d623abafefba8c3ffa3f408632b4">StorageKind</a>; <a name="l00050"></a><a class="code" href="structinternal_1_1traits_3_01_homogeneous_3_01_matrix_type_00_01_direction_01_4_01_4.html#acd61bfa54da1347f40c7df3f6b51d078">00050</a> <span class="keyword">typedef</span> <span class="keyword">typename</span> <a class="code" href="structinternal_1_1nested.html">nested<MatrixType>::type</a> <a class="code" href="structinternal_1_1traits_3_01_homogeneous_3_01_matrix_type_00_01_direction_01_4_01_4.html#acd61bfa54da1347f40c7df3f6b51d078">MatrixTypeNested</a>; <a name="l00051"></a><a class="code" href="structinternal_1_1traits_3_01_homogeneous_3_01_matrix_type_00_01_direction_01_4_01_4.html#a3229c527976c534d89defc6c14409adc">00051</a> <span class="keyword">typedef</span> <span class="keyword">typename</span> <a class="code" href="structinternal_1_1remove__reference.html#abee00136272ee0c43df7c9afe03a0eed">remove_reference<MatrixTypeNested>::type</a> <a class="code" href="structinternal_1_1traits_3_01_homogeneous_3_01_matrix_type_00_01_direction_01_4_01_4.html#a3229c527976c534d89defc6c14409adc">_MatrixTypeNested</a>; <a name="l00052"></a>00052 <span class="keyword">enum</span> { <a name="l00053"></a><a class="code" href="structinternal_1_1traits_3_01_homogeneous_3_01_matrix_type_00_01_direction_01_4_01_4.html#a45dae427e404324730051621d1be9507a96e3319947eacc608aa46f84ae8bf229">00053</a> RowsPlusOne = (MatrixType::RowsAtCompileTime != <a class="code" href="_constants_8h.html#adc9da5be31bdce40c25a92c27999c0e3" title="This value means that a quantity is not known at compile-time, and that instead the value is stored i...">Dynamic</a>) ? <a name="l00054"></a>00054 <span class="keywordtype">int</span>(MatrixType::RowsAtCompileTime) + 1 : <a class="code" href="_constants_8h.html#adc9da5be31bdce40c25a92c27999c0e3" title="This value means that a quantity is not known at compile-time, and that instead the value is stored i...">Dynamic</a>, <a name="l00055"></a><a class="code" href="structinternal_1_1traits_3_01_homogeneous_3_01_matrix_type_00_01_direction_01_4_01_4.html#a45dae427e404324730051621d1be9507af949abe6aaa23a182df955b2a2b425fe">00055</a> ColsPlusOne = (MatrixType::ColsAtCompileTime != <a class="code" href="_constants_8h.html#adc9da5be31bdce40c25a92c27999c0e3" title="This value means that a quantity is not known at compile-time, and that instead the value is stored i...">Dynamic</a>) ? <a name="l00056"></a>00056 <span class="keywordtype">int</span>(MatrixType::ColsAtCompileTime) + 1 : <a class="code" href="_constants_8h.html#adc9da5be31bdce40c25a92c27999c0e3" title="This value means that a quantity is not known at compile-time, and that instead the value is stored i...">Dynamic</a>, <a name="l00057"></a><a class="code" href="structinternal_1_1traits_3_01_homogeneous_3_01_matrix_type_00_01_direction_01_4_01_4.html#a45dae427e404324730051621d1be9507a27c3fece0b2d99f8e56285b5ab0757ee">00057</a> RowsAtCompileTime = Direction==<a class="code" href="_constants_8h.html#a8ef30fa9c08e08c8706653571f9f5b81a2434cd8c1a594a4cdaa250f86639c600">Vertical</a> ? RowsPlusOne : MatrixType::RowsAtCompileTime, <a name="l00058"></a><a class="code" href="structinternal_1_1traits_3_01_homogeneous_3_01_matrix_type_00_01_direction_01_4_01_4.html#a45dae427e404324730051621d1be9507a165ea89bfbb87efccfd3f64a169f710e">00058</a> ColsAtCompileTime = Direction==<a class="code" href="_constants_8h.html#a8ef30fa9c08e08c8706653571f9f5b81a7d5f78c516bedc0a066182a6fd606b8b">Horizontal</a> ? ColsPlusOne : MatrixType::ColsAtCompileTime, <a name="l00059"></a><a class="code" href="structinternal_1_1traits_3_01_homogeneous_3_01_matrix_type_00_01_direction_01_4_01_4.html#a45dae427e404324730051621d1be9507a29d356d7b6a46281f5629727c4199aa5">00059</a> MaxRowsAtCompileTime = RowsAtCompileTime, <a name="l00060"></a><a class="code" href="structinternal_1_1traits_3_01_homogeneous_3_01_matrix_type_00_01_direction_01_4_01_4.html#a45dae427e404324730051621d1be9507a823d8c1d173653b832ab4bf8120dea91">00060</a> MaxColsAtCompileTime = ColsAtCompileTime, <a name="l00061"></a><a class="code" href="structinternal_1_1traits_3_01_homogeneous_3_01_matrix_type_00_01_direction_01_4_01_4.html#a45dae427e404324730051621d1be9507a4b896407429ef0336addb63dd3ad5a1e">00061</a> TmpFlags = _MatrixTypeNested::Flags & <a class="code" href="_constants_8h.html#ab3a408f1142a07c31e28ff8b51175c74">HereditaryBits</a>, <a name="l00062"></a><a class="code" href="structinternal_1_1traits_3_01_homogeneous_3_01_matrix_type_00_01_direction_01_4_01_4.html#a45dae427e404324730051621d1be9507ac5847ad4512d80cf3e2cac61742fb07a">00062</a> Flags = ColsAtCompileTime==1 ? (TmpFlags & ~<a class="code" href="group__flags.html#ga7bd49e7b260e869e10fb9dc4fd081a85" title="for a matrix, this means that the storage order is row-major.">RowMajorBit</a>) <a name="l00063"></a>00063 : RowsAtCompileTime==1 ? (TmpFlags | <a class="code" href="group__flags.html#ga7bd49e7b260e869e10fb9dc4fd081a85" title="for a matrix, this means that the storage order is row-major.">RowMajorBit</a>) <a name="l00064"></a>00064 : TmpFlags, <a name="l00065"></a><a class="code" href="structinternal_1_1traits_3_01_homogeneous_3_01_matrix_type_00_01_direction_01_4_01_4.html#a45dae427e404324730051621d1be9507a544e570b24d66c0fe6e3068533575ed6">00065</a> CoeffReadCost = _MatrixTypeNested::CoeffReadCost <a name="l00066"></a>00066 }; <a name="l00067"></a>00067 }; <a name="l00068"></a>00068 <a name="l00069"></a>00069 <span class="keyword">template</span><<span class="keyword">typename</span> MatrixType,<span class="keyword">typename</span> Lhs> <span class="keyword">struct </span>homogeneous_left_product_impl; <a name="l00070"></a>00070 <span class="keyword">template</span><<span class="keyword">typename</span> MatrixType,<span class="keyword">typename</span> Rhs> <span class="keyword">struct </span>homogeneous_right_product_impl; <a name="l00071"></a>00071 <a name="l00072"></a>00072 } <span class="comment">// end namespace internal</span> <a name="l00073"></a>00073 <a name="l00074"></a><a class="code" href="class_homogeneous.html">00074</a> <span class="keyword">template</span><<span class="keyword">typename</span> MatrixType,<span class="keywordtype">int</span> _Direction> <span class="keyword">class </span><a class="code" href="class_homogeneous.html">Homogeneous</a> <a name="l00075"></a>00075 : <span class="keyword">public</span> <a class="code" href="class_matrix_base.html" title="Base class for all dense matrices, vectors, and expressions.">MatrixBase</a><Homogeneous<MatrixType,_Direction> > <a name="l00076"></a>00076 { <a name="l00077"></a>00077 <span class="keyword">public</span>: <a name="l00078"></a>00078 <a name="l00079"></a><a class="code" href="class_homogeneous.html#a4f82f2cdf7dd66643e026135cba9359aa9c68d861f88fb468d10245495a347c8e">00079</a> <span class="keyword">enum</span> { <a class="code" href="class_homogeneous.html#a4f82f2cdf7dd66643e026135cba9359aa9c68d861f88fb468d10245495a347c8e">Direction</a> = _Direction }; <a name="l00080"></a>00080 <a name="l00081"></a><a class="code" href="class_homogeneous.html#ac1cdb262c0ac50f575af38970586ecd9">00081</a> <span class="keyword">typedef</span> <a class="code" href="class_matrix_base.html" title="Base class for all dense matrices, vectors, and expressions.">MatrixBase<Homogeneous></a> <a class="code" href="class_homogeneous.html#ac1cdb262c0ac50f575af38970586ecd9">Base</a>; <a name="l00082"></a>00082 <a class="code" href="_macros_8h.html#ab29ea1da9635d033ca44cf26ad6fa0cf">EIGEN_DENSE_PUBLIC_INTERFACE</a>(<a class="code" href="class_homogeneous.html">Homogeneous</a>) <a name="l00083"></a>00083 <a name="l00084"></a><a class="code" href="class_homogeneous.html#aea713bbcbeea123cc0b51a1171eecff7">00084</a> inline <a class="code" href="class_homogeneous.html">Homogeneous</a>(const MatrixType& <a class="code" href="class_matrix_base.html#aaf8f8d8f79d50b3520b1c86286fc3a28">matrix</a>) <a name="l00085"></a>00085 : <a class="code" href="class_homogeneous.html#a1d4c62319b902eb18f5472bfd3dc31f4">m_matrix</a>(<a class="code" href="class_matrix_base.html#aaf8f8d8f79d50b3520b1c86286fc3a28">matrix</a>) <a name="l00086"></a>00086 {} <a name="l00087"></a>00087 <a name="l00088"></a><a class="code" href="class_homogeneous.html#a916b47300310e34238df264f6e0b6ad0">00088</a> <span class="keyword">inline</span> <a class="code" href="class_dense_base.html#a059039d9d011413c873e6ae05ee912b6" title="The type of indices.">Index</a> <a class="code" href="class_homogeneous.html#a916b47300310e34238df264f6e0b6ad0">rows</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> <a class="code" href="class_homogeneous.html#a1d4c62319b902eb18f5472bfd3dc31f4">m_matrix</a>.rows() + (int(<a class="code" href="class_homogeneous.html#a4f82f2cdf7dd66643e026135cba9359aa9c68d861f88fb468d10245495a347c8e">Direction</a>)==<a class="code" href="_constants_8h.html#a8ef30fa9c08e08c8706653571f9f5b81a2434cd8c1a594a4cdaa250f86639c600">Vertical</a> ? 1 : 0); } <a name="l00089"></a><a class="code" href="class_homogeneous.html#a4daf72642581c661d68ed36735c782a3">00089</a> <span class="keyword">inline</span> <a class="code" href="class_dense_base.html#a059039d9d011413c873e6ae05ee912b6" title="The type of indices.">Index</a> <a class="code" href="class_homogeneous.html#a4daf72642581c661d68ed36735c782a3">cols</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> <a class="code" href="class_homogeneous.html#a1d4c62319b902eb18f5472bfd3dc31f4">m_matrix</a>.cols() + (int(<a class="code" href="class_homogeneous.html#a4f82f2cdf7dd66643e026135cba9359aa9c68d861f88fb468d10245495a347c8e">Direction</a>)==<a class="code" href="_constants_8h.html#a8ef30fa9c08e08c8706653571f9f5b81a7d5f78c516bedc0a066182a6fd606b8b">Horizontal</a> ? 1 : 0); } <a name="l00090"></a>00090 <a name="l00091"></a><a class="code" href="class_homogeneous.html#a11abccec98f1d274d59cadc0a96558d1">00091</a> <span class="keyword">inline</span> <a class="code" href="class_dense_base.html#a6a6c17e367430ca95523eb3fe7db9076">Scalar</a> <a class="code" href="class_homogeneous.html#a11abccec98f1d274d59cadc0a96558d1">coeff</a>(<a class="code" href="class_dense_base.html#a059039d9d011413c873e6ae05ee912b6" title="The type of indices.">Index</a> <a class="code" href="class_dense_base.html#ae33fb28f4d9452314f83a0bf9bd320ba">row</a>, <a class="code" href="class_dense_base.html#a059039d9d011413c873e6ae05ee912b6" title="The type of indices.">Index</a> <a class="code" href="class_dense_base.html#ad04a61ee7a67f704509bb14bc88058f8">col</a>)<span class="keyword"> const</span> <a name="l00092"></a>00092 <span class="keyword"> </span>{ <a name="l00093"></a>00093 <span class="keywordflow">if</span>( (<span class="keywordtype">int</span>(<a class="code" href="class_homogeneous.html#a4f82f2cdf7dd66643e026135cba9359aa9c68d861f88fb468d10245495a347c8e">Direction</a>)==<a class="code" href="_constants_8h.html#a8ef30fa9c08e08c8706653571f9f5b81a2434cd8c1a594a4cdaa250f86639c600">Vertical</a> && row==<a class="code" href="class_homogeneous.html#a1d4c62319b902eb18f5472bfd3dc31f4">m_matrix</a>.rows()) <a name="l00094"></a>00094 || (<span class="keywordtype">int</span>(<a class="code" href="class_homogeneous.html#a4f82f2cdf7dd66643e026135cba9359aa9c68d861f88fb468d10245495a347c8e">Direction</a>)==<a class="code" href="_constants_8h.html#a8ef30fa9c08e08c8706653571f9f5b81a7d5f78c516bedc0a066182a6fd606b8b">Horizontal</a> && col==<a class="code" href="class_homogeneous.html#a1d4c62319b902eb18f5472bfd3dc31f4">m_matrix</a>.cols())) <a name="l00095"></a>00095 <span class="keywordflow">return</span> 1; <a name="l00096"></a>00096 <span class="keywordflow">return</span> <a class="code" href="class_homogeneous.html#a1d4c62319b902eb18f5472bfd3dc31f4">m_matrix</a>.coeff(row, col); <a name="l00097"></a>00097 } <a name="l00098"></a>00098 <a name="l00099"></a>00099 <span class="keyword">template</span><<span class="keyword">typename</span> Rhs> <a name="l00100"></a>00100 <span class="keyword">inline</span> <span class="keyword">const</span> internal::homogeneous_right_product_impl<Homogeneous,Rhs> <a name="l00101"></a><a class="code" href="class_homogeneous.html#a2c5d12960863e1899394c18bdd1238a7">00101</a> <a class="code" href="class_homogeneous.html#a2c5d12960863e1899394c18bdd1238a7">operator* </a>(<span class="keyword">const</span> <a class="code" href="class_matrix_base.html" title="Base class for all dense matrices, vectors, and expressions.">MatrixBase<Rhs></a>& rhs)<span class="keyword"> const</span> <a name="l00102"></a>00102 <span class="keyword"> </span>{ <a name="l00103"></a>00103 <a class="code" href="_macros_8h.html#acaa7ba89800cfe18d5fd6eed620aea9c">eigen_assert</a>(<span class="keywordtype">int</span>(<a class="code" href="class_homogeneous.html#a4f82f2cdf7dd66643e026135cba9359aa9c68d861f88fb468d10245495a347c8e">Direction</a>)==<a class="code" href="_constants_8h.html#a8ef30fa9c08e08c8706653571f9f5b81a7d5f78c516bedc0a066182a6fd606b8b">Horizontal</a>); <a name="l00104"></a>00104 <span class="keywordflow">return</span> internal::homogeneous_right_product_impl<Homogeneous,Rhs>(<a class="code" href="class_homogeneous.html#a1d4c62319b902eb18f5472bfd3dc31f4">m_matrix</a>,rhs.derived()); <a name="l00105"></a>00105 } <a name="l00106"></a>00106 <a name="l00107"></a>00107 <span class="keyword">template</span><<span class="keyword">typename</span> Lhs> <span class="keyword">friend</span> <a name="l00108"></a>00108 <span class="keyword">inline</span> <span class="keyword">const</span> internal::homogeneous_left_product_impl<Homogeneous,Lhs> <a name="l00109"></a><a class="code" href="class_homogeneous.html#a960abc8cebe0625f984f634b3c96337f">00109</a> <a class="code" href="class_homogeneous.html#a2c5d12960863e1899394c18bdd1238a7">operator* </a>(<span class="keyword">const</span> <a class="code" href="class_matrix_base.html" title="Base class for all dense matrices, vectors, and expressions.">MatrixBase<Lhs></a>& lhs, <span class="keyword">const</span> <a class="code" href="class_homogeneous.html">Homogeneous</a>& rhs) <a name="l00110"></a>00110 { <a name="l00111"></a>00111 <a class="code" href="_macros_8h.html#acaa7ba89800cfe18d5fd6eed620aea9c">eigen_assert</a>(<span class="keywordtype">int</span>(<a class="code" href="class_homogeneous.html#a4f82f2cdf7dd66643e026135cba9359aa9c68d861f88fb468d10245495a347c8e">Direction</a>)==<a class="code" href="_constants_8h.html#a8ef30fa9c08e08c8706653571f9f5b81a2434cd8c1a594a4cdaa250f86639c600">Vertical</a>); <a name="l00112"></a>00112 <span class="keywordflow">return</span> internal::homogeneous_left_product_impl<Homogeneous,Lhs>(lhs.derived(),rhs.<a class="code" href="class_homogeneous.html#a1d4c62319b902eb18f5472bfd3dc31f4">m_matrix</a>); <a name="l00113"></a>00113 } <a name="l00114"></a>00114 <a name="l00115"></a>00115 <span class="keyword">template</span><<span class="keyword">typename</span> Scalar, <span class="keywordtype">int</span> Dim, <span class="keywordtype">int</span> Mode> <span class="keyword">friend</span> <a name="l00116"></a>00116 <span class="keyword">inline</span> <span class="keyword">const</span> internal::homogeneous_left_product_impl<Homogeneous,Transform<Scalar,Dim,Mode> > <a name="l00117"></a><a class="code" href="class_homogeneous.html#a1297778395e19a50a29ecb570ae0d919">00117</a> <a class="code" href="class_homogeneous.html#a2c5d12960863e1899394c18bdd1238a7">operator* </a>(<span class="keyword">const</span> <a class="code" href="class_transform.html">Transform<Scalar,Dim,Mode></a>& lhs, <span class="keyword">const</span> <a class="code" href="class_homogeneous.html">Homogeneous</a>& rhs) <a name="l00118"></a>00118 { <a name="l00119"></a>00119 <a class="code" href="_macros_8h.html#acaa7ba89800cfe18d5fd6eed620aea9c">eigen_assert</a>(<span class="keywordtype">int</span>(<a class="code" href="class_homogeneous.html#a4f82f2cdf7dd66643e026135cba9359aa9c68d861f88fb468d10245495a347c8e">Direction</a>)==<a class="code" href="_constants_8h.html#a8ef30fa9c08e08c8706653571f9f5b81a2434cd8c1a594a4cdaa250f86639c600">Vertical</a>); <a name="l00120"></a>00120 <span class="keywordflow">return</span> internal::homogeneous_left_product_impl<Homogeneous,Transform<Scalar,Dim,Mode> >(lhs,rhs.<a class="code" href="class_homogeneous.html#a1d4c62319b902eb18f5472bfd3dc31f4">m_matrix</a>); <a name="l00121"></a>00121 } <a name="l00122"></a>00122 <a name="l00123"></a>00123 <span class="keyword">protected</span>: <a name="l00124"></a><a class="code" href="class_homogeneous.html#a1d4c62319b902eb18f5472bfd3dc31f4">00124</a> <span class="keyword">const</span> <span class="keyword">typename</span> MatrixType::Nested <a class="code" href="class_homogeneous.html#a1d4c62319b902eb18f5472bfd3dc31f4">m_matrix</a>; <a name="l00125"></a>00125 }; <a name="l00126"></a>00126 <span class="comment"></span> <a name="l00127"></a>00127 <span class="comment">/** \geometry_module</span> <a name="l00128"></a>00128 <span class="comment"> *</span> <a name="l00129"></a>00129 <span class="comment"> * \return an expression of the equivalent homogeneous vector</span> <a name="l00130"></a>00130 <span class="comment"> *</span> <a name="l00131"></a>00131 <span class="comment"> * \only_for_vectors</span> <a name="l00132"></a>00132 <span class="comment"> *</span> <a name="l00133"></a>00133 <span class="comment"> * Example: \include MatrixBase_homogeneous.cpp</span> <a name="l00134"></a>00134 <span class="comment"> * Output: \verbinclude MatrixBase_homogeneous.out</span> <a name="l00135"></a>00135 <span class="comment"> *</span> <a name="l00136"></a>00136 <span class="comment"> * \sa class Homogeneous</span> <a name="l00137"></a>00137 <span class="comment"> */</span> <a name="l00138"></a>00138 <span class="keyword">template</span><<span class="keyword">typename</span> Derived> <a name="l00139"></a>00139 <span class="keyword">inline</span> <span class="keyword">typename</span> <a class="code" href="class_homogeneous.html">MatrixBase<Derived>::HomogeneousReturnType</a> <a name="l00140"></a><a class="code" href="class_matrix_base.html#a3b6b89554f47a67c9ae12357cf67db0b">00140</a> <a class="code" href="class_matrix_base.html#a3b6b89554f47a67c9ae12357cf67db0b">MatrixBase<Derived>::homogeneous</a>()<span class="keyword"> const</span> <a name="l00141"></a>00141 <span class="keyword"></span>{ <a name="l00142"></a>00142 <a class="code" href="_static_assert_8h.html#ac04a73705a0aa1d66c4b80f6338db904">EIGEN_STATIC_ASSERT_VECTOR_ONLY</a>(Derived); <a name="l00143"></a>00143 <span class="keywordflow">return</span> derived(); <a name="l00144"></a>00144 } <a name="l00145"></a>00145 <span class="comment"></span> <a name="l00146"></a>00146 <span class="comment">/** \geometry_module</span> <a name="l00147"></a>00147 <span class="comment"> *</span> <a name="l00148"></a>00148 <span class="comment"> * \returns a matrix expression of homogeneous column (or row) vectors</span> <a name="l00149"></a>00149 <span class="comment"> *</span> <a name="l00150"></a>00150 <span class="comment"> * Example: \include VectorwiseOp_homogeneous.cpp</span> <a name="l00151"></a>00151 <span class="comment"> * Output: \verbinclude VectorwiseOp_homogeneous.out</span> <a name="l00152"></a>00152 <span class="comment"> *</span> <a name="l00153"></a>00153 <span class="comment"> * \sa MatrixBase::homogeneous() */</span> <a name="l00154"></a>00154 <span class="keyword">template</span><<span class="keyword">typename</span> ExpressionType, <span class="keywordtype">int</span> Direction> <a name="l00155"></a>00155 <span class="keyword">inline</span> <a class="code" href="class_homogeneous.html">Homogeneous<ExpressionType,Direction></a> <a name="l00156"></a><a class="code" href="class_vectorwise_op.html#a262f3403901392d4e36a59ffb22d789f">00156</a> <a class="code" href="class_vectorwise_op.html#a262f3403901392d4e36a59ffb22d789f">VectorwiseOp<ExpressionType,Direction>::homogeneous</a>()<span class="keyword"> const</span> <a name="l00157"></a>00157 <span class="keyword"></span>{ <a name="l00158"></a>00158 <span class="keywordflow">return</span> _expression(); <a name="l00159"></a>00159 } <a name="l00160"></a>00160 <span class="comment"></span> <a name="l00161"></a>00161 <span class="comment">/** \geometry_module</span> <a name="l00162"></a>00162 <span class="comment"> *</span> <a name="l00163"></a>00163 <span class="comment"> * \returns an expression of the homogeneous normalized vector of \c *this</span> <a name="l00164"></a>00164 <span class="comment"> *</span> <a name="l00165"></a>00165 <span class="comment"> * Example: \include MatrixBase_hnormalized.cpp</span> <a name="l00166"></a>00166 <span class="comment"> * Output: \verbinclude MatrixBase_hnormalized.out</span> <a name="l00167"></a>00167 <span class="comment"> *</span> <a name="l00168"></a>00168 <span class="comment"> * \sa VectorwiseOp::hnormalized() */</span> <a name="l00169"></a>00169 <span class="keyword">template</span><<span class="keyword">typename</span> Derived> <a name="l00170"></a>00170 <span class="keyword">inline</span> <span class="keyword">const</span> <span class="keyword">typename</span> <a class="code" href="class_cwise_unary_op.html" title="Generic expression where a coefficient-wise unary operator is applied to an expression.">MatrixBase<Derived>::HNormalizedReturnType</a> <a name="l00171"></a><a class="code" href="class_matrix_base.html#a5ce08a829a5d172c8f64f98a4273ac86">00171</a> <a class="code" href="class_matrix_base.html#a5ce08a829a5d172c8f64f98a4273ac86">MatrixBase<Derived>::hnormalized</a>()<span class="keyword"> const</span> <a name="l00172"></a>00172 <span class="keyword"></span>{ <a name="l00173"></a>00173 <a class="code" href="_static_assert_8h.html#ac04a73705a0aa1d66c4b80f6338db904">EIGEN_STATIC_ASSERT_VECTOR_ONLY</a>(Derived); <a name="l00174"></a>00174 <span class="keywordflow">return</span> <a class="code" href="class_block.html" title="Expression of a fixed-size or dynamic-size block.">ConstStartMinusOne</a>(derived(),0,0, <a name="l00175"></a>00175 ColsAtCompileTime==1?<a class="code" href="namespacemrpt_1_1math.html#a34f37758cc35f29279a8e6ad91215ad1">size</a>()-1:1, <a name="l00176"></a>00176 ColsAtCompileTime==1?1:<a class="code" href="namespacemrpt_1_1math.html#a34f37758cc35f29279a8e6ad91215ad1">size</a>()-1) / coeff(<a class="code" href="namespacemrpt_1_1math.html#a34f37758cc35f29279a8e6ad91215ad1">size</a>()-1); <a name="l00177"></a>00177 } <a name="l00178"></a>00178 <span class="comment"></span> <a name="l00179"></a>00179 <span class="comment">/** \geometry_module</span> <a name="l00180"></a>00180 <span class="comment"> *</span> <a name="l00181"></a>00181 <span class="comment"> * \returns an expression of the homogeneous normalized vector of \c *this</span> <a name="l00182"></a>00182 <span class="comment"> *</span> <a name="l00183"></a>00183 <span class="comment"> * Example: \include DirectionWise_hnormalized.cpp</span> <a name="l00184"></a>00184 <span class="comment"> * Output: \verbinclude DirectionWise_hnormalized.out</span> <a name="l00185"></a>00185 <span class="comment"> *</span> <a name="l00186"></a>00186 <span class="comment"> * \sa MatrixBase::hnormalized() */</span> <a name="l00187"></a>00187 <span class="keyword">template</span><<span class="keyword">typename</span> ExpressionType, <span class="keywordtype">int</span> Direction> <a name="l00188"></a>00188 <span class="keyword">inline</span> <span class="keyword">const</span> <span class="keyword">typename</span> <a class="code" href="class_cwise_binary_op.html" title="Generic expression where a coefficient-wise binary operator is applied to two expressions.">VectorwiseOp<ExpressionType,Direction>::HNormalizedReturnType</a> <a name="l00189"></a><a class="code" href="class_vectorwise_op.html#a65ae1e206df43702639da5d9c0c9e471">00189</a> <a class="code" href="class_vectorwise_op.html#a65ae1e206df43702639da5d9c0c9e471">VectorwiseOp<ExpressionType,Direction>::hnormalized</a>()<span class="keyword"> const</span> <a name="l00190"></a>00190 <span class="keyword"></span>{ <a name="l00191"></a>00191 <span class="keywordflow">return</span> <a class="code" href="class_block.html" title="Expression of a fixed-size or dynamic-size block.">HNormalized_Block</a>(_expression(),0,0, <a name="l00192"></a>00192 Direction==<a class="code" href="_constants_8h.html#a8ef30fa9c08e08c8706653571f9f5b81a2434cd8c1a594a4cdaa250f86639c600">Vertical</a> ? _expression().rows()-1 : _expression().rows(), <a name="l00193"></a>00193 Direction==<a class="code" href="_constants_8h.html#a8ef30fa9c08e08c8706653571f9f5b81a7d5f78c516bedc0a066182a6fd606b8b">Horizontal</a> ? _expression().cols()-1 : _expression().cols()).cwiseQuotient( <a name="l00194"></a>00194 <a class="code" href="class_replicate.html" title="Expression of the multiple replication of a matrix or vector.">Replicate</a><<a class="code" href="class_block.html" title="Expression of a fixed-size or dynamic-size block.">HNormalized_Factors</a>, <a name="l00195"></a>00195 Direction==<a class="code" href="_constants_8h.html#a8ef30fa9c08e08c8706653571f9f5b81a2434cd8c1a594a4cdaa250f86639c600">Vertical</a> ? HNormalized_SizeMinusOne : 1, <a name="l00196"></a>00196 Direction==<a class="code" href="_constants_8h.html#a8ef30fa9c08e08c8706653571f9f5b81a7d5f78c516bedc0a066182a6fd606b8b">Horizontal</a> ? HNormalized_SizeMinusOne : 1> <a name="l00197"></a>00197 (<a class="code" href="class_block.html" title="Expression of a fixed-size or dynamic-size block.">HNormalized_Factors</a>(_expression(), <a name="l00198"></a>00198 Direction==<a class="code" href="_constants_8h.html#a8ef30fa9c08e08c8706653571f9f5b81a2434cd8c1a594a4cdaa250f86639c600">Vertical</a> ? _expression().rows()-1:0, <a name="l00199"></a>00199 Direction==<a class="code" href="_constants_8h.html#a8ef30fa9c08e08c8706653571f9f5b81a7d5f78c516bedc0a066182a6fd606b8b">Horizontal</a> ? _expression().cols()-1:0, <a name="l00200"></a>00200 Direction==<a class="code" href="_constants_8h.html#a8ef30fa9c08e08c8706653571f9f5b81a2434cd8c1a594a4cdaa250f86639c600">Vertical</a> ? 1 : _expression().rows(), <a name="l00201"></a>00201 Direction==<a class="code" href="_constants_8h.html#a8ef30fa9c08e08c8706653571f9f5b81a7d5f78c516bedc0a066182a6fd606b8b">Horizontal</a> ? 1 : _expression().cols()), <a name="l00202"></a>00202 Direction==<a class="code" href="_constants_8h.html#a8ef30fa9c08e08c8706653571f9f5b81a2434cd8c1a594a4cdaa250f86639c600">Vertical</a> ? _expression().rows()-1 : 1, <a name="l00203"></a>00203 Direction==<a class="code" href="_constants_8h.html#a8ef30fa9c08e08c8706653571f9f5b81a7d5f78c516bedc0a066182a6fd606b8b">Horizontal</a> ? _expression().cols()-1 : 1)); <a name="l00204"></a>00204 } <a name="l00205"></a>00205 <a name="l00206"></a>00206 <span class="keyword">namespace </span>internal { <a name="l00207"></a>00207 <a name="l00208"></a>00208 <span class="keyword">template</span><<span class="keyword">typename</span> MatrixOrTransformType> <a name="l00209"></a><a class="code" href="structinternal_1_1take__matrix__for__product.html">00209</a> <span class="keyword">struct </span><a class="code" href="structinternal_1_1take__matrix__for__product.html">take_matrix_for_product</a> <a name="l00210"></a>00210 { <a name="l00211"></a><a class="code" href="structinternal_1_1take__matrix__for__product.html#a4b27bb0fb2c78f6f852b3ad31e5fc164">00211</a> <span class="keyword">typedef</span> MatrixOrTransformType <a class="code" href="structinternal_1_1take__matrix__for__product.html#a4b27bb0fb2c78f6f852b3ad31e5fc164">type</a>; <a name="l00212"></a><a class="code" href="structinternal_1_1take__matrix__for__product.html#a1bd321e461ac47e1016d9ae2f85e78fa">00212</a> <span class="keyword">static</span> <span class="keyword">const</span> <a class="code" href="structinternal_1_1take__matrix__for__product.html#a4b27bb0fb2c78f6f852b3ad31e5fc164">type</a>& <a class="code" href="structinternal_1_1take__matrix__for__product.html#a1bd321e461ac47e1016d9ae2f85e78fa">run</a>(<span class="keyword">const</span> <a class="code" href="structinternal_1_1take__matrix__for__product.html#a4b27bb0fb2c78f6f852b3ad31e5fc164">type</a> &x) { <span class="keywordflow">return</span> x; } <a name="l00213"></a>00213 }; <a name="l00214"></a>00214 <a name="l00215"></a>00215 <span class="keyword">template</span><<span class="keyword">typename</span> Scalar, <span class="keywordtype">int</span> Dim, <span class="keywordtype">int</span> Mode> <a name="l00216"></a><a class="code" href="structinternal_1_1take__matrix__for__product_3_01_transform_3_01_scalar_00_01_dim_00_01_mode_01_4_01_4.html">00216</a> <span class="keyword">struct </span><a class="code" href="structinternal_1_1take__matrix__for__product.html">take_matrix_for_product</a><<a class="code" href="class_transform.html">Transform</a><Scalar, Dim, Mode> > <a name="l00217"></a>00217 { <a name="l00218"></a><a class="code" href="structinternal_1_1take__matrix__for__product_3_01_transform_3_01_scalar_00_01_dim_00_01_mode_01_4_01_4.html#a45b3e67335a4e6066794d1a4d0a21f52">00218</a> <span class="keyword">typedef</span> <a class="code" href="class_transform.html">Transform<Scalar, Dim, Mode></a> <a class="code" href="structinternal_1_1take__matrix__for__product_3_01_transform_3_01_scalar_00_01_dim_00_01_mode_01_4_01_4.html#a45b3e67335a4e6066794d1a4d0a21f52">TransformType</a>; <a name="l00219"></a><a class="code" href="structinternal_1_1take__matrix__for__product_3_01_transform_3_01_scalar_00_01_dim_00_01_mode_01_4_01_4.html#adb3c0c4089cdc2c3633d7ab2aff3411e">00219</a> <span class="keyword">typedef</span> <span class="keyword">typename</span> <a class="code" href="class_transform.html#a1dbcf73e85ee9bb0459700276e11869f" title="type of read reference to the affine part of the transformation">TransformType::ConstAffinePart</a> <a class="code" href="structinternal_1_1take__matrix__for__product_3_01_transform_3_01_scalar_00_01_dim_00_01_mode_01_4_01_4.html#adb3c0c4089cdc2c3633d7ab2aff3411e">type</a>; <a name="l00220"></a><a class="code" href="structinternal_1_1take__matrix__for__product_3_01_transform_3_01_scalar_00_01_dim_00_01_mode_01_4_01_4.html#a9b6972a04df0544e2c60ea0f08d6e354">00220</a> <span class="keyword">static</span> <span class="keyword">const</span> <a class="code" href="structinternal_1_1take__matrix__for__product_3_01_transform_3_01_scalar_00_01_dim_00_01_mode_01_4_01_4.html#adb3c0c4089cdc2c3633d7ab2aff3411e">type</a> <a class="code" href="structinternal_1_1take__matrix__for__product_3_01_transform_3_01_scalar_00_01_dim_00_01_mode_01_4_01_4.html#a9b6972a04df0544e2c60ea0f08d6e354">run</a> (<span class="keyword">const</span> <a class="code" href="class_transform.html">TransformType</a>& x) { <span class="keywordflow">return</span> x.<a class="code" href="class_transform.html#ae788f8eca3012e3203d65b76fcd2fd0e">affine</a>(); } <a name="l00221"></a>00221 }; <a name="l00222"></a>00222 <a name="l00223"></a>00223 <span class="keyword">template</span><<span class="keyword">typename</span> Scalar, <span class="keywordtype">int</span> Dim> <a name="l00224"></a><a class="code" href="structinternal_1_1take__matrix__for__product_3_01_transform_3_01_scalar_00_01_dim_00_01_projective_01_4_01_4.html">00224</a> <span class="keyword">struct </span><a class="code" href="structinternal_1_1take__matrix__for__product.html">take_matrix_for_product</a><<a class="code" href="class_transform.html">Transform</a><Scalar, Dim, <a class="code" href="_constants_8h.html#a302a826315506a7217d4b477ea78425fa732168807730e0e931f3c5792b99b672">Projective</a>> > <a name="l00225"></a>00225 { <a name="l00226"></a><a class="code" href="structinternal_1_1take__matrix__for__product_3_01_transform_3_01_scalar_00_01_dim_00_01_projective_01_4_01_4.html#a119be693336ed0d0b685ab7f8bfa64fd">00226</a> <span class="keyword">typedef</span> <a class="code" href="class_transform.html">Transform<Scalar, Dim, Projective></a> <a class="code" href="structinternal_1_1take__matrix__for__product_3_01_transform_3_01_scalar_00_01_dim_00_01_projective_01_4_01_4.html#a119be693336ed0d0b685ab7f8bfa64fd">TransformType</a>; <a name="l00227"></a><a class="code" href="structinternal_1_1take__matrix__for__product_3_01_transform_3_01_scalar_00_01_dim_00_01_projective_01_4_01_4.html#afcb0a1877a8fd1a410bdb5a24232ce6c">00227</a> <span class="keyword">typedef</span> <span class="keyword">typename</span> <a class="code" href="class_matrix.html">TransformType::MatrixType</a> <a class="code" href="structinternal_1_1take__matrix__for__product_3_01_transform_3_01_scalar_00_01_dim_00_01_projective_01_4_01_4.html#afcb0a1877a8fd1a410bdb5a24232ce6c">type</a>; <a name="l00228"></a><a class="code" href="structinternal_1_1take__matrix__for__product_3_01_transform_3_01_scalar_00_01_dim_00_01_projective_01_4_01_4.html#aed3d4baedbd053fc4243e3efc4a5e5b2">00228</a> <span class="keyword">static</span> <span class="keyword">const</span> <a class="code" href="class_matrix.html">type</a>& <a class="code" href="structinternal_1_1take__matrix__for__product_3_01_transform_3_01_scalar_00_01_dim_00_01_projective_01_4_01_4.html#aed3d4baedbd053fc4243e3efc4a5e5b2">run</a> (<span class="keyword">const</span> <a class="code" href="class_transform.html">TransformType</a>& x) { <span class="keywordflow">return</span> x.<a class="code" href="class_transform.html#aa31b45349abc10a4ee620c8526a2d28c">matrix</a>(); } <a name="l00229"></a>00229 }; <a name="l00230"></a>00230 <a name="l00231"></a>00231 <span class="keyword">template</span><<span class="keyword">typename</span> MatrixType,<span class="keyword">typename</span> Lhs> <a name="l00232"></a><a class="code" href="structinternal_1_1traits_3_01homogeneous__left__product__impl_3_01_homogeneous_3_01_matrix_type_bf645ed5aa6e1b02c41ecd795a597fd5.html">00232</a> <span class="keyword">struct </span>traits<homogeneous_left_product_impl<<a class="code" href="class_homogeneous.html">Homogeneous</a><MatrixType,<a class="code" href="_constants_8h.html#a8ef30fa9c08e08c8706653571f9f5b81a2434cd8c1a594a4cdaa250f86639c600">Vertical</a>>,Lhs> > <a name="l00233"></a>00233 { <a name="l00234"></a><a class="code" href="structinternal_1_1traits_3_01homogeneous__left__product__impl_3_01_homogeneous_3_01_matrix_type_bf645ed5aa6e1b02c41ecd795a597fd5.html#aed876df052bb481d79152e99152f5fc9">00234</a> <span class="keyword">typedef</span> <span class="keyword">typename</span> <a class="code" href="structinternal_1_1take__matrix__for__product.html#a4b27bb0fb2c78f6f852b3ad31e5fc164">take_matrix_for_product<Lhs>::type</a> <a class="code" href="structinternal_1_1traits_3_01homogeneous__left__product__impl_3_01_homogeneous_3_01_matrix_type_bf645ed5aa6e1b02c41ecd795a597fd5.html#aed876df052bb481d79152e99152f5fc9">LhsMatrixType</a>; <a name="l00235"></a>00235 <span class="keyword">typedef</span> <span class="keyword">typename</span> <a class="code" href="classinternal_1_1make__proper__matrix__type.html">make_proper_matrix_type</a>< <a name="l00236"></a>00236 <span class="keyword">typename</span> traits<MatrixType>::Scalar, <a name="l00237"></a>00237 LhsMatrixType::RowsAtCompileTime, <a name="l00238"></a>00238 MatrixType::ColsAtCompileTime, <a name="l00239"></a>00239 MatrixType::PlainObject::Options, <a name="l00240"></a>00240 LhsMatrixType::MaxRowsAtCompileTime, <a name="l00241"></a><a class="code" href="structinternal_1_1traits_3_01homogeneous__left__product__impl_3_01_homogeneous_3_01_matrix_type_bf645ed5aa6e1b02c41ecd795a597fd5.html#a77b51b42925dd73ad590000670b7d2f5">00241</a> MatrixType::MaxColsAtCompileTime><a class="code" href="classinternal_1_1dense__xpr__base_1_1type.html">::type</a> <a class="code" href="structinternal_1_1traits_3_01homogeneous__left__product__impl_3_01_homogeneous_3_01_matrix_type_bf645ed5aa6e1b02c41ecd795a597fd5.html#a77b51b42925dd73ad590000670b7d2f5">ReturnType</a>; <a name="l00242"></a>00242 }; <a name="l00243"></a>00243 <a name="l00244"></a>00244 <span class="keyword">template</span><<span class="keyword">typename</span> MatrixType,<span class="keyword">typename</span> Lhs> <a name="l00245"></a><a class="code" href="structinternal_1_1homogeneous__left__product__impl_3_01_homogeneous_3_01_matrix_type_00_01_vertical_01_4_00_01_lhs_01_4.html">00245</a> <span class="keyword">struct </span>homogeneous_left_product_impl<<a class="code" href="class_homogeneous.html">Homogeneous</a><MatrixType,<a class="code" href="_constants_8h.html#a8ef30fa9c08e08c8706653571f9f5b81a2434cd8c1a594a4cdaa250f86639c600">Vertical</a>>,Lhs> <a name="l00246"></a>00246 : <span class="keyword">public</span> <a class="code" href="class_return_by_value.html">ReturnByValue</a><homogeneous_left_product_impl<Homogeneous<MatrixType,Vertical>,Lhs> > <a name="l00247"></a>00247 { <a name="l00248"></a><a class="code" href="structinternal_1_1homogeneous__left__product__impl_3_01_homogeneous_3_01_matrix_type_00_01_vertical_01_4_00_01_lhs_01_4.html#a136b34af8f0b5f5459905114f4df954a">00248</a> <span class="keyword">typedef</span> <span class="keyword">typename</span> traits<homogeneous_left_product_impl>::LhsMatrixType <a class="code" href="structinternal_1_1homogeneous__left__product__impl_3_01_homogeneous_3_01_matrix_type_00_01_vertical_01_4_00_01_lhs_01_4.html#a136b34af8f0b5f5459905114f4df954a">LhsMatrixType</a>; <a name="l00249"></a><a class="code" href="structinternal_1_1homogeneous__left__product__impl_3_01_homogeneous_3_01_matrix_type_00_01_vertical_01_4_00_01_lhs_01_4.html#a702557d7e41d1df2a62be4b70496d801">00249</a> <span class="keyword">typedef</span> <span class="keyword">typename</span> <a class="code" href="structinternal_1_1remove__all.html#a563ebdff4a8ca3825b500e7efb95c4bc">remove_all<typename LhsMatrixType::Nested>::type</a> <a class="code" href="structinternal_1_1homogeneous__left__product__impl_3_01_homogeneous_3_01_matrix_type_00_01_vertical_01_4_00_01_lhs_01_4.html#a702557d7e41d1df2a62be4b70496d801">LhsMatrixTypeNested</a>; <a name="l00250"></a><a class="code" href="structinternal_1_1homogeneous__left__product__impl_3_01_homogeneous_3_01_matrix_type_00_01_vertical_01_4_00_01_lhs_01_4.html#aca4d64fb1b4fb969367d7ac450c0d6d2">00250</a> <span class="keyword">typedef</span> <span class="keyword">typename</span> MatrixType::Index <a class="code" href="structinternal_1_1homogeneous__left__product__impl_3_01_homogeneous_3_01_matrix_type_00_01_vertical_01_4_00_01_lhs_01_4.html#aca4d64fb1b4fb969367d7ac450c0d6d2">Index</a>; <a name="l00251"></a><a class="code" href="structinternal_1_1homogeneous__left__product__impl_3_01_homogeneous_3_01_matrix_type_00_01_vertical_01_4_00_01_lhs_01_4.html#aebe5e81f2615b70fa0b0f82f296038a5">00251</a> homogeneous_left_product_impl(<span class="keyword">const</span> Lhs& lhs, <span class="keyword">const</span> MatrixType& rhs) <a name="l00252"></a>00252 : m_lhs(<a class="code" href="structinternal_1_1take__matrix__for__product.html">take_matrix_for_product</a><Lhs>::run(lhs)), <a name="l00253"></a>00253 m_rhs(rhs) <a name="l00254"></a>00254 {} <a name="l00255"></a>00255 <a name="l00256"></a><a class="code" href="structinternal_1_1homogeneous__left__product__impl_3_01_homogeneous_3_01_matrix_type_00_01_vertical_01_4_00_01_lhs_01_4.html#adf3e52e49951c9c92a6f4ce2d66aaf29">00256</a> <span class="keyword">inline</span> <a class="code" href="structinternal_1_1homogeneous__left__product__impl_3_01_homogeneous_3_01_matrix_type_00_01_vertical_01_4_00_01_lhs_01_4.html#aca4d64fb1b4fb969367d7ac450c0d6d2">Index</a> <a class="code" href="structinternal_1_1homogeneous__left__product__impl_3_01_homogeneous_3_01_matrix_type_00_01_vertical_01_4_00_01_lhs_01_4.html#adf3e52e49951c9c92a6f4ce2d66aaf29">rows</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> m_lhs.rows(); } <a name="l00257"></a><a class="code" href="structinternal_1_1homogeneous__left__product__impl_3_01_homogeneous_3_01_matrix_type_00_01_vertical_01_4_00_01_lhs_01_4.html#afea4f36f9a58e7655766beb48858e8a7">00257</a> <span class="keyword">inline</span> <a class="code" href="structinternal_1_1homogeneous__left__product__impl_3_01_homogeneous_3_01_matrix_type_00_01_vertical_01_4_00_01_lhs_01_4.html#aca4d64fb1b4fb969367d7ac450c0d6d2">Index</a> <a class="code" href="structinternal_1_1homogeneous__left__product__impl_3_01_homogeneous_3_01_matrix_type_00_01_vertical_01_4_00_01_lhs_01_4.html#afea4f36f9a58e7655766beb48858e8a7">cols</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> m_rhs.cols(); } <a name="l00258"></a>00258 <a name="l00259"></a><a class="code" href="structinternal_1_1homogeneous__left__product__impl_3_01_homogeneous_3_01_matrix_type_00_01_vertical_01_4_00_01_lhs_01_4.html#a16405ecd7343ca132a3489a263995f67">00259</a> <span class="keyword">template</span><<span class="keyword">typename</span> Dest> <span class="keywordtype">void</span> evalTo(Dest& dst)<span class="keyword"> const</span> <a name="l00260"></a>00260 <span class="keyword"> </span>{ <a name="l00261"></a>00261 <span class="comment">// FIXME investigate how to allow lazy evaluation of this product when possible</span> <a name="l00262"></a>00262 dst = <a class="code" href="class_block.html" title="Expression of a fixed-size or dynamic-size block.">Block</a><<span class="keyword">const</span> <a class="code" href="structinternal_1_1homogeneous__left__product__impl_3_01_homogeneous_3_01_matrix_type_00_01_vertical_01_4_00_01_lhs_01_4.html#a702557d7e41d1df2a62be4b70496d801">LhsMatrixTypeNested</a>, <a name="l00263"></a>00263 LhsMatrixTypeNested::RowsAtCompileTime, <a name="l00264"></a>00264 LhsMatrixTypeNested::ColsAtCompileTime==<a class="code" href="_constants_8h.html#adc9da5be31bdce40c25a92c27999c0e3" title="This value means that a quantity is not known at compile-time, and that instead the value is stored i...">Dynamic</a>?<a class="code" href="_constants_8h.html#adc9da5be31bdce40c25a92c27999c0e3" title="This value means that a quantity is not known at compile-time, and that instead the value is stored i...">Dynamic</a>:LhsMatrixTypeNested::ColsAtCompileTime-1> <a name="l00265"></a>00265 (m_lhs,0,0,m_lhs.rows(),m_lhs.cols()-1) * m_rhs; <a name="l00266"></a>00266 dst += m_lhs.col(m_lhs.cols()-1).rowwise() <a name="l00267"></a>00267 .template replicate<MatrixType::ColsAtCompileTime>(m_rhs.cols()); <a name="l00268"></a>00268 } <a name="l00269"></a>00269 <a name="l00270"></a><a class="code" href="structinternal_1_1homogeneous__left__product__impl_3_01_homogeneous_3_01_matrix_type_00_01_vertical_01_4_00_01_lhs_01_4.html#a20830f6a18cae8feac89d8869fc69eb7">00270</a> <span class="keyword">const</span> <span class="keyword">typename</span> LhsMatrixType::Nested <a class="code" href="structinternal_1_1homogeneous__left__product__impl_3_01_homogeneous_3_01_matrix_type_00_01_vertical_01_4_00_01_lhs_01_4.html#a20830f6a18cae8feac89d8869fc69eb7">m_lhs</a>; <a name="l00271"></a><a class="code" href="structinternal_1_1homogeneous__left__product__impl_3_01_homogeneous_3_01_matrix_type_00_01_vertical_01_4_00_01_lhs_01_4.html#a157165dd32baec4d616bd9048d6470eb">00271</a> <span class="keyword">const</span> <span class="keyword">typename</span> MatrixType::Nested <a class="code" href="structinternal_1_1homogeneous__left__product__impl_3_01_homogeneous_3_01_matrix_type_00_01_vertical_01_4_00_01_lhs_01_4.html#a157165dd32baec4d616bd9048d6470eb">m_rhs</a>; <a name="l00272"></a>00272 }; <a name="l00273"></a>00273 <a name="l00274"></a>00274 <span class="keyword">template</span><<span class="keyword">typename</span> MatrixType,<span class="keyword">typename</span> Rhs> <a name="l00275"></a><a class="code" href="structinternal_1_1traits_3_01homogeneous__right__product__impl_3_01_homogeneous_3_01_matrix_type0ca1d9bf5f0241bcf3c8bc64d39afe40.html">00275</a> <span class="keyword">struct </span>traits<homogeneous_right_product_impl<<a class="code" href="class_homogeneous.html">Homogeneous</a><MatrixType,<a class="code" href="_constants_8h.html#a8ef30fa9c08e08c8706653571f9f5b81a7d5f78c516bedc0a066182a6fd606b8b">Horizontal</a>>,Rhs> > <a name="l00276"></a>00276 { <a name="l00277"></a>00277 <span class="keyword">typedef</span> <span class="keyword">typename</span> <a class="code" href="classinternal_1_1make__proper__matrix__type.html">make_proper_matrix_type<typename traits<MatrixType>::Scalar</a>, <a name="l00278"></a>00278 MatrixType::RowsAtCompileTime, <a name="l00279"></a>00279 Rhs::ColsAtCompileTime, <a name="l00280"></a>00280 MatrixType::PlainObject::Options, <a name="l00281"></a>00281 MatrixType::MaxRowsAtCompileTime, <a name="l00282"></a><a class="code" href="structinternal_1_1traits_3_01homogeneous__right__product__impl_3_01_homogeneous_3_01_matrix_type0ca1d9bf5f0241bcf3c8bc64d39afe40.html#a3c8cb74240df5aef27080e94224cd5f6">00282</a> Rhs::MaxColsAtCompileTime><a class="code" href="classinternal_1_1dense__xpr__base_1_1type.html">::type</a> <a class="code" href="structinternal_1_1traits_3_01homogeneous__right__product__impl_3_01_homogeneous_3_01_matrix_type0ca1d9bf5f0241bcf3c8bc64d39afe40.html#a3c8cb74240df5aef27080e94224cd5f6">ReturnType</a>; <a name="l00283"></a>00283 }; <a name="l00284"></a>00284 <a name="l00285"></a>00285 <span class="keyword">template</span><<span class="keyword">typename</span> MatrixType,<span class="keyword">typename</span> Rhs> <a name="l00286"></a><a class="code" href="structinternal_1_1homogeneous__right__product__impl_3_01_homogeneous_3_01_matrix_type_00_01_horizontal_01_4_00_01_rhs_01_4.html">00286</a> <span class="keyword">struct </span>homogeneous_right_product_impl<<a class="code" href="class_homogeneous.html">Homogeneous</a><MatrixType,<a class="code" href="_constants_8h.html#a8ef30fa9c08e08c8706653571f9f5b81a7d5f78c516bedc0a066182a6fd606b8b">Horizontal</a>>,Rhs> <a name="l00287"></a>00287 : <span class="keyword">public</span> <a class="code" href="class_return_by_value.html">ReturnByValue</a><homogeneous_right_product_impl<Homogeneous<MatrixType,Horizontal>,Rhs> > <a name="l00288"></a>00288 { <a name="l00289"></a><a class="code" href="structinternal_1_1homogeneous__right__product__impl_3_01_homogeneous_3_01_matrix_type_00_01_horizontal_01_4_00_01_rhs_01_4.html#a5b2ff1477032e6c1e8208db0b0474198">00289</a> <span class="keyword">typedef</span> <span class="keyword">typename</span> <a class="code" href="structinternal_1_1remove__all.html#a563ebdff4a8ca3825b500e7efb95c4bc">remove_all<typename Rhs::Nested>::type</a> <a class="code" href="structinternal_1_1homogeneous__right__product__impl_3_01_homogeneous_3_01_matrix_type_00_01_horizontal_01_4_00_01_rhs_01_4.html#a5b2ff1477032e6c1e8208db0b0474198">RhsNested</a>; <a name="l00290"></a><a class="code" href="structinternal_1_1homogeneous__right__product__impl_3_01_homogeneous_3_01_matrix_type_00_01_horizontal_01_4_00_01_rhs_01_4.html#a16768f475d53132baef549ebe651f218">00290</a> <span class="keyword">typedef</span> <span class="keyword">typename</span> MatrixType::Index <a class="code" href="structinternal_1_1homogeneous__right__product__impl_3_01_homogeneous_3_01_matrix_type_00_01_horizontal_01_4_00_01_rhs_01_4.html#a16768f475d53132baef549ebe651f218">Index</a>; <a name="l00291"></a><a class="code" href="structinternal_1_1homogeneous__right__product__impl_3_01_homogeneous_3_01_matrix_type_00_01_horizontal_01_4_00_01_rhs_01_4.html#af5a390f74c1215082a6377559510670e">00291</a> homogeneous_right_product_impl(<span class="keyword">const</span> MatrixType& lhs, <span class="keyword">const</span> Rhs& rhs) <a name="l00292"></a>00292 : m_lhs(lhs), m_rhs(rhs) <a name="l00293"></a>00293 {} <a name="l00294"></a>00294 <a name="l00295"></a><a class="code" href="structinternal_1_1homogeneous__right__product__impl_3_01_homogeneous_3_01_matrix_type_00_01_horizontal_01_4_00_01_rhs_01_4.html#afb61265d820014cf358cb60896899012">00295</a> <span class="keyword">inline</span> <a class="code" href="structinternal_1_1homogeneous__right__product__impl_3_01_homogeneous_3_01_matrix_type_00_01_horizontal_01_4_00_01_rhs_01_4.html#a16768f475d53132baef549ebe651f218">Index</a> <a class="code" href="structinternal_1_1homogeneous__right__product__impl_3_01_homogeneous_3_01_matrix_type_00_01_horizontal_01_4_00_01_rhs_01_4.html#afb61265d820014cf358cb60896899012">rows</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> m_lhs.rows(); } <a name="l00296"></a><a class="code" href="structinternal_1_1homogeneous__right__product__impl_3_01_homogeneous_3_01_matrix_type_00_01_horizontal_01_4_00_01_rhs_01_4.html#a72064b17081e2d8b646100eaa21c88fa">00296</a> <span class="keyword">inline</span> <a class="code" href="structinternal_1_1homogeneous__right__product__impl_3_01_homogeneous_3_01_matrix_type_00_01_horizontal_01_4_00_01_rhs_01_4.html#a16768f475d53132baef549ebe651f218">Index</a> <a class="code" href="structinternal_1_1homogeneous__right__product__impl_3_01_homogeneous_3_01_matrix_type_00_01_horizontal_01_4_00_01_rhs_01_4.html#a72064b17081e2d8b646100eaa21c88fa">cols</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> m_rhs.cols(); } <a name="l00297"></a>00297 <a name="l00298"></a><a class="code" href="structinternal_1_1homogeneous__right__product__impl_3_01_homogeneous_3_01_matrix_type_00_01_horizontal_01_4_00_01_rhs_01_4.html#adb3ce21ebbe033449354ce457d6dc8d7">00298</a> <span class="keyword">template</span><<span class="keyword">typename</span> Dest> <span class="keywordtype">void</span> evalTo(Dest& dst)<span class="keyword"> const</span> <a name="l00299"></a>00299 <span class="keyword"> </span>{ <a name="l00300"></a>00300 <span class="comment">// FIXME investigate how to allow lazy evaluation of this product when possible</span> <a name="l00301"></a>00301 dst = m_lhs * <a class="code" href="class_block.html" title="Expression of a fixed-size or dynamic-size block.">Block</a><<span class="keyword">const</span> <a class="code" href="structinternal_1_1homogeneous__right__product__impl_3_01_homogeneous_3_01_matrix_type_00_01_horizontal_01_4_00_01_rhs_01_4.html#a5b2ff1477032e6c1e8208db0b0474198">RhsNested</a>, <a name="l00302"></a>00302 RhsNested::RowsAtCompileTime==<a class="code" href="_constants_8h.html#adc9da5be31bdce40c25a92c27999c0e3" title="This value means that a quantity is not known at compile-time, and that instead the value is stored i...">Dynamic</a>?<a class="code" href="_constants_8h.html#adc9da5be31bdce40c25a92c27999c0e3" title="This value means that a quantity is not known at compile-time, and that instead the value is stored i...">Dynamic</a>:RhsNested::RowsAtCompileTime-1, <a name="l00303"></a>00303 RhsNested::ColsAtCompileTime> <a name="l00304"></a>00304 (m_rhs,0,0,m_rhs.rows()-1,m_rhs.cols()); <a name="l00305"></a>00305 dst += m_rhs.row(m_rhs.rows()-1).colwise() <a name="l00306"></a>00306 .template replicate<MatrixType::RowsAtCompileTime>(m_lhs.rows()); <a name="l00307"></a>00307 } <a name="l00308"></a>00308 <a name="l00309"></a><a class="code" href="structinternal_1_1homogeneous__right__product__impl_3_01_homogeneous_3_01_matrix_type_00_01_horizontal_01_4_00_01_rhs_01_4.html#afa68041a93153f1697536c29ff276071">00309</a> <span class="keyword">const</span> <span class="keyword">typename</span> MatrixType::Nested <a class="code" href="structinternal_1_1homogeneous__right__product__impl_3_01_homogeneous_3_01_matrix_type_00_01_horizontal_01_4_00_01_rhs_01_4.html#afa68041a93153f1697536c29ff276071">m_lhs</a>; <a name="l00310"></a><a class="code" href="structinternal_1_1homogeneous__right__product__impl_3_01_homogeneous_3_01_matrix_type_00_01_horizontal_01_4_00_01_rhs_01_4.html#a232d780a709bb5c071383a47e1e00302">00310</a> <span class="keyword">const</span> <span class="keyword">typename</span> Rhs::Nested <a class="code" href="structinternal_1_1homogeneous__right__product__impl_3_01_homogeneous_3_01_matrix_type_00_01_horizontal_01_4_00_01_rhs_01_4.html#a232d780a709bb5c071383a47e1e00302">m_rhs</a>; <a name="l00311"></a>00311 }; <a name="l00312"></a>00312 <a name="l00313"></a>00313 } <span class="comment">// end namespace internal</span> <a name="l00314"></a>00314 <a name="l00315"></a>00315 <span class="preprocessor">#endif // EIGEN_HOMOGENEOUS_H</span> </pre></div></div> </div> <br><hr><br> <table border="0" width="100%"> <tr> <td> Page generated by <a href="http://www.doxygen.org" target="_blank">Doxygen 1.7.2</a> for MRPT 0.9.4 SVN: at Mon Jan 10 22:30:30 UTC 2011</td><td></td> <td width="100"> </td> <td width="150"> </td></tr> </table> </body></html>