This bugzilla service is closed. All entries have been migrated to https://gitlab.com/libeigen/eigen
View | Details | Raw Unified | Return to bug 206 | Differences between
and this patch

Collapse All | Expand All

(-)a/Eigen/src/Householder/HouseholderSequence.h (-4 / +22 lines)
Lines 280-313 template<typename VectorsType, typename Link Here
280
              .applyHouseholderOnTheLeft(essentialVector(k), m_coeffs.coeff(k), &temp.coeffRef(0));
280
              .applyHouseholderOnTheLeft(essentialVector(k), m_coeffs.coeff(k), &temp.coeffRef(0));
281
        }
281
        }
282
      }
282
      }
283
    }
283
    }
284
284
285
    /** \internal */
285
    /** \internal */
286
    template<typename Dest> inline void applyThisOnTheRight(Dest& dst) const
286
    template<typename Dest> inline void applyThisOnTheRight(Dest& dst) const
287
    {
287
    {
288
      Matrix<Scalar,1,Dest::RowsAtCompileTime> temp(dst.rows());
288
       Matrix<Scalar,1,Dest::RowsAtCompileTime,RowMajor,1,Dest::MaxRowsAtCompileTime> temp(dst.rows());
289
      applyThisOnTheRight(dst, temp);
290
    }
291
292
    /** \internal */
293
    template<typename Dest> inline void applyThisOnTheRight(Dest& dst,
294
                                                            Matrix<Scalar,1,Dest::RowsAtCompileTime,RowMajor,
295
                                                                   1,Dest::MaxRowsAtCompileTime>& temp) const
296
    {
297
      temp.resize(dst.rows());
289
      for(Index k = 0; k < m_length; ++k)
298
      for(Index k = 0; k < m_length; ++k)
290
      {
299
      {
291
        Index actual_k = m_trans ? m_length-k-1 : k;
300
        Index actual_k = m_trans ? m_length-k-1 : k;
292
        dst.rightCols(rows()-m_shift-actual_k)
301
        dst.rightCols(rows()-m_shift-actual_k)
293
           .applyHouseholderOnTheRight(essentialVector(actual_k), m_coeffs.coeff(actual_k), &temp.coeffRef(0));
302
        .applyHouseholderOnTheRight(essentialVector(actual_k), m_coeffs.coeff(actual_k), &temp.coeffRef(0));
294
      }
303
      }
295
    }
304
    }
296
305
297
    /** \internal */
306
    /** \internal */
298
    template<typename Dest> inline void applyThisOnTheLeft(Dest& dst) const
307
    template<typename Dest> inline void applyThisOnTheLeft(Dest& dst) const
299
    {
308
    {
300
      Matrix<Scalar,1,Dest::ColsAtCompileTime> temp(dst.cols());
309
      Matrix<Scalar,1,Dest::ColsAtCompileTime,RowMajor,1,Dest::MaxColsAtCompileTime> temp(dst.cols());
310
      applyThisOnTheLeft(dst, temp);
311
    }
312
313
    /** \internal */
314
    template<typename Dest> inline void applyThisOnTheLeft(Dest& dst,
315
                                                           Matrix<Scalar,1,Dest::ColsAtCompileTime,RowMajor,
316
                                                           1,Dest::MaxColsAtCompileTime>& temp) const
317
    {
318
      temp.resize(dst.cols());
301
      for(Index k = 0; k < m_length; ++k)
319
      for(Index k = 0; k < m_length; ++k)
302
      {
320
      {
303
        Index actual_k = m_trans ? k : m_length-k-1;
321
        Index actual_k = m_trans ? k : m_length-k-1;
304
        dst.bottomRows(rows()-m_shift-actual_k)
322
        dst.bottomRows(rows()-m_shift-actual_k)
305
           .applyHouseholderOnTheLeft(essentialVector(actual_k), m_coeffs.coeff(actual_k), &temp.coeffRef(0));
323
        .applyHouseholderOnTheLeft(essentialVector(actual_k), m_coeffs.coeff(actual_k), &temp.coeffRef(0));
306
      }
324
      }
307
    }
325
    }
308
326
309
    /** \brief Computes the product of a Householder sequence with a matrix.
327
    /** \brief Computes the product of a Householder sequence with a matrix.
310
      * \param[in]  other  %Matrix being multiplied.
328
      * \param[in]  other  %Matrix being multiplied.
311
      * \returns    Expression object representing the product.
329
      * \returns    Expression object representing the product.
312
      *
330
      *
313
      * This function computes \f$ HM \f$ where \f$ H \f$ is the Householder sequence represented by \p *this
331
      * This function computes \f$ HM \f$ where \f$ H \f$ is the Householder sequence represented by \p *this
(-)a/Eigen/src/Householder/HouseholderSequence.h (-10 / +10 lines)
Lines 280-331 template<typename VectorsType, typename Link Here
280
              .applyHouseholderOnTheLeft(essentialVector(k), m_coeffs.coeff(k), &temp.coeffRef(0));
280
              .applyHouseholderOnTheLeft(essentialVector(k), m_coeffs.coeff(k), &temp.coeffRef(0));
281
        }
281
        }
282
      }
282
      }
283
    }
283
    }
284
284
285
    /** \internal */
