~ubuntu-branches/ubuntu/trusty/blender/trusty

« back to all changes in this revision

Viewing changes to extern/Eigen3/Eigen/src/Householder/Householder.h

  • Committer: Package Import Robot
  • Author(s): Jeremy Bicha
  • Date: 2013-03-06 12:08:47 UTC
  • mfrom: (1.5.1) (14.1.8 experimental)
  • Revision ID: package-import@ubuntu.com-20130306120847-frjfaryb2zrotwcg
Tags: 2.66a-1ubuntu1
* Resynchronize with Debian (LP: #1076930, #1089256, #1052743, #999024,
  #1122888, #1147084)
* debian/control:
  - Lower build-depends on libavcodec-dev since we're not
    doing the libav9 transition in Ubuntu yet

Show diffs side-by-side

added added

removed removed

Lines of Context:
4
4
// Copyright (C) 2010 Benoit Jacob <jacob.benoit.1@gmail.com>
5
5
// Copyright (C) 2009 Gael Guennebaud <gael.guennebaud@inria.fr>
6
6
//
7
 
// Eigen is free software; you can redistribute it and/or
8
 
// modify it under the terms of the GNU Lesser General Public
9
 
// License as published by the Free Software Foundation; either
10
 
// version 3 of the License, or (at your option) any later version.
11
 
//
12
 
// Alternatively, you can redistribute it and/or
13
 
// modify it under the terms of the GNU General Public License as
14
 
// published by the Free Software Foundation; either version 2 of
15
 
// the License, or (at your option) any later version.
16
 
//
17
 
// Eigen is distributed in the hope that it will be useful, but WITHOUT ANY
18
 
// WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
19
 
// FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License or the
20
 
// GNU General Public License for more details.
21
 
//
22
 
// You should have received a copy of the GNU Lesser General Public
23
 
// License and a copy of the GNU General Public License along with
24
 
// Eigen. If not, see <http://www.gnu.org/licenses/>.
 
7
// This Source Code Form is subject to the terms of the Mozilla
 
8
// Public License v. 2.0. If a copy of the MPL was not distributed
 
9
// with this file, You can obtain one at http://mozilla.org/MPL/2.0/.
25
10
 
26
11
#ifndef EIGEN_HOUSEHOLDER_H
27
12
#define EIGEN_HOUSEHOLDER_H
28
13
 
 
14
namespace Eigen { 
 
15
 
29
16
namespace internal {
30
17
template<int n> struct decrement_size
31
18
{
35
22
};
36
23
}
37
24
 
 
25
/** Computes the elementary reflector H such that:
 
26
  * \f$ H *this = [ beta 0 ... 0]^T \f$
 
27
  * where the transformation H is:
 
28
  * \f$ H = I - tau v v^*\f$
 
29
  * and the vector v is:
 
30
  * \f$ v^T = [1 essential^T] \f$
 
31
  *
 
32
  * The essential part of the vector \c v is stored in *this.
 
33
  * 
 
34
  * On output:
 
35
  * \param tau the scaling factor of the Householder transformation
 
36
  * \param beta the result of H * \c *this
 
37
  *
 
38
  * \sa MatrixBase::makeHouseholder(), MatrixBase::applyHouseholderOnTheLeft(),
 
39
  *     MatrixBase::applyHouseholderOnTheRight()
 
40
  */
38
41
template<typename Derived>
39
42
void MatrixBase<Derived>::makeHouseholderInPlace(Scalar& tau, RealScalar& beta)
40
43
{
51
54
  *
52
55
  * On output:
53
56
  * \param essential the essential part of the vector \c v
54
 
  * \param tau the scaling factor of the householder transformation
 
57
  * \param tau the scaling factor of the Householder transformation
55
58
  * \param beta the result of H * \c *this
56
59
  *
57
60
  * \sa MatrixBase::makeHouseholderInPlace(), MatrixBase::applyHouseholderOnTheLeft(),
86
89
  }
87
90
}
88
91
 
 
92
/** Apply the elementary reflector H given by
 
93
  * \f$ H = I - tau v v^*\f$
 
94
  * with
 
95
  * \f$ v^T = [1 essential^T] \f$
 
96
  * from the left to a vector or matrix.
 
97
  *
 
98
  * On input:
 
99
  * \param essential the essential part of the vector \c v
 
100
  * \param tau the scaling factor of the Householder transformation
 
101
  * \param workspace a pointer to working space with at least
 
102
  *                  this->cols() * essential.size() entries
 
103
  *
 
104
  * \sa MatrixBase::makeHouseholder(), MatrixBase::makeHouseholderInPlace(), 
 
105
  *     MatrixBase::applyHouseholderOnTheRight()
 
106
  */
89
107
template<typename Derived>
90
108
template<typename EssentialPart>
91
109
void MatrixBase<Derived>::applyHouseholderOnTheLeft(
108
126
  }
109
127
}
110
128
 
 
129
/** Apply the elementary reflector H given by
 
130
  * \f$ H = I - tau v v^*\f$
 
131
  * with
 
132
  * \f$ v^T = [1 essential^T] \f$
 
133
  * from the right to a vector or matrix.
 
134
  *
 
135
  * On input:
 
136
  * \param essential the essential part of the vector \c v
 
137
  * \param tau the scaling factor of the Householder transformation
 
138
  * \param workspace a pointer to working space with at least
 
139
  *                  this->cols() * essential.size() entries
 
140
  *
 
141
  * \sa MatrixBase::makeHouseholder(), MatrixBase::makeHouseholderInPlace(), 
 
142
  *     MatrixBase::applyHouseholderOnTheLeft()
 
143
  */
111
144
template<typename Derived>
112
145
template<typename EssentialPart>
113
146
void MatrixBase<Derived>::applyHouseholderOnTheRight(
130
163
  }
131
164
}
132
165
 
 
166
} // end namespace Eigen
 
167
 
133
168
#endif // EIGEN_HOUSEHOLDER_H