285
    /** \internal */
286
    template<typename Dest> inline void applyThisOnTheRight(Dest& dst) const
286
    template<typename Dest> inline void applyThisOnTheRight(Dest& dst) const
287
    {
287
    {
288
       Matrix<Scalar,1,Dest::RowsAtCompileTime,RowMajor,1,Dest::MaxRowsAtCompileTime> temp(dst.rows());
288
      Matrix<Scalar,1,Dest::RowsAtCompileTime,RowMajor,1,Dest::MaxRowsAtCompileTime> workspace(dst.rows());
289
      applyThisOnTheRight(dst, temp);
289
      applyThisOnTheRight(dst, workspace);
290
    }
290
    }
291
291
292
    /** \internal */
292
    /** \internal */
293
    template<typename Dest> inline void applyThisOnTheRight(Dest& dst,
293
    template<typename Dest> inline void applyThisOnTheRight(Dest& dst,
294
                                                            Matrix<Scalar,1,Dest::RowsAtCompileTime,RowMajor,
294
                                                            Matrix<Scalar,1,Dest::RowsAtCompileTime,RowMajor,
295
                                                                   1,Dest::MaxRowsAtCompileTime>& temp) const
295
                                                                   1,Dest::MaxRowsAtCompileTime>& workspace) const
296
    {
296
    {
297
      temp.resize(dst.rows());
297
      workspace.resize(dst.rows());
298
      for(Index k = 0; k < m_length; ++k)
298
      for(Index k = 0; k < m_length; ++k)
299
      {
299
      {
300
        Index actual_k = m_trans ? m_length-k-1 : k;
300
        Index actual_k = m_trans ? m_length-k-1 : k;
301
        dst.rightCols(rows()-m_shift-actual_k)
301
        dst.rightCols(rows()-m_shift-actual_k)
302
        .applyHouseholderOnTheRight(essentialVector(actual_k), m_coeffs.coeff(actual_k), &temp.coeffRef(0));
302
           .applyHouseholderOnTheRight(essentialVector(actual_k), m_coeffs.coeff(actual_k), workspace.data());
303
      }
303
      }
304
    }
304
    }
305
305
306
    /** \internal */
306
    /** \internal */
307
    template<typename Dest> inline void applyThisOnTheLeft(Dest& dst) const
307
    template<typename Dest> inline void applyThisOnTheLeft(Dest& dst) const
308
    {
308
    {
309
      Matrix<Scalar,1,Dest::ColsAtCompileTime,RowMajor,1,Dest::MaxColsAtCompileTime> temp(dst.cols());
309
      Matrix<Scalar,1,Dest::ColsAtCompileTime,RowMajor,1,Dest::MaxColsAtCompileTime> workspace(dst.cols());
310
      applyThisOnTheLeft(dst, temp);
310
      applyThisOnTheLeft(dst, workspace);
311
    }
311
    }
312
312
313
    /** \internal */
313
    /** \internal */
314
    template<typename Dest> inline void applyThisOnTheLeft(Dest& dst,
314
    template<typename Dest> inline void applyThisOnTheLeft(Dest& dst,
315
                                                           Matrix<Scalar,1,Dest::ColsAtCompileTime,RowMajor,
315
                                                           Matrix<Scalar,1,Dest::ColsAtCompileTime,RowMajor,
316
                                                           1,Dest::MaxColsAtCompileTime>& temp) const
316
                                                           1,Dest::MaxColsAtCompileTime>& workspace) const
317
    {
317
    {
318
      temp.resize(dst.cols());
318
      workspace.resize(dst.cols());
319
      for(Index k = 0; k < m_length; ++k)
319
      for(Index k = 0; k < m_length; ++k)
320
      {
320
      {
321
        Index actual_k = m_trans ? k : m_length-k-1;
321
        Index actual_k = m_trans ? k : m_length-k-1;
322
        dst.bottomRows(rows()-m_shift-actual_k)
322
        dst.bottomRows(rows()-m_shift-actual_k)
323
        .applyHouseholderOnTheLeft(essentialVector(actual_k), m_coeffs.coeff(actual_k), &temp.coeffRef(0));
323
           .applyHouseholderOnTheLeft(essentialVector(actual_k), m_coeffs.coeff(actual_k), workspace.data());
324
      }
324
      }
325
    }
325
    }
326
326
327
    /** \brief Computes the product of a Householder sequence with a matrix.
327
    /** \brief Computes the product of a Householder sequence with a matrix.
328
      * \param[in]  other  %Matrix being multiplied.
328
      * \param[in]  other  %Matrix being multiplied.
329
      * \returns    Expression object representing the product.
329
      * \returns    Expression object representing the product.
330
      *
330
      *
331
      * This function computes \f$ HM \f$ where \f$ H \f$ is the Householder sequence represented by \p *this
331
      * This function computes \f$ HM \f$ where \f$ H \f$ is the Householder sequence represented by \p *this

Return to bug 